More <%= to <%: cleanup.

--HG--
branch : dev
This commit is contained in:
Phil Haack
2010-06-10 23:39:49 -07:00
parent 758cfd3825
commit a48dd211a4
64 changed files with 176 additions and 180 deletions

View File

@@ -1,5 +1,5 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
<div class="manage">
<%: Html.ItemEditLinkWithReturnUrl(T("Edit"), Model.BodyAspect.ContentItem) %>
<%: Html.ItemEditLinkWithReturnUrl(T("Edit").ToString(), Model.BodyAspect.ContentItem) %>
</div>

View File

@@ -3,7 +3,7 @@
<%--//doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data
//also, doing this here, inline, until we have a pluggable processing model (both in and out)
//also, ...this is ugly--%>
<%=string.Format(
<%: new HtmlString(string.Format(
"<p>{0} {1}</p>",
Html.Excerpt(Model.Text, 200).ToString().Replace("\r\n", "</p>\r\n<p>"),
Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyAspect.ContentItem)) %>
Html.Excerpt(Model.Text, 200).ToString().Replace(Environment.NewLine, "</p>" + Environment.NewLine + "<p>"),
Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyAspect.ContentItem))) %>

View File

@@ -2,6 +2,6 @@
<%@ Import Namespace="Orchard.Core.Common.ViewModels" %>
<fieldset>
<label><%: T("Body")%></label>
<%=Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model) %>
<%: Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model) %>
<%: Html.ValidationMessageFor(m => m.Text) %>
</fieldset>

View File

@@ -1,7 +1,7 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContainerEditorViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.ViewModels" %>
<fieldset>
<%=Html.LabelFor(m=>m.ContainerId) %>
<%=Html.EditorFor(m=>m.ContainerId) %>
<%=Html.ValidationMessageFor(m=>m.ContainerId) %>
<%: Html.LabelFor(m=>m.ContainerId) %>
<%: Html.EditorFor(m=>m.ContainerId) %>
<%: Html.ValidationMessageFor(m=>m.ContainerId) %>
</fieldset>

View File

