Permalink
Browse files

Updated List.BlogList.cshtml

  • Loading branch information...
nader-dab committed Aug 15, 2017
1 parent fa90afa commit c807d35a3fb00fcb29f61322f297ccb3001f4bf5
Showing with 13 additions and 16 deletions.
  1. +13 −16 ResourcePackages/Bootstrap/MVC/Views/Blog/List.BlogList.cshtml
@@ -1,25 +1,32 @@
@model Telerik.Sitefinity.Frontend.Mvc.Models.ContentListViewModel
@using Telerik.Sitefinity;
@using Telerik.Sitefinity.Frontend.Blogs.Mvc.Helpers;
@using Telerik.Sitefinity.Frontend.Blogs.Mvc.Models.Blog;
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@using Telerik.Sitefinity.Modules.Pages;
@using Telerik.Sitefinity.Web.DataResolving;
@Html.Script(ScriptRef.JQuery, "top", false)
<div class="@Model.CssClass">
<ul class="list-unstyled">
@{
var lastPostDates = Model.GetLastPostDates();
}
@foreach (var item in Model.Items)
{
var navigateUrl = HyperLinkHelpers.GetDetailPageUrl(item, ViewBag.DetailsPageId, ViewBag.OpenInSamePage, Model.UrlKeyPrefix);
<li class="news_item" @Html.InlineEditingAttributes(Model.ProviderName, Model.ContentType.FullName, (Guid)item.Fields.Id)>
var detailPageUrl = DetailLocationHyperLinkHelper.GetDetailPageUrl(item, ViewBag.DetailsPageId, ViewBag.DetailPageMode);
<li @Html.InlineEditingAttributes(Model.ProviderName, Model.ContentType.FullName, (Guid)item.Fields.Id)>
<h3>
<a @Html.InlineEditingFieldAttributes("Title", "ShortText") href="@navigateUrl">@item.Fields.Title</a>
@if (!string.IsNullOrEmpty(detailPageUrl))
{
<a @Html.InlineEditingFieldAttributes("Title", "ShortText") href="@detailPageUrl">@item.Fields.Title</a>
}
else{
<span @Html.InlineEditingFieldAttributes("Title", "ShortText")>@item.Fields.Title</span>
}
</h3>
@{
@@ -30,16 +37,6 @@
}
}
<div class="text-muted">
@item.GetDateTime("PublicationDate", "MMM d, yyyy, HH:mm tt")
@Html.Resource("By")
@DataResolver.Resolve(item.DataItem, "Author", null)
@Html.CommentsCount((string)navigateUrl, item.DataItem)
</div>
<div @Html.InlineEditingFieldAttributes("Summary", "ShortText")>@Html.Raw(item.Fields.Summary)</div>
<a href="@navigateUrl">@Html.Resource("FullStory")</a>
</li>
}
</ul>
@@ -53,4 +50,4 @@
redirectUrlTemplate = ViewBag.RedirectPageUrlTemplate
})
}
</div>
</div>

0 comments on commit c807d35

Please sign in to comment.