|
<%@ Control Language="C#" Inherits="DNA.Mvc.DynamicUI.WidgetViewUserControl" %>
<% var context = WebContext.Current; %>
<%:
Ajax.Menu(IDPrefix+"_MetaMenu")
.Options(options=>{
options.MenuType = MenuStyles.Vertical;
options.TopMenuCssClass = "ui-sitetools-menu";
options.TopItemCssClass = "ui-sitetools-menuitem";
options.TopItemHoverCssClass = "ui-sitetools-menuitem-hover";
})
.Items(items => {
var web = this.CurrentWeb();
if (Context.Request.IsAuthenticated)
{
//Owner actions
if (Context.User.IsWebOwner())
{
items.AddMenuItem(Html.Global("publishing", "WritePost"), Url.Action("Create", "Article", new
{
Area = "Publishing",
website = web.Name,
categoryID = string.IsNullOrEmpty(Request.QueryString["categoryID"]) ? web.DefaultCategory().ID : int.Parse(Request.QueryString["categoryID"])
})).ImageUrl = Url.Content("~/Content/Images/add.png");
items.AddMenuItem(Html.Global("RES_CREATEPAGE"), Url.Action("Create", "DynamicUI", new { Area = "" }))
.ImageUrl = Url.Content("~/Content/Images/add_page.png");
items.AddMenuItem(Html.Global("RES_MYCONSOLE"), Url.RouteUrl("dna_mysite", new { website = Profile.UserName, action = "Console", controller = "Account", Area = "" }))
.ImageUrl = Url.Content("~/Content/Images/my_console.gif");
}
}
else
{
items.AddMenuItem(Html.Global("RES_LOGIN"), Url.Action("LogOn", "Account", new { Area = "" }))
.ImageUrl = Url.Content("~/Content/Images/icon_unlock.gif");
if (WebSite.Open().EnableUserRegistration)
items.AddMenuItem(Html.Global("RES_REGISTER"), Url.Action("Register", "Account", new { Area = "" }))
.ImageUrl = Url.Content("~/Content/Images/icon_unlock.gif");
}
items.AddMenuItem(Html.Global("publishing","AddToFavorite"), "javascript:uiHelper.addBookMark('"+web.Title+"');void(0);")
.ImageUrl=Url.Content("~/Content/Images/fav.gif");
items.AddMenuItem(Html.Global("publishing", "BackToTopSite"), Url.Content("~/"))
.ImageUrl=Url.Content("~/Content/Images/back.png");
})
.Render()
%>
<%:Html.StartupScripts() %>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"
www.dotnetage.com