@@ -21,7 +21,7 @@
$("<%=String.Format("input#{0}Title", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>").blur(function(){
$(this).slugify({
target:$("<%=String.Format("input#{0}Slug", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>"),
url:"<%=Url.Slugify() %>",
url:"<%: Url.Slugify() %>",
contentType:"<%=Model.RoutableAspect.ContentItem.ContentType %>",
id:"<%=Model.RoutableAspect.ContentItem.Id %>"<%
var commonAspect = Model.RoutableAspect.ContentItem.As<ICommonAspect>();

View File

@@ -24,10 +24,10 @@ using (Html.BeginFormAntiForgeryPost()) { %>
foreach (var menuPartEntry in Model.MenuItemEntries) {
var i = menuPartEntryIndex; %>
<tr>
<td><input type="text" class="text-box" name="<%=Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Text) %>" value="<%=menuPartEntry.MenuItem.Text %>" /></td>
<td><input type="text" class="text-box" name="<%=Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Position) %>" value="<%=menuPartEntry.MenuItem.Position %>" /></td>
<td><% if (!menuPartEntry.IsMenuItem) { %><input type="text" class="text-box disabled" disabled="disabled" value="<%=menuPartEntry.MenuItem.Url %>" /><% } else { %><input type="text" class="text-box" name="<%=Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Url) %>" value="<%=menuPartEntry.MenuItem.Url %>" /><% } %></td>
<td><input type="hidden" name="<%=Html.NameOf(m => m.MenuItemEntries[i].MenuItemId) %>" value="<%=menuPartEntry.MenuItemId %>" /><a href="<%=Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = menuPartEntry.MenuItemId})) %>" class="remove"><%: T("Remove") %></a></td>
<td><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Text) %>" value="<%=menuPartEntry.MenuItem.Text %>" /></td>
<td><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Position) %>" value="<%=menuPartEntry.MenuItem.Position %>" /></td>
<td><% if (!menuPartEntry.IsMenuItem) { %><input type="text" class="text-box disabled" disabled="disabled" value="<%=menuPartEntry.MenuItem.Url %>" /><% } else { %><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Url) %>" value="<%=menuPartEntry.MenuItem.Url %>" /><% } %></td>
<td><input type="hidden" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItemId) %>" value="<%=menuPartEntry.MenuItemId %>" /><a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = menuPartEntry.MenuItemId})) %>" class="remove"><%: T("Remove") %></a></td>
</tr><%
++menuPartEntryIndex;
} %>

View File

@@ -4,12 +4,12 @@
<% Html.RegisterFootScript("jquery.slugify.js"); %>
<fieldset>
<%=Html.LabelFor(m => m.Title) %>
<%=Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %>
<%: Html.LabelFor(m => m.Title) %>
<%: Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %>
</fieldset>
<fieldset class="permalink">
<label class="sub" for="Slug"><%=_Encoded("Permalink")%><br /><span><%=Html.Encode(Request.ToRootUrlString())%>/<%:Model.DisplayLeadingPath %></span></label>
<span><%=Html.TextBoxFor(m => m.Slug, new { @class = "text" })%></span>
<label class="sub" for="Slug"><%: T("Permalink")%><br /><span><%: Request.ToRootUrlString()%>/<%: Model.DisplayLeadingPath %></span></label>
<span><%: Html.TextBoxFor(m => m.Slug, new { @class = "text" })%></span>
</fieldset>
@@ -17,14 +17,14 @@
<script type="text/javascript">
$(function(){
//pull slug input from tab order
$("#<%:Html.FieldIdFor(m=>m.Slug)%>").attr("tabindex",-1);
$("#<%:Html.FieldIdFor(m=>m.Title)%>").blur(function(){
$("#<%: Html.FieldIdFor(m=>m.Slug)%>").attr("tabindex",-1);
$("#<%: Html.FieldIdFor(m=>m.Title)%>").blur(function(){
$(this).slugify({
target:$("#<%:Html.FieldIdFor(m=>m.Slug)%>"),
url:"<%=Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})%>",
contentType:"<%=Model.ContentType %>",
url:"<%: Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})%>",
contentType:"<%: Model.ContentType %>",
id:"<%=Model.Id %>" <%if (Model.ContainerId != null) { %>,
containerId:<%=Model.ContainerId %><%} %>
containerId:<%: Model.ContainerId %><%} %>
})
})
})</script>

View File

@@ -1,6 +1,6 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<string>" %>
<div><%:Model %></div>
<% using (Html.BeginFormAntiForgeryPost(Url.Action("DeleteCulture", "Admin", new { area = "Settings" }), FormMethod.Post, new {@class = "inline link"})) { %>
<%=Html.Hidden("cultureName", Model, new { id = "" }) %>
<%: Html.Hidden("cultureName", Model, new { id = "" }) %>
<button type="submit" class="remove" title="<%:T("Delete") %>">x</button>
<% } %>

View File

@@ -4,8 +4,8 @@
<h1><%: Html.TitleForPage(T("Manage Blogs").ToString()) %></h1>
<%-- todo: Add helper text here when ready. <p><%: T("Possible text about setting up and managing a blog goes here.") %></p> --%><%
if (Model.Entries.Count() > 0) { %>
<div class="actions"><a class="add button primaryAction" href="<%=Url.BlogCreate() %>"><%: T("New Blog") %></a></div>
<%=Html.UnorderedList(Model.Entries, (entry, i) => {
<div class="actions"><a class="add button primaryAction" href="<%: Url.BlogCreate() %>"><%: T("New Blog") %></a></div>
<%: Html.UnorderedList(Model.Entries, (entry, i) => {
// Add blog post count rendering into "meta" zone
entry.ContentItemViewModel.Zones.AddAction("meta", html => {
int draftCount = entry.TotalPostCount - entry.ContentItemViewModel.Item.PostCount;

View File

@@ -4,7 +4,7 @@
<h1 class="page-title"><%: Html.TitleForPage(T("Archives").ToString(), Model.ArchiveData.Year.ToString(), Model.ArchiveData.Month > 0 ? new DateTime(Model.ArchiveData.Year, Model.ArchiveData.Month, 1).ToString("MMMM") : null, Model.ArchiveData.Day > 0 ? Model.ArchiveData.Day.ToString() : null)%></h1>
<div class="archive-trail">
<%=T("Archives").ToString()
<%: T("Archives").ToString()
%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year))
%><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : ""
%><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : ""

View File

@@ -2,7 +2,7 @@
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h1><a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%: Html.TitleForPage(Model.Item.Name) %></a>
<h1><a href="<%: Url.BlogForAdmin(Model.Item.Slug) %>"><%: Html.TitleForPage(Model.Item.Name) %></a>
</h1>
<% Html.Zone("manage"); %><%--
@@ -18,6 +18,6 @@
</fieldset>
</div>
</form>--%>
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item) %>" class="add button primaryAction"><%: T("New Post")%></a></div>
<div class="actions"><a href="<%: Url.BlogPostCreate(Model.Item) %>" class="add button primaryAction"><%: T("New Post")%></a></div>
<% Html.Zone("primary");
Html.ZonesAny(); %>

View File

@@ -4,10 +4,10 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<div class="summary">
<div class="related">
<a href="<%=Url.Blog(Model.Item.Slug) %>" title="<%: T("View") %>"><%: T("View") %></a><%: T(" | ")%>
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>" title="<%: T("Edit Posts") %>"><%: T("Edit Posts")%></a><%: T(" | ")%>
<a href="<%=Url.BlogPostCreate(Model.Item) %>" title="<%: T("New Post") %>"><%: T("New Post") %></a><%: T(" | ")%>
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" title="<%: T("Settings") %>"><%: T("Settings") %></a><%: T(" | ")%>
<a href="<%: Url.Blog(Model.Item.Slug) %>" title="<%: T("View") %>"><%: T("View") %></a><%: T(" | ")%>
<a href="<%: Url.BlogForAdmin(Model.Item.Slug) %>" title="<%: T("Edit Posts") %>"><%: T("Edit Posts")%></a><%: T(" | ")%>
<a href="<%: Url.BlogPostCreate(Model.Item) %>" title="<%: T("New Post") %>"><%: T("New Post") %></a><%: T(" | ")%>
<a href="<%: Url.BlogEdit(Model.Item.Slug) %>" title="<%: T("Settings") %>"><%: T("Settings") %></a><%: T(" | ")%>
<%-- todo: (heskew) this is waaaaa too verbose. need template helpers for all ibuttons --%>
<% using (Html.BeginFormAntiForgeryPost(Url.BlogDelete(Model.Item.Slug), FormMethod.Post, new { @class = "inline link" })) { %>
<button type="submit" class="linkButton" title="<%: T("Remove") %>"><%: T("Remove") %></button><%

View File

@@ -3,5 +3,5 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h2><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h2>
<div class="meta"><%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="content"><% Html.Zone("primary", ":manage :metadata");%></div>

View File

@@ -18,7 +18,7 @@
</li>
<li><%
if (Model.Item.HasDraft) { %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%=Html.PublishedState(Model.Item, T) %><%
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%: Html.PublishedState(Model.Item, T) %><%
}
else { %>
<%: T("No draft")%><%
@@ -27,7 +27,7 @@
<li><%
if (Model.Item.ScheduledPublishUtc.HasValue && Model.Item.ScheduledPublishUtc.Value > DateTime.UtcNow) { %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/scheduled.gif") %>" alt="<%: T("Scheduled") %>" title="<%: T("The post is scheduled for publishing") %>" /><%: T("Scheduled")%>
<%=Html.DateTime(Model.Item.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
<%: Html.DateTime(Model.Item.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
}
else if (Model.Item.IsPublished) { %>
<%: T("Published: {0}", Html.DateTimeRelative(Model.Item.As<ICommonAspect>().VersionPublishedUtc.Value, T)) %><%
@@ -41,17 +41,17 @@
</div>
<div class="related"><%
if (Model.Item.HasPublished){ %>
<a href="<%=Url.BlogPost(Model.Item) %>" title="<%: T("View Post")%>"><%: T("View")%></a><%: T(" | ")%><%
<a href="<%: Url.BlogPost(Model.Item) %>" title="<%: T("View Post")%>"><%: T("View")%></a><%: T(" | ")%><%
if (Model.Item.HasDraft) { %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
} %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostUnpublish(Model.Item)) %>" title="<%: T("Unpublish Post")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostUnpublish(Model.Item)) %>" title="<%: T("Unpublish Post")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
}
else { %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Post")%>"><%: T("Publish")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Post")%>"><%: T("Publish")%></a><%: T(" | ")%><%
} %>
<a href="<%=Url.BlogPostEdit(Model.Item) %>" title="<%: T("Edit Post")%>"><%: T("Edit")%></a><%: T(" | ")%>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostDelete(Model.Item)) %>" title="<%: T("Remove Post")%>"><%: T("Remove")%></a>
<a href="<%: Url.BlogPostEdit(Model.Item) %>" title="<%: T("Edit Post")%>"><%: T("Edit")%></a><%: T(" | ")%>
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostDelete(Model.Item)) %>" title="<%: T("Remove Post")%>"><%: T("Remove")%></a>
<br /><%Html.Zone("meta");%>
</div>
<div style="clear:both;"></div>

View File

@@ -5,6 +5,6 @@
Html.RegisterStyle("admin.css");
if (AuthorizedFor(Permissions.ManageBlogs)) { %>
<div class="folderProperties">
<p><a href="<%=Url.BlogEdit(Model.Slug) %>" class="edit"><%: T("Edit") %></a></p>
<p><a href="<%: Url.BlogEdit(Model.Slug) %>" class="edit"><%: T("Edit") %></a></p>
</div><%
} %>

View File

@@ -13,7 +13,7 @@
<input class="button primaryAction" type="submit" name="submit.Save" value="<%: T("Save") %>"/><%
//TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to
if (Model.Item.HasDraft && Model.Item.HasPublished) { %>
<%=Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"})%><%
<%: Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"})%><%
} %>
</fieldset>
</div>

View File

@@ -21,22 +21,22 @@
<%: Html.ValidationSummary() %>
<fieldset class="actions bulk">
<label for="publishActions"><%: T("Actions:") %></label>
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>">
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.None, T("Choose action..."))%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Approve, T("Approve"))%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Pend, T("Pend"))%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.MarkAsSpam, T("Mark as Spam"))%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Delete, T("Remove"))%>
<select id="publishActions" name="<%: Html.NameOf(m => m.Options.BulkAction)%>">
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.None, T("Choose action...").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Approve, T("Approve").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Pend, T("Pend").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.MarkAsSpam, T("Mark as Spam").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Delete, T("Remove").ToString())%>
</select>
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
</fieldset>
<fieldset class="actions bulk">
<label for="filterResults"><%: T("Filter:")%></label>
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>">
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.All, T("All Comments"))%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Approved, T("Approved Comments"))%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Pending, T("Pending Comments"))%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Spam, T("Spam"))%>
<select id="filterResults" name="<%: Html.NameOf(m => m.Options.Filter)%>">
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.All, T("All Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Approved, T("Approved Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Pending, T("Pending Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Spam, T("Spam").ToString())%>
</select>
<input class="button" type="submit" name="submit.Filter" value="<%: T("Apply") %>"/>
</fieldset>
@@ -67,8 +67,8 @@
%>
<tr>
<td>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id %>" name="<%=Html.NameOf(m => m.Comments[ci].Comment.Id) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[ci].IsChecked) %>"/>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id %>" name="<%: Html.NameOf(m => m.Comments[ci].Comment.Id) %>"/>
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.Comments[ci].IsChecked) %>"/>
<input type="hidden" value="<%=Model.DisplayNameForCommentedItem %>" name="DisplayNameForCommentedtem" />
<input type="hidden" value="<%=Model.CommentedItemId %>" name="CommentedItemId" />
</td>
@@ -83,11 +83,11 @@
<%: commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %><%: T(" ...") %>
<% } %>
</td>
<td><%=Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %></td>
<td><%: Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %></td>
<td>
<ul class="actions">
<li class="construct">
<a href="<%=Url.Action("Edit", new {commentEntry.Comment.Id}) %>" class="ibutton edit" title="<%: T("Edit Comment")%>"><%: T("Edit Comment")%></a>
<a href="<%: Url.Action("Edit", new {commentEntry.Comment.Id}) %>" class="ibutton edit" title="<%: T("Edit Comment")%>"><%: T("Edit Comment")%></a>
</li>
<li class="destruct">
<%-- a form in a form doesn't quite work <% using (Html.BeginFormAntiForgeryPost(Url.Action("Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}), FormMethod.Post, new { @class = "inline" })) { %>

