mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Splitting a few shapes
--HG-- branch : dev
This commit is contained in:
14
src/Orchard.Web/Core/Common/Views/CommonMetadataOwner.cshtml
Normal file
14
src/Orchard.Web/Core/Common/Views/CommonMetadataOwner.cshtml
Normal file
@@ -0,0 +1,14 @@
|
||||
@*
|
||||
Model:
|
||||
ContentPart
|
||||
*@
|
||||
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Common.Models;
|
||||
@using Orchard.Security;
|
||||
@{
|
||||
CommonPart commonPart = Model.ContentPart;
|
||||
// owner isn't really who last modified this, is it?
|
||||
IUser owner = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().Owner;
|
||||
}
|
||||
@T("By {0}", owner == null ? "<null>" : owner.UserName)
|
@@ -1,15 +1,12 @@
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Common.Models;
|
||||
@using Orchard.Security;
|
||||
@{
|
||||
CommonPart commonPart = Model.ContentPart;
|
||||
DateTime? modifiedUtc = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().ModifiedUtc;
|
||||
// owner isn't really who last modified this, is it?
|
||||
IUser owner = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().Owner;
|
||||
}
|
||||
<ul class="pageStatus">
|
||||
<li>@if (modifiedUtc.HasValue) {
|
||||
@T("Last modified: {0}", Display.DateTimeRelative(dateTimeUtc: modifiedUtc.Value))} |
|
||||
</li>
|
||||
<li>@T("By {0}", owner == null ? "<null>" : owner.UserName)</li>
|
||||
<li>@Display.CommonMetadataOwner(ContentPart: Model.ContentPart)</li>
|
||||
</ul>
|
@@ -236,7 +236,7 @@
|
||||
<Content Include="Common\Views\Fields.Common.Text.cshtml" />
|
||||
<Content Include="Common\Views\Parts.Common.Body.SummaryAdmin.cshtml" />
|
||||
<Content Include="Common\Views\Parts.Common.Metadata.cshtml" />
|
||||
<Content Include="Common\Views\Parts.Common.Metadata.SummaryAdmin.cshtml" />
|
||||
<Content Include="Common\Views\CommonMetadataOwner.cshtml" />
|
||||
<Content Include="Containers\Module.txt" />
|
||||
<Content Include="Contents\Styles\images\menu.content.png" />
|
||||
<Content Include="Contents\Styles\menu.content.css" />
|
||||
@@ -406,6 +406,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Reports\Styles\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Parts.Common.Metadata.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@@ -0,0 +1,13 @@
|
||||
@*
|
||||
Model:
|
||||
ContentPart
|
||||
*@
|
||||
|
||||
@using Orchard.Comments.Models;
|
||||
@using Orchard.Utility.Extensions;
|
||||
|
||||
@{
|
||||
var comment = (Orchard.Comments.Models.CommentPart)Model.ContentPart;
|
||||
}
|
||||
|
||||
@Html.LinkOrDefault(comment.Record.Author, comment.Record.SiteName, new { rel = "nofollow" })
|
@@ -0,0 +1,12 @@
|
||||
@*
|
||||
Model:
|
||||
ContentPart
|
||||
*@
|
||||
|
||||
@using Orchard.Comments.Models;
|
||||
@using Orchard.Utility.Extensions;
|
||||
@{
|
||||
var comment = (Orchard.Comments.Models.CommentPart)Model.ContentPart;
|
||||
}
|
||||
|
||||
said <time datetime="@comment.Record.CommentDateUtc.GetValueOrDefault()">@Html.Link((string)Display.DateTimeRelative(dateTimeUtc: comment.Record.CommentDateUtc.GetValueOrDefault()).ToString(), "#comment-" + comment.Id)</time>
|
@@ -4,13 +4,11 @@
|
||||
<ul class="comments">
|
||||
@foreach (var comment in Model) {
|
||||
<li>
|
||||
<article class="comment">
|
||||
<article class="comment" id="comment-@comment.Id">
|
||||
<header>
|
||||
<h4>
|
||||
<span class="who">@Html.LinkOrDefault(comment.Record.Author, comment.Record.SiteName, new { rel = "nofollow" })
|
||||
</span>
|
||||
<span class="when">said <time datetime="@comment.Record.CommentDateUtc.GetValueOrDefault()">@Html.Link((string)Display.DateTimeRelative(dateTimeUtc: comment.Record.CommentDateUtc.GetValueOrDefault()).ToString(), "#")</time>
|
||||
</span>
|
||||
<span class="who">@Display.CommentAuthor(ContentPart: comment)</span>
|
||||
<span class="when">@Display.CommentMetadata(ContentPart: comment)</span>
|
||||
</h4>
|
||||
</header>
|
||||
<p class="text">@(new MvcHtmlString(Html.Encode(comment.Record.CommentText).ReplaceNewLinesWith("<br />$1")))</p>
|
||||
|
Reference in New Issue
Block a user