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