View File

@@ -6,22 +6,22 @@
<%: Html.ValidationSummary() %>
<fieldset class="actions bulk">
<label for="publishActions"><%: T("Actions:") %></label>
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>">
<select id="publishActions" name="<%: Html.NameOf(m => m.Options.BulkAction)%>">
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, T("Choose action...").ToString()) %>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Approve, T("Approve")) %>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Pend, T("Pend")) %>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, T("Mark as Spam")) %>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, T("Remove"))%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Approve, T("Approve").ToString()) %>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Pend, T("Pend").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, T("Mark as Spam").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, T("Remove").ToString())%>
</select>
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
</fieldset>
<fieldset class="actions bulk">
<label for="filterResults"><%: T("Filter:")%></label>
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>">
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.All, T("All Comments")) %>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Approved, T("Approved Comments")) %>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Pending, T("Pending Comments")) %>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Spam, T("Spam"))%>
<select id="filterResults" name="<%: Html.NameOf(m => m.Options.Filter)%>">
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.All, T("All Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Approved, T("Approved Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Pending, T("Pending Comments").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Spam, T("Spam").ToString())%>
</select>
<input class="button" type="submit" name="submit.Filter" value="<%: T("Apply") %>"/>
</fieldset>
@@ -54,8 +54,8 @@
%>
<tr>
<td>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id %>" name="<%=Html.NameOf(m => m.Comments[ci].Comment.Id) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[ci].IsChecked) %>"/>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id %>" name="<%: Html.NameOf(m => m.Comments[ci].Comment.Id) %>"/>
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.Comments[ci].IsChecked) %>"/>
</td>
<td><% if (commentEntry.Comment.Status == CommentStatus.Spam) { %><%: T("Spam") %><% }
else if (commentEntry.Comment.Status == CommentStatus.Pending) { %><%: T("Pending") %><% }
@@ -67,12 +67,12 @@
<%: commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %><%: T(" ...") %>
<% } %>
</td>
<td><%=Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %></td>
<td><%: Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %></td>
<td><%: Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn }) %></td>
<td>
<ul class="actions">
<li class="construct">
<a href="<%=Url.Action("Edit", new {commentEntry.Comment.Id}) %>" title="<%: T("Edit")%>"><%: T("Edit")%></a>
<a href="<%: Url.Action("Edit", new {commentEntry.Comment.Id}) %>" title="<%: T("Edit")%>"><%: T("Edit")%></a>
</li>
<li class="destruct">
<%-- a form in a form doesn't quite work <% using (Html.BeginFormAntiForgeryPost(Url.Action("Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}), FormMethod.Post, new { @class = "inline" })) { %>

View File

@@ -1,4 +1,4 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<CommentCountViewModel>" %>
<%@ Import Namespace="Orchard.Comments.Extensions"%>
<%@ Import Namespace="Orchard.Comments.ViewModels"%>
<span class="commentcount"><%=Html.CommentSummaryLinks(T, Model.Item, Model.CommentCount, Model.PendingCount)%></span>
<span class="commentcount"><%: Html.CommentSummaryLinks(T, Model.Item, Model.CommentCount, Model.PendingCount)%></span>

View File

