mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -2,15 +2,20 @@
|
|||||||
@using Orchard.Comments.Models;
|
@using Orchard.Comments.Models;
|
||||||
|
|
||||||
<ul class="comments">
|
<ul class="comments">
|
||||||
@foreach (var comment in Model) {
|
@foreach (var comment in Model) {
|
||||||
<li>
|
<li>
|
||||||
<div class="comment">
|
<article class="comment">
|
||||||
<span class="who">@Html.LinkOrDefault(comment.Record.UserName, comment.Record.SiteName, new { rel = "nofollow" })</span>
|
<header>
|
||||||
<span>said @Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).ToString(), "#")</span>
|
<h4>
|
||||||
</div>
|
<span class="who">@Html.LinkOrDefault(comment.Record.UserName, comment.Record.SiteName, new { rel = "nofollow" })
|
||||||
<div class="text">
|
</span>
|
||||||
<p>@comment.Record.CommentText</p>
|
<span class="when">said <time datetime="@comment.Record.CommentDateUtc.GetValueOrDefault()">@Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).ToString(), "#")</time>
|
||||||
</div>
|
</span>
|
||||||
</li>
|
</h4>
|
||||||
|
</header>
|
||||||
|
<p class="text">@comment.Record.CommentText</p>
|
||||||
|
</article>
|
||||||
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -19,37 +19,42 @@ else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) {
|
|||||||
} else {
|
} else {
|
||||||
using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment" })) {
|
using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment" })) {
|
||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
<h2 id="addacomment">@T("Add a Comment")</h2>
|
if (!Request.IsAuthenticated) {
|
||||||
if (!Request.IsAuthenticated) {
|
|
||||||
<fieldset class="who">
|
<fieldset class="who">
|
||||||
<div>
|
<legend id="addacomment">@T("Add a Comment")</legend>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
<label for="Name">@T("Name")</label>
|
<label for="Name">@T("Name")</label>
|
||||||
<input id="Name" class="text" name="Name" type="text" />
|
<input id="Name" class="text" name="Name" type="text" />
|
||||||
</div>
|
</li>
|
||||||
<div>
|
<li>
|
||||||
<label for="Email">@T("Email")</label>
|
<label for="Email">@T("Email")</label>
|
||||||
<input id="Email" class="text" name="Email" type="text" />
|
<input id="Email" class="text" name="Email" type="text" />
|
||||||
</div>
|
</li>
|
||||||
<div>
|
<li>
|
||||||
<label for="SiteName">@T("Url")</label>
|
<label for="SiteName">@T("Url")</label>
|
||||||
<input id="SiteName" class="text" name="SiteName" type="text" />
|
<input id="SiteName" class="text" name="SiteName" type="text" />
|
||||||
</div>
|
</li>
|
||||||
|
</ol>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
} else {
|
} else {
|
||||||
@Html.Hidden("Name", WorkContext.CurrentUser.UserName ?? "")
|
@Html.Hidden("Name", WorkContext.CurrentUser.UserName ?? "")
|
||||||
@Html.Hidden("Email", WorkContext.CurrentUser.Email ?? "")
|
@Html.Hidden("Email", WorkContext.CurrentUser.Email ?? "")
|
||||||
}
|
}
|
||||||
<fieldset class="what">
|
<fieldset class="what">
|
||||||
<div>
|
<ol>
|
||||||
|
<li>
|
||||||
<label for="CommentText">@if (Request.IsAuthenticated) { @T("Hi, {0}!", Html.Encode(WorkContext.CurrentUser.UserName))<br /> } @T("Comment")</label>
|
<label for="CommentText">@if (Request.IsAuthenticated) { @T("Hi, {0}!", Html.Encode(WorkContext.CurrentUser.UserName))<br /> } @T("Comment")</label>
|
||||||
<textarea id="CommentText" rows="10" cols="30" name="CommentText"></textarea>
|
<textarea id="CommentText" rows="10" cols="30" name="CommentText"></textarea>
|
||||||
</div>
|
</li>
|
||||||
<div>
|
<li>
|
||||||
<input type="submit" class="button" value="@T("Submit Comment")" />
|
<input type="submit" class="button" value="@T("Submit Comment")" />
|
||||||
@Html.Hidden("CommentedOn", (int)Model.ContentPart.ContentItem.Id)
|
@Html.Hidden("CommentedOn", (int)Model.ContentPart.ContentItem.Id)
|
||||||
@Html.Hidden("ReturnUrl", Context.Request.ToUrlString())
|
@Html.Hidden("ReturnUrl", Context.Request.ToUrlString())
|
||||||
@Html.AntiForgeryTokenOrchard()
|
@Html.AntiForgeryTokenOrchard()
|
||||||
</div>
|
</li>
|
||||||
|
</ol>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,7 +303,6 @@ label.forcheckbox { margin:0 0 0 .4em; display:inline; }
|
|||||||
fieldset { padding:0em; margin: 0 0 0em 0; border: 0px solid #dbdbdb; }
|
fieldset { padding:0em; margin: 0 0 0em 0; border: 0px solid #dbdbdb; }
|
||||||
legend { font-weight: 600; font-size:1.2em; }
|
legend { font-weight: 600; font-size:1.2em; }
|
||||||
|
|
||||||
|
|
||||||
input[type="text"], #CommentText, #password, #confirmPassword {
|
input[type="text"], #CommentText, #password, #confirmPassword {
|
||||||
border:1px solid #999;
|
border:1px solid #999;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -320,7 +319,9 @@ form.search {
|
|||||||
width:17em;
|
width:17em;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset div {margin:1.6em 0 0 0}
|
fieldset ol {list-style-type:none;}
|
||||||
|
|
||||||
|
fieldset ol li {margin:1.6em 0 0 0}
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
@@ -408,27 +409,26 @@ button:focus, .button:focus {
|
|||||||
|
|
||||||
ul.comments, form.comment {
|
ul.comments, form.comment {
|
||||||
margin:1.2em 0 1.2em 1.8em;
|
margin:1.2em 0 1.2em 1.8em;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.comment {
|
article.comment h4 {
|
||||||
font-size:1.3em;
|
font-size:1.4em;
|
||||||
font-style:italic;
|
|
||||||
color:#484848;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div.comment a {
|
article.comment a {
|
||||||
color:#484848;
|
color:#484848;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.comment span.who {
|
article.comment span.who {
|
||||||
font-weight:600;
|
font-weight:600;
|
||||||
font-style:normal;
|
font-style:normal;
|
||||||
text-transform:capitalize;
|
text-transform:capitalize;
|
||||||
color:#333;
|
color:#333;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.comments li div.text {
|
article.comment p.text {
|
||||||
margin:.6em 0 2.4em 0;
|
margin:.6em 0 2.4em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user