mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixed issues caught when pre-compiling views. Note that I temporarily added an implicit conversion from LocalizedString to String. This may go away with Louis's pending changes.
--HG-- branch : dev
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="secondary">
|
||||
<% Html.Zone("secondary");%>
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" name="submit.Save" value="<%=_Encoded("Save") %>"/>
|
||||
<input class="button primaryAction" type="submit" name="submit.Save" value="<%: T("Save") %>"/>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
@@ -23,13 +23,13 @@
|
||||
<li class="previous">
|
||||
<h4><%=year %> <span>(<%=yearMonths.Sum(ym => ym.Value) %>)</span></h4><%
|
||||
} %>
|
||||
<%: Html.UnorderedList(yearMonths, (t, i) => Html.Link(string.Format("{0:MMMM} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %>
|
||||
<%: Html.UnorderedList(yearMonths, (t, i) => Html.Link(string.Format("{0:MMMM} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)).ToString(), "archiveMonthList") %>
|
||||
</li><%
|
||||
} %>
|
||||
</ul><%
|
||||
}
|
||||
else { %>
|
||||
<%: Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %><%
|
||||
<%: Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)).ToString(), "archiveMonthList") %><%
|
||||
}
|
||||
}
|
||||
else { %>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3><%: Html.Link(s, Url.BlogPostEdit(Model.Item))%></h3>
|
||||
<h3><%: Html.Link(Model.Item.Title, Url.BlogPostEdit(Model.Item))%></h3>
|
||||
<ul>
|
||||
<li><%
|
||||
if (Model.Item.HasPublished) { %>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<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, CommentIndexBulkAction.None, T("Choose action...")) %>
|
||||
<%: 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")) %>
|
||||
|
@@ -40,5 +40,5 @@ Exported as xml</h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%:Html.TextAreaFor(m=>m.ExportText, new{style="width:100%;height:640px;"}) %>
|
||||
<br />
|
||||
<input class="button primaryAction" type="submit" value="<%=_Encoded("Merge Changes") %>" />
|
||||
<input class="button primaryAction" type="submit" value="<%: T("Merge Changes") %>" />
|
||||
<%} %>
|
||||
|
@@ -68,7 +68,7 @@ using (Html.BeginFormAntiForgeryPost(Url.Action("Save",new {id=Model.SelectedCon
|
||||
|
||||
</table>
|
||||
<p>
|
||||
<input type="submit" value="<%=_Encoded("Save") %>" />
|
||||
<input type="submit" value="<%: T("Save") %>" />
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<h4><%: T("Depends on:")%></h4>
|
||||
<%: Html.UnorderedList(
|
||||
feature.Descriptor.Dependencies.OrderBy(s => s),
|
||||
(s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))),
|
||||
(s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))).ToString(),
|
||||
"",
|
||||
"dependency",
|
||||
"") %>
|
||||
|
@@ -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))) )).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> | <%: 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> | <%: T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : T("<a href=\"http://orchardproject.net\">http://orchardproject.net</a>").ToString())%></li>
|
||||
</ul>
|
||||
|
@@ -12,6 +12,10 @@ namespace Orchard.Localization {
|
||||
return new LocalizedString(x);
|
||||
}
|
||||
|
||||
public static implicit operator string(LocalizedString x) {
|
||||
return x.ToString();
|
||||
}
|
||||
|
||||
public string Text {
|
||||
get { return _localized; }
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<RootNamespace>Orchard.Web</RootNamespace>
|
||||
<AssemblyName>Orchard.Web</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<MvcBuildViews>true</MvcBuildViews>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
Reference in New Issue
Block a user