@@ -16,7 +16,7 @@ if (Model.CommentsActive == false) {
}
else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) { %>
<h2 id="addacomment"><%: T("Add a Comment") %></h2>
<p class="info message"><%=T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
<p class="info message"><%: T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
}
else { %>
<% using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment" })) { %>
@@ -46,7 +46,7 @@ else { %>
}%>
<fieldset class="what">
<div>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%=T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%: T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<textarea id="CommentText" rows="10" cols="30" name="CommentText"></textarea>
</div>
<div>

View File

@@ -4,14 +4,14 @@
<%@ Import Namespace="Orchard.Comments.Models" %>
<fieldset>
<%-- todo: (heskew) pull the legend and put the link to the comments elsewhere? --%>
<legend><%: T("Comments")%><% if (Model.Comments.Count > 0) { %> <span>&#150; <%=Html.CommentSummaryLinks(T, Model.ContentItem, Model.Comments.Count, Model.PendingComments.Count)%></span><% } %></legend>
<legend><%: T("Comments")%><% if (Model.Comments.Count > 0) { %> <span>&#150; <%: Html.CommentSummaryLinks(T, Model.ContentItem, Model.Comments.Count, Model.PendingComments.Count)%></span><% } %></legend>
<%--
todo: (heskew) can get into a weird state if this is disabled but comments are active so, yeah, comment settings on a content item need to be hashed out
<%: Html.EditorFor(m => m.CommentsShown) %>
<label class="forcheckbox" for="CommentsShown"><%=T("Comments are shown. Existing comments are displayed.") %></label>
<label class="forcheckbox" for="CommentsShown"><%: T("Comments are shown. Existing comments are displayed.") %></label>
--%>
<%: Html.EditorFor(m => m.CommentsActive) %>
<label class="forcheckbox" for="CommentsActive">
<%=T("Allow new comments") %></label> <span class="hint forcheckbox">
<%=T("Enable to show the comment form. Disabling still allows the existing comments to be shown but does not allow the conversation to continue.")%></span>
<%: T("Allow new comments") %></label> <span class="hint forcheckbox">
<%: T("Enable to show the comment form. Disabling still allows the existing comments to be shown but does not allow the conversation to continue.")%></span>
</fieldset>

View File

@@ -6,7 +6,7 @@ foreach (var comment in Model) { %>
<div class="comment">
<span class="who"><%: Html.LinkOrDefault(comment.Record.UserName, comment.Record.SiteName, new { rel = "nofollow" })%></span>
<%-- todo: (heskew) need comment permalink --%>
<span>said <%: Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault()), "#")%></span>
<span>said <%: Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).ToString(), "#")%></span>
</div>
<div class="text">
<%-- todo: (heskew) comment text needs processing depending on comment markup style --%>

View File

@@ -12,9 +12,9 @@
<%: T("ContentType:")%>
<%=Model.Item.ContentItem.ContentType %><br />
<%: T("DisplayText:")%>
<%=Html.ItemDisplayText(Model.Item) %><br />
<%: Html.ItemDisplayText(Model.Item) %><br />
<%: T("Links:")%>
<%=Html.ItemDisplayLink(T("view").ToString(), Model.Item) %> <%=Html.ItemEditLink(T("edit").ToString(), Model.Item) %>
<%: Html.ItemDisplayLink(T("view").ToString(), Model.Item) %> <%: Html.ItemEditLink(T("edit").ToString(), Model.Item) %>
</p>
<h2><%: T("Content Item Parts")%></h2>
<ul>

View File

@@ -12,8 +12,8 @@
<%foreach(var item in Model.Items.OrderBy(x=>x.Id)){%>
<li>
<%: Html.ActionLink(T("{0}: {1}", item.Id, item.ContentType).ToString(), "details", "content", new{item.Id},new{}) %>
<%=Html.ItemDisplayLink(T("view").ToString(), item) %>
<%=Html.ItemEditLink(T("edit").ToString(), item) %>
<%: Html.ItemDisplayLink(T("view").ToString(), item) %>
<%: Html.ItemEditLink(T("edit").ToString(), item) %>
</li>
<%}%>
</ul>

View File

@@ -18,7 +18,7 @@
<% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
<%: Html.ValidationSummary() %>
<fieldset>
<label for="pageTitle"><%=T("File Path <span> - multiple files must be in a zipped folder</span>")%></label>
<label for="pageTitle"><%: T("File Path <span> - multiple files must be in a zipped folder</span>")%></label>
<input id="MediaItemPath" name="MediaItemPath" type="file" class="text" value="<%: T("Browse") %>" size="64"/>
<span class="hint"><%: T("After your files have been uploaded, you can edit the titles and descriptions.")%></span>
<input type="hidden" id="FolderName" name="FolderName" value="<%: Model.FolderName %>" />

View File

@@ -24,11 +24,11 @@ Html.RegisterStyle("admin.css"); %>
<fieldset>
<%-- todo: make these real (including markup) --%>
<div>
<label><%=T("Dimensions: <span>500 x 375 pixels</span>")%></label>
<label><%: T("Dimensions: <span>500 x 375 pixels</span>")%></label>
<label><%=T("Size: <span>{0}</span>", Model.Size)%></label>
<label><%: T("Size: <span>{0}</span>", Model.Size)%></label>
<label><%=T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label>
<label><%: T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label>
</div>
<div>
<label for="embedPath"><%: T("Embed:")%></label>
@@ -61,9 +61,9 @@ Html.RegisterStyle("admin.css"); %>
<div><img src="<%=ResolveUrl("~/Media/" + Html.Encode(Model.RelativePath + "/" + Model.Name))%>" class="previewImage" alt="<%: Model.Caption %>" /></div>
<ul>
<%-- todo: make these real (including markup)
<li><label><%=T("Dimensions: <span>500 x 375 pixels</span>")%></label></li>
<li><label><%=T("Size: <span>{0}</span>", Model.Size)%></label></li>
<li><label><%=T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label></li>
<li><label><%: T("Dimensions: <span>500 x 375 pixels</span>")%></label></li>
<li><label><%: T("Size: <span>{0}</span>", Model.Size)%></label></li>
<li><label><%: T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label></li>
<li>
<label for="embedPath"><%: T("Embed:")%></label>
<input id="embedPath" class="text" name="embedPath" type="text" readonly="readonly" value="<%: T("<img src=\"{0}\" width=\"{1}\" height=\"{2}\" alt=\"{3}\" />", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption) %>" />

View File

@@ -25,7 +25,7 @@
%>
<tr class="<%=contentTypeClass %>">
<td>
<%= Html.ActionLink(item.Name, "ContentTypeList", new {id=item.Name})%>
<%: Html.ActionLink(item.Name, "ContentTypeList", new {id=item.Name})%>
</td>
</tr>
@@ -60,7 +60,7 @@ using (Html.BeginFormAntiForgeryPost(Url.Action("Save",new {id=Model.SelectedCon
<input name="<%="part_" + item.Name%>" type="checkbox" /><%}%>
</td>
<td class="ContentTypePartListRowItem">
<%= Html.Encode(item.Name)%>
<%: item.Name%>
</td>
</tr>

View File

@@ -33,7 +33,7 @@
featureClassName += " first";
if (feature == features.Last())
featureClassName += " last"; %>
<li class="<%=featureClassName %>" id="<%=Html.AttributeEncode(featureId) %>" title="<%=T("{0} is {1}", Html.AttributeEncode(feature.Descriptor.Name), featureState) %>">
<li class="<%: featureClassName %>" id="<%: featureId %>" title="<%: T("{0} is {1}", Html.AttributeEncode(feature.Descriptor.Name), featureState) %>">
<div class="summary">
<div class="properties">
<h3><%:feature.Descriptor.Name %></h3>

View File

@@ -15,7 +15,7 @@
<p><%: module.Description %></p><%
} %>
<ul class="pageStatus" style="color:#666; margin:.6em 0 0 0;">
<li><%=T("Features: {0}", string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray())) %></li>
<li><%: T("Features: {0}", string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray())) %></li>
<li>&nbsp;&#124;&nbsp;<%: T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? module.Author : (new []{"Bradley", "Bertrand", "Renaud", "Suha", "Sebastien", "Jon", "Nathan", "Erik"})[(module.DisplayName.Length + (new Random()).Next()) % 7]) %></li><%-- very efficient, I know --%>
<li>&nbsp;&#124;&nbsp;<%: T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : T("<a href=\"http://orchardproject.net\">http://orchardproject.net</a>").ToString())%></li>
</ul>

View File

@@ -5,27 +5,27 @@
<%@ Import Namespace="Orchard.Pages.ViewModels"%><%
Html.RegisterStyle("admin.css"); %>
<h1><%=Html.TitleForPage(T("Manage Pages").ToString())%></h1>
<h1><%: Html.TitleForPage(T("Manage Pages").ToString())%></h1>
<%-- todo: Add helper text here when ready. <p><%: T("Possible text about setting up a page goes here.")%></p>--%>
<div class="manage"><%: Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div><%
using (Html.BeginFormAntiForgeryPost()) { %>
<%: Html.ValidationSummary()%>
<fieldset class="actions bulk">
<label for="publishActions"><%: T("Actions:")%></label>
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction) %>">
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.None, T("Choose action..."))%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.PublishNow, T("Publish Now"))%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Unpublish, T("Unpublish"))%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Delete, T("Remove"))%>
<select id="publishActions" name="<%: Html.NameOf(m => m.Options.BulkAction) %>">
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.None, T("Choose action...").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.PublishNow, T("Publish Now").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Unpublish, T("Unpublish").ToString())%>
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Delete, T("Remove").ToString())%>
</select>
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
</fieldset>
<fieldset class="actions bulk">
<label for="filterResults"><%: T("Filter:")%></label>
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter) %>">
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.All, T("All Pages"))%>
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Published, T("Published Pages"))%>
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Offline, T("Offline Pages"))%>
<select id="filterResults" name="<%: Html.NameOf(m => m.Options.Filter) %>">
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.All, T("All Pages").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Published, T("Published Pages").ToString())%>
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Offline, T("Offline Pages").ToString())%>
</select>
<input class="button" type="submit" name="submit.Filter" value="<%: T("Apply") %>"/>
</fieldset>
@@ -37,8 +37,8 @@ using (Html.BeginFormAntiForgeryPost()) { %>
<li>
<div class="summary">
<div class="properties">
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked) %>"/>
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%: Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.PageEntries[pi].IsChecked) %>"/>
<h3><%: Html.ActionLink(pageEntry.Page.Title, "Edit", new { id = pageEntry.PageId })%></h3>
<ul class="pageStatus">
<li><%
@@ -62,7 +62,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>
<li><%
if (pageEntry.Page.ScheduledPublishUtc.HasValue && pageEntry.Page.ScheduledPublishUtc.Value > DateTime.UtcNow) { %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%: T("Scheduled") %>" title="<%: T("The page is scheduled for publishing") %>" /><%: T("Scheduled")%>
<%=Html.DateTime(pageEntry.Page.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
<%: Html.DateTime(pageEntry.Page.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
}
else if (pageEntry.Page.IsPublished) { %>
<%: T("Published: {0}", Html.DateTimeRelative(pageEntry.Page.As<ICommonAspect>().VersionPublishedUtc.Value, T)) %><%
@@ -78,15 +78,15 @@ using (Html.BeginFormAntiForgeryPost()) { %>
if (pageEntry.Page.HasPublished) { %>
<%: Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug }, new {title = T("View Page")})%><%: T(" | ")%><%
if (pageEntry.Page.HasDraft) { %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
} %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.Action("Unpublish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Unpublish Page")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Unpublish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Unpublish Page")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
}
else { %>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Page")%>"><%: T("Publish")%></a><%: T(" | ")%><%
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Page")%>"><%: T("Publish")%></a><%: T(" | ")%><%
} %>
<%: Html.ActionLink(T("Edit"), "Edit", new {id = pageEntry.Page.Id}, new {title = T("Edit Page")})%><%: T(" | ")%>
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = pageEntry.Page.Id})) %>" title="<%: T("Remove Page")%>"><%: T("Remove")%></a>
<%: Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.Page.Id }, new { title = T("Edit Page").ToString() })%><%: T(" | ")%>
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = pageEntry.Page.Id})) %>" title="<%: T("Remove Page")%>"><%: T("Remove")%></a>
</div>
<div style="clear:both;"></div>
</div>

View File

@@ -3,7 +3,7 @@
<%@ Import Namespace="Orchard.ContentManagement"%>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<h3><a href="<%=Url.Action(T("Item").ToString(), "Page", new { area = "Orchard.Pages", slug = Model.Item.Slug }) %>"><%: Model.Item.Title %></a></h3>
<h3><a href="<%: Url.Action(T("Item").ToString(), "Page", new { area = "Orchard.Pages", slug = Model.Item.Slug }) %>"><%: Model.Item.Title %></a></h3>
<div class="content">
<% Html.Zone("primary", ":manage :metadata"); %>
</div>

View File

@@ -13,7 +13,7 @@
<input class="button primaryAction" type="submit" name="submit.Save" value="<%: T("Save") %>"/><%
//TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to
if (Model.Item.HasDraft && Model.Item.HasPublished) { %>
<%=Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Pages", Controller = "Admin", id = Model.Item.Id}), new {@class = "button"})%><%
<%: Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Pages", Controller = "Admin", id = Model.Item.Id}), new {@class = "button"})%><%
} %>
</fieldset>
</div>

View File

@@ -8,7 +8,7 @@
</div>
<% Html.Zone("metatop"); %>
<div class="actions">
<%=Html.ItemEditLink(T("Edit this page").ToString(), Model.Item) %>
<%: Html.ItemEditLink(T("Edit this page").ToString(), Model.Item) %>
<%: Html.ActionLink(T("Return to list").ToString(), "index") %>
<% Html.Zone("actions"); %>
</div>

View File

@@ -1,3 +1,3 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IContent>" %>
<%@ Import Namespace="Orchard.ContentManagement"%>
<h2><%=Html.ItemDisplayLink(Model) %></h2>
<h2><%: Html.ItemDisplayLink(Model) %></h2>

View File

@@ -1,16 +1,16 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchIndexViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %><%
Html.RegisterStyle("admin.css"); %>
<h1><%=Html.TitleForPage(T("Search Index Management").ToString()) %></h1><%
<h1><%: Html.TitleForPage(T("Search Index Management").ToString()) %></h1><%
using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Search"})) { %>
<fieldset>
<p><%=T("The search index was last updated {0}. <button type=\"submit\" title=\"Update the search index.\" class=\"primaryAction\">Update</button>", Html.DateTimeRelative(Model.IndexUpdatedUtc, T))%></p>
<%=Html.AntiForgeryTokenOrchard() %>
<p><%: T("The search index was last updated {0}. <button type=\"submit\" title=\"Update the search index.\" class=\"primaryAction\">Update</button>", Html.DateTimeRelative(Model.IndexUpdatedUtc, T))%></p>
<%: Html.AntiForgeryTokenOrchard() %>
</fieldset><%
}
using (Html.BeginForm("rebuild", "admin", FormMethod.Post, new {area = "Orchard.Search"})) { %>
<fieldset>
<p><%=T("Rebuild the search index for a fresh start. <button type=\"submit\" title=\"Rebuild the search index.\">Rebuild</button>") %></p>
<%=Html.AntiForgeryTokenOrchard() %>
<p><%: T("Rebuild the search index for a fresh start. <button type=\"submit\" title=\"Rebuild the search index.\">Rebuild</button>") %></p>
<%: Html.AntiForgeryTokenOrchard() %>
</fieldset><%
} %>

View File

@@ -1,17 +1,17 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %><%
Html.RegisterStyle("search.css"); %>
<h1><%=Html.TitleForPage(T("Search").Text)%></h1><%
<h1><%: Html.TitleForPage(T("Search").Text)%></h1><%
Html.Zone("search");
if (!string.IsNullOrWhiteSpace(Model.Query)) {
if (Model.PageOfResults.Count() == 0) { %>
<p class="search-summary"><%=T("<em>zero</em> results") %></p><%
<p class="search-summary"><%: T("<em>zero</em> results") %></p><%
}
else { %>
<p class="search-summary"><%=T("<em>{0} - {1}</em> of <em>{2}</em> results", Model.PageOfResults.StartPosition, Model.PageOfResults.EndPosition, Model.PageOfResults.TotalItemCount)%></p><%
<p class="search-summary"><%: T("<em>{0} - {1}</em> of <em>{2}</em> results", Model.PageOfResults.StartPosition, Model.PageOfResults.EndPosition, Model.PageOfResults.TotalItemCount)%></p><%
}
}
if (Model.PageOfResults != null && Model.PageOfResults.Count() > 0) { %>
<%: Html.UnorderedList(Model.PageOfResults, (r, i) => Html.DisplayForItem(r.Content).ToHtmlString() , "search-results contentItems") %>
<%=Html.Pager(Model.PageOfResults, Model.PageOfResults.PageNumber, Model.DefaultPageSize, new {q = Model.Query}) %><%
<%: Html.Pager(Model.PageOfResults, Model.PageOfResults.PageNumber, Model.DefaultPageSize, new {q = Model.Query}) %><%
} %>

View File

@@ -2,7 +2,7 @@
<%@ Import Namespace="Orchard.Search.ViewModels" %><%
using(Html.BeginForm("index", "search", new { area = "Orchard.Search" }, FormMethod.Get, new { @class = "search" })) { %>
<fieldset>
<%=Html.TextBox("q", Model.Query) %>
<button type="submit"><%=T("Search") %></button>
<%: Html.TextBox("q", Model.Query) %>
<button type="submit"><%: T("Search") %></button>
</fieldset><%
} %>

View File

@@ -1,6 +1,6 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SetupViewModel>" %>
<%@ Import Namespace="Orchard.Setup.ViewModels"%>
<h1><%: Html.TitleForPage(T("Get Started"))%></h1>
<h1><%: Html.TitleForPage(T("Get Started").ToString())%></h1>
<%
using (Html.BeginFormAntiForgeryPost()) { %>
<%: Html.ValidationSummary() %>

View File

@@ -5,9 +5,9 @@
<%: Html.ValidationSummary() %>
<fieldset class="actions bulk">
<label for="publishActions"><%: T("Actions:") %></label>
<select id="publishActions" name="<%=Html.NameOf(m => m.BulkAction)%>">
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, T("Choose action..."))%>
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, T("Remove"))%>
<select id="publishActions" name="<%: Html.NameOf(m => m.BulkAction)%>">
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, T("Choose action...").ToString())%>
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, T("Remove").ToString())%>
</select>
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
</fieldset>
@@ -33,8 +33,8 @@
%>
<tr>
<td>
<input type="hidden" value="<%=Model.Tags[tagIndex].Tag.Id%>" name="<%=Html.NameOf(m => m.Tags[ti].Tag.Id)%>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[ti].IsChecked)%>"/>
<input type="hidden" value="<%=Model.Tags[tagIndex].Tag.Id%>" name="<%: Html.NameOf(m => m.Tags[ti].Tag.Id)%>"/>
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.Tags[ti].IsChecked)%>"/>
</td>
<td>
<%: Html.ActionLink(Html.Encode(tagEntry.Tag.TagName), "Search", new {id = tagEntry.Tag.Id}) %>

View File

@@ -15,8 +15,8 @@
</thead>
<% foreach (var contentItem in Model.Contents) { %>
<tr>
<td><%=Html.ItemDisplayText(contentItem) %></td>
<td><%=Html.ItemDisplayLink(contentItem) %></td>
<td><%: Html.ItemDisplayText(contentItem) %></td>
<td><%: Html.ItemDisplayLink(contentItem) %></td>
</tr>
<% } %>
</table>

View File

@@ -1,5 +1,5 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TagsSearchViewModel>" %>
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
<% Html.AddTitleParts(T("Tags").ToString(), T("Contents tagged with {0}", Model.TagName).ToString()); %>
<h1 class="page-title"><%=T("Contents tagged with <span>{0}</span>", Html.Encode(Model.TagName)) %></h1>
<h1 class="page-title"><%: T("Contents tagged with <span>{0}</span>", Html.Encode(Model.TagName)) %></h1>
<%: Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "taggedPosts contentItems") %>

View File

@@ -9,7 +9,7 @@
} else {
%><h3><%: T("Current Theme")%> - <%: Model.CurrentTheme.DisplayName %></h3>
<%=Html.Image(Html.ThemePath(Model.CurrentTheme, "/Theme.png"), Html.Encode(Model.CurrentTheme.DisplayName), new { @class = "themePreviewImage" })%>
<%: Html.Image(Html.ThemePath(Model.CurrentTheme, "/Theme.png"), Html.Encode(Model.CurrentTheme.DisplayName), new { @class = "themePreviewImage" })%>
<h5><%: T("By") %> <%: Model.CurrentTheme.Author %></h5>
<p>
@@ -27,7 +27,7 @@
%> <li>
<div>
<h3><%: theme.DisplayName %></h3>
<%=Html.Image(Html.ThemePath(theme, "/Theme.png"), Html.Encode(theme.DisplayName), null)%>
<%: Html.Image(Html.ThemePath(theme, "/Theme.png"), Html.Encode(theme.DisplayName), null)%>
<% using (Html.BeginFormAntiForgeryPost(Url.Action("Activate"), FormMethod.Post, new { @class = "inline" })) { %>
<%: Html.Hidden("themeName", theme.ThemeName)%>
<button type="submit" title="<%: T("Activate") %>"><%: T("Activate") %></button>

View File

@@ -58,9 +58,9 @@ html.dyn #themepreview button.preview { display:none; }
<div id="themepreview">
<% using(Html.BeginFormAntiForgeryPost(Url.Action("Preview", new{Controller="Admin", Area="Orchard.Themes"}), FormMethod.Post, new { @class = "inline" })) { %>
<fieldset>
<span><%=T("You are previewing: ")%></span>
<span><%: T("You are previewing: ")%></span>
<%: Html.Hidden("ReturnUrl", Context.Request.RawUrl)%>
<%=Html.DropDownList("ThemeName", Model.Themes, new {onChange = "this.form.submit();"})%>
<%: Html.DropDownList("ThemeName", Model.Themes, new {onChange = "this.form.submit();"})%>
<button type="submit" class="preview" title="<%: T("Preview")%>" name="submit.Preview" value="<%: T("Preview")%>"><%: T("Preview")%></button>
<button type="submit" title="<%: T("Apply")%>" name="submit.Apply" value="<%: T("Apply")%>"><%: T("Apply this theme") %></button>
<button type="submit" class="cancel" title="<%: T("Cancel")%>" name="submit.Cancel" value="<%: T("Cancel")%>"><%: T("Cancel")%></button>

View File

@@ -2,7 +2,7 @@
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<div id="logindisplay">
<% if (Request.IsAuthenticated) { %>
<%= T("Welcome, <strong>{0}</strong>!", Page.User.Identity.Name) %>
<%: T("Welcome, <strong>{0}</strong>!", Page.User.Identity.Name) %>
<%: Html.ActionLink(T("Log Off").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })%>
&nbsp;&#124;&nbsp;<%: Html.ActionLink("Admin", "Index", new {Area = "Dashboard", Controller = "Admin"})%>
<% } else { %>

View File

@@ -1,7 +1,7 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyEditorViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
<% Html.RegisterScript("tiny_mce.js"); %>
<%=Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><%
<%: Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><%
using (this.Capture("end-of-page-scripts")) {%>
<script type="text/javascript">
tinyMCE.init({
@@ -15,9 +15,9 @@ using (this.Capture("end-of-page-scripts")) {%>
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
convert_urls: false,
addmedia_action: "<%=Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"}) %>",
addmedia_path: "<%= Model.AddMediaPath %>",
request_verification_token: "<%=Html.AntiForgeryTokenValueOrchard() %>"
addmedia_action: "<%: Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"}) %>",
addmedia_path: "<%: Model.AddMediaPath %>",
request_verification_token: "<%: Html.AntiForgeryTokenValueOrchard() %>"
});
</script><%
}%>

View File

@@ -4,5 +4,5 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog meta"><a href="<%=Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blog meta"><a href="<%: Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blogdescription"><p><%: Model.Item.Description %></p></div>

View File

@@ -4,7 +4,7 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%Model.Zones.AddRenderPartial("zonetest", "ZoneTest", Model); %>
<h2><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h2>
<div class="meta"><%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="postsummary">
<% Html.Zone("primary"); %>
</div>

View File

@@ -7,7 +7,7 @@
What I have in this template is as close as I can get at the moment. --%>
<%--<div class="metadata">
<% if (Model.Item.Creator != null) {
%><div class="posted"><%: T("Posted by {0} {1}", Model.Item.Creator.UserName, Html.PublishedWhen(Model.Item)) %><% -- | <a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit"><%: T("Edit") %></a>-- %></div><%
%><div class="posted"><%: T("Posted by {0} {1}", Model.Item.Creator.UserName, Html.PublishedWhen(Model.Item)) %><% -- | <a href="<%: Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit"><%: T("Edit") %></a>-- %></div><%
} %>
</div>
--%>

View File

@@ -4,5 +4,5 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog meta"><a href="<%=Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blog meta"><a href="<%: Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blogdescription"><p><%: Model.Item.Description %></p></div>

View File

@@ -4,7 +4,7 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%Model.Zones.AddRenderPartial("zonetest", "ZoneTest", Model); %>
<h2><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h2>
<div class="meta"><%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="postsummary">
<% Html.Zone("primary"); %>
</div>

View File

@@ -7,7 +7,7 @@
What I have in this template is as close as I can get at the moment. --%>
<%--<div class="metadata">
<% if (Model.Item.Creator != null) {
%><div class="posted"><%: T("Posted by {0} {1}", Model.Item.Creator.UserName, Html.PublishedWhen(Model.Item)) %><% -- | <a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit"><%: T("Edit") %></a>-- %></div><%
%><div class="posted"><%: T("Posted by {0} {1}", Model.Item.Creator.UserName, Html.PublishedWhen(Model.Item)) %><% -- | <a href="<%: Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit"><%: T("Edit") %></a>-- %></div><%
} %>
</div>
--%>

View File

@@ -4,7 +4,7 @@
<h1 class="page-title"><%: Html.TitleForPage(T("Archives").ToString(), Model.ArchiveData.Year.ToString(), Model.ArchiveData.Month > 0 ? new DateTime(Model.ArchiveData.Year, Model.ArchiveData.Month, 1).ToString("MMMM") : null, Model.ArchiveData.Day > 0 ? Model.ArchiveData.Day.ToString() : null)%></h1>
<div class="archive-trail">
<%=T("Archives").ToString()
<%: T("Archives").ToString()
%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year))
%><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : ""
%><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : ""

View File

@@ -16,7 +16,7 @@ if (Model.CommentsActive == false) {
}
else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) { %>
<h2 id="addacomment"><%: T("Add a Comment") %></h2>
<p class="info message"><%=T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
<p class="info message"><%: T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
}
else { %>
<% using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment-form" })) { %>
@@ -46,7 +46,7 @@ else { %>
}%>
<fieldset class="what">
<div>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%=T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%: T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<textarea id="CommentText" rows="10" cols="30" name="CommentText"></textarea>
</div>
<div>

View File

@@ -23,7 +23,7 @@
<div class="home-hero-container">
<div class="home-hero">
<%-- Init jQuery Slider --%>
<script src="<%= Url.Content("~/Themes/Contoso/Scripts/easySlider.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Themes/Contoso/Scripts/easySlider.js") %>" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#slider").easySlider({

View File

@@ -4,7 +4,7 @@
<h1 class="page-title"><%: Html.TitleForPage(T("Archives").ToString(), Model.ArchiveData.Year.ToString(), Model.ArchiveData.Month > 0 ? new DateTime(Model.ArchiveData.Year, Model.ArchiveData.Month, 1).ToString("MMMM") : null, Model.ArchiveData.Day > 0 ? Model.ArchiveData.Day.ToString() : null)%></h1>
<div class="archive-trail">
<%=T("Archives").ToString()
<%: T("Archives").ToString()
%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year))
%><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : ""
%><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : ""

View File

@@ -15,7 +15,7 @@ if (Model.CommentsActive == false) {
}
else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) { %>
<h2 id="addacomment"><%: T("Add a Comment") %></h2>
<p class="info message"><%=T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
<p class="info message"><%: T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%></p><%
}
else { %>
<% using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment-form" })) { %>
@@ -45,7 +45,7 @@ else { %>
}%>
<fieldset class="what">
<div>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%=T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<label for="CommentText"><% if (Request.IsAuthenticated) { %><%: T("Hi, {0}!", Html.Encode(Page.User.Identity.Name)) %><br /><% } %><%: T("Comment") %></label>
<textarea id="CommentText" rows="10" cols="30" name="CommentText"></textarea>
</div>
<div>

View File

@@ -32,7 +32,7 @@
<%-- Home Hero --%>
<div class="main-box">
<div class="top">
<img src="<%= Url.Content("~/Themes/Corporate/Content/Images/content-top.png") %>" /></div>
<img src="<%: Url.Content("~/Themes/Corporate/Content/Images/content-top.png") %>" /></div>
<div class="content group">
<% Html.Zone("home-hero-gallery"); %>
@@ -41,7 +41,7 @@
</div>
<div class="bottom">
<img src="<%= Url.Content("~/Themes/Corporate/Content/Images/content-bottom.png") %>" /></div>
<img src="<%: Url.Content("~/Themes/Corporate/Content/Images/content-bottom.png") %>" /></div>
</div>
<%-- Main Content Area --%>

View File

@@ -32,7 +32,7 @@
<%-- Content Hero --%>
<div class="main-box">
<div class="top">
<img src="<%= Url.Content("~/Themes/Corporate/Content/Images/content-top.png") %>" /></div>
<img src="<%: Url.Content("~/Themes/Corporate/Content/Images/content-top.png") %>" /></div>
<div class="content">
<div class="subpage group">
<div class="sub-content">
@@ -57,7 +57,7 @@
</div>
<div class="bottom">
<img src="<%= Url.Content("~/Themes/Corporate/Content/Images/content-bottom.png") %>" /></div>
<img src="<%: Url.Content("~/Themes/Corporate/Content/Images/content-bottom.png") %>" /></div>
</div>
</div>

View File

@@ -7,7 +7,7 @@ foreach (var comment in Model) { %>
<p><%: comment.Record.CommentText %></p>
</div>
<div class="commentauthor">
<span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>&nbsp;<span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).Text, "#")%></span>
<span class="who"><%: Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>&nbsp;<span>said <%: Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).Text, "#")%></span>
</div>
</li><%
} %>

View File

@@ -3,5 +3,5 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog meta"><a href="<%=Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blog meta"><a href="<%: Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blogdescription"><p><%: Model.Item.Description %></p></div>

View File

@@ -3,7 +3,7 @@
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h3>
<div class="meta"><%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="postsummary">
<% Html.Zone("primary"); %>
</div>

View File

@@ -7,7 +7,7 @@ foreach (var comment in Model) { %>
<p><%: comment.Record.CommentText %></p>
</div>
<div class="commentauthor">
<span class="who"><%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%></span>&nbsp;<span>said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).Text, "#")%></span>
<span class="who"><%: Html.LinkOrDefault(comment.Record.UserName, comment.Record.SiteName, new { rel = "nofollow" })%></span>&nbsp;<span>said <%: Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).Text, "#")%></span>
</div>
</li><%
} %>

View File

@@ -13,10 +13,6 @@ namespace Orchard.Localization {
return new LocalizedString(x);
}
public static implicit operator string(LocalizedString x) {
return x.ToString();
}
public string Text {
get { return _localized; }
}

View File

@@ -28,11 +28,11 @@ namespace Orchard.Mvc.Html {
public static string FieldNameFor<T, TResult>(this HtmlHelper<T> html, Expression<Func<T, TResult>> expression) {
return html.ViewData.TemplateInfo.GetFullHtmlFieldName(ExpressionHelper.GetExpressionText(expression));
}
public static string FieldIdFor<T, TResult>(this HtmlHelper<T> html, Expression<Func<T, TResult>> expression) {
return html.ViewData.TemplateInfo.GetFullHtmlFieldId(ExpressionHelper.GetExpressionText(expression));
}
public static MvcHtmlString SelectOption<T>(this HtmlHelper html, T currentValue, T optionValue, string text) {
return SelectOption(html, optionValue, object.Equals(optionValue, currentValue), text);
}
@@ -53,9 +53,9 @@ namespace Orchard.Mvc.Html {
#region Pager
public static string Pager<T>(this HtmlHelper html, IPageOfItems<T> pageOfItems, int currentPage, int defaultPageSize, object values = null, string previousText = "<", string nextText = ">", bool alwaysShowPreviousAndNext = false) {
public static IHtmlString Pager<T>(this HtmlHelper html, IPageOfItems<T> pageOfItems, int currentPage, int defaultPageSize, object values = null, string previousText = "<", string nextText = ">", bool alwaysShowPreviousAndNext = false) {
if (pageOfItems.TotalPageCount < 2)
return "";
return new HtmlString(string.Empty);
var sb = new StringBuilder(75);
var rvd = new RouteValueDictionary {{"q", ""},{"page", 0}};
@@ -114,7 +114,7 @@ namespace Orchard.Mvc.Html {
sb.Append("</p>");
return sb.ToString();
return new HtmlString(sb.ToString());
}
#endregion
@@ -356,28 +356,28 @@ namespace Orchard.Mvc.Html {
}
public static IHtmlString AntiForgeryTokenValueOrchardLink(this HtmlHelper htmlHelper, string linkContents, string href, IDictionary<string, object> htmlAttributes) {
return htmlHelper.Link(linkContents, htmlHelper.AntiForgeryTokenGetUrl(href), htmlAttributes);
return htmlHelper.Link(linkContents, htmlHelper.AntiForgeryTokenGetUrl(href).ToString(), htmlAttributes);
}
#endregion
#region AntiForgeryTokenGetUrl
public static string AntiForgeryTokenGetUrl(this HtmlHelper htmlHelper, string baseUrl) {
return string.Format("{0}{1}__RequestVerificationToken={2}", baseUrl, baseUrl.IndexOf('?') > -1 ? "&" : "?", htmlHelper.ViewContext.HttpContext.Server.UrlEncode(htmlHelper.AntiForgeryTokenValueOrchard()));
public static IHtmlString AntiForgeryTokenGetUrl(this HtmlHelper htmlHelper, string baseUrl) {
return new HtmlString(string.Format("{0}{1}__RequestVerificationToken={2}", baseUrl, baseUrl.IndexOf('?') > -1 ? "&" : "?", htmlHelper.ViewContext.HttpContext.Server.UrlEncode(htmlHelper.AntiForgeryTokenValueOrchard().ToString())));
}
#endregion
#region AntiForgeryTokenValueOrchard
public static string AntiForgeryTokenValueOrchard(this HtmlHelper htmlHelper) {
public static IHtmlString AntiForgeryTokenValueOrchard(this HtmlHelper htmlHelper) {
//HAACK: (erikpo) Since MVC doesn't expose any of its methods for generating the antiforgery token and setting the cookie, we'll just let it do its thing and parse out what we need
var field = htmlHelper.AntiForgeryTokenOrchard().ToHtmlString();
var beginIndex = field.IndexOf("value=\"") + 7;
var endIndex = field.IndexOf("\"", beginIndex);
return field.Substring(beginIndex, endIndex - beginIndex);
return new HtmlString(field.Substring(beginIndex, endIndex - beginIndex));
}
#endregion