|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Article>" %>
<% var _content = Model.GetGlobalizationContent(); %>
<div style="height: 50px; clear: left;">
<h1 class="ui-title" style="margin: 10px; margin-bottom: 2px; float: left;">
<%:_content.Title %></h1>
</div>
<div style="overflow: hidden; display: block; margin: 5px 0px 5px 0px; padding-top: 5px;
border-top: 1px solid #cccccc;">
<%:Html.ImageLinkList()
.Options(opts =>
{
opts.CssClass = "ui-helper-reset";
opts.ItemCssStyleText = "float:left;margin-right:5px;";
opts.ImageCssStyleText = "float:left;margin-right:2px;";
opts.TitleCssStyleText = "float:left;padding-top:2px;";
})
.Items(items => {
var parent = Model.GetParent();
var rootID = WebHost.EnablePersonalWeb ? WebSite.Open(Model.UserName).DefaultCategory().ID : WebSite.Open().DefaultCategory().ID;
items.Add(Html.Global("publishing", "FiledUnder"), Url.Content("~/Content/Images/doc_cat.gif"));
items.Add( (parent.ID == rootID || parent.Title.Equals("{site}",StringComparison.OrdinalIgnoreCase)) ? Html.Global("publishing", "Uncategorized") : parent.Title, "", parent.GetPermalinkUrl().ToString());
if (!string.IsNullOrEmpty(Model.Categories))
{
var cats = Model.GetCategories();
foreach (var c in cats)
items.Add((c.ID == rootID || c.Title.Equals("{site}", StringComparison.OrdinalIgnoreCase)) ? Html.Global("publishing", "Uncategorized") : c.Title, "", parent.GetPermalinkUrl().ToString());
}
items.Add(Html.Global(Model.Posted), Url.Content("~/Content/Images/calender.gif"));
if (Model.AllowComments)
items.Add(Html.Global("publishing", "GoToComments"), Url.Content("~/Content/Images/comments.gif"), "#commentlist");
if (((WebContext.Current.Web.IsRoot) && (Html.IsAuthorize<DNA.Mvc.Areas.Publishing.Controllers.ArticleController>("Edit"))) ||
(WebContext.Current.User.IsWebOwner()))
items.Add(Html.Global("RES_EDIT"), Url.Content("~/Content/Images/edit_page.png"), Url.Action("Edit", "Article", new { website = WebContext.Current.Web.Name, id = Model.ID, Area = "Publishing" }));
})
.Render()
%>
<div style="float: right; width: 160px; padding-left: 5px;" class="ui-widget-content ui-corner-all">
<%:Ajax.Rating("ArticleRating" + Model.ID, Model.Rating, "Rating", "Article", new { id=Model.ID },
new RatingOptions()
{
Value=Model.Rating
})
%>
<span style="margin-left: 5px;">
<%:Html.Global("publishing", "Votes") %>:<%:Model.TotalRatings %></span>
</div>
</div>
<div style="padding: 10px; margin: 5px;" id="viewContent_bodyArea">
<% if (Model.ContentFormat == 2)
{ %>
<%:Html.FormatWiKi(_content.Body) %>
<%}
else
{ %>
<%: Html.FormatXhtml(_content.Body)%>
<%} %>
<% Html.ForceImageAutoSize("viewContent_bodyArea", -1, 600); %>
</div>
<%: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