Delegating title positioning to Layout.cshtml.

--HG--
branch : dev
rename : src/Orchard.Web/Themes/TheAdmin/Views/BeforeContent.cshtml => src/Orchard.Web/Themes/TheAdmin/Views/Title.cshtml
This commit is contained in:
andrerod
2011-02-17 16:27:21 -08:00
parent fe5ef56ed9
commit 7ffb7e02d4
65 changed files with 106 additions and 89 deletions

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Create New Content").ToString()), "5"); @{ Layout.Title = T("Create New Content").ToString(); }
@foreach (var type in Model.ContentTypes) { @foreach (var type in Model.ContentTypes) {
<p>@Html.ActionLink((string)type.DisplayName, "Create", new { Area = "Contents", Id = (string)type.Name })</p> <p>@Html.ActionLink((string)type.DisplayName, "Create", new { Area = "Contents", Id = (string)type.Name })</p>

View File

@@ -2,7 +2,7 @@
var typeDisplayName = Model.ContentItem.TypeDefinition.DisplayName; var typeDisplayName = Model.ContentItem.TypeDefinition.DisplayName;
var pageTitle = T("Create {0}", typeDisplayName); var pageTitle = T("Create {0}", typeDisplayName);
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: (string)pageTitle.Text), "5"); Layout.Title = (string)pageTitle.Text;
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -5,7 +5,7 @@
pageTitle = T("Edit {0}", typeDisplayName); pageTitle = T("Edit {0}", typeDisplayName);
} }
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: pageTitle), "5"); Layout.Title = pageTitle;
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -8,7 +8,7 @@
createLinkText = T("Create New {0}", typeDisplayName); createLinkText = T("Create New {0}", typeDisplayName);
} }
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: pageTitle), "5"); Layout.Title = pageTitle;
} }
<div class="manage"> <div class="manage">

View File

@@ -1,6 +1,6 @@
@model dynamic @model dynamic
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Welcome to Orchard").ToString()), "5"); @{ Layout.Title = T("Welcome to Orchard").ToString(); }
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")</p> <p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")</p>
<p>@T("Have fun!")<br />@T("The Orchard Team")</p> <p>@T("Have fun!")<br />@T("The Orchard Team")</p>

View File

@@ -3,7 +3,7 @@
@using Orchard.Core.Navigation.Models; @using Orchard.Core.Navigation.Models;
@using Orchard.Core.Navigation.ViewModels; @using Orchard.Core.Navigation.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Main Menu").ToString()), "5"); @{ Layout.Title = T("Manage Main Menu").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
<table class="items"> <table class="items">

View File

@@ -1,7 +1,7 @@
@model DisplayReportViewModel @model DisplayReportViewModel
@using Orchard.Core.Reports.ViewModels; @using Orchard.Core.Reports.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Display Report").ToString()), "5"); @{ Layout.Title = T("Display Report").ToString(); }
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@model ReportsAdminIndexViewModel @model ReportsAdminIndexViewModel
@using Orchard.Core.Reports.ViewModels; @using Orchard.Core.Reports.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Reports").ToString()), "5"); @{ Layout.Title = T("Manage Reports").ToString(); }
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@model SiteCulturesViewModel @model SiteCulturesViewModel
@using Orchard.Core.Settings.ViewModels; @using Orchard.Core.Settings.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Cultures").ToString()), "5"); @{ Layout.Title = T("Cultures").ToString(); }
<p class="breadcrumb">@Html.ActionLink(T("Manage Settings").Text, "index")@T(" &#62; ")@T("Supported Cultures")</p> <p class="breadcrumb">@Html.ActionLink(T("Manage Settings").Text, "index")@T(" &#62; ")@T("Supported Cultures")</p>
<h3>@T("Available Cultures")</h3> <h3>@T("Available Cultures")</h3>

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Settings").ToString()), "5"); @{ Layout.Title = T("Manage Settings").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Create New Blog").ToString()), "5"); @{ Layout.Title = T("Create New Blog").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Blog Properties").ToString()), "5"); @{ Layout.Title = T("Blog Properties").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -2,7 +2,7 @@
@using Orchard.Core.Contents.ViewModels; @using Orchard.Core.Contents.ViewModels;
@using Orchard.Utility.Extensions; @using Orchard.Utility.Extensions;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Blogs").ToString()), "5"); @{ Layout.Title = T("Manage Blogs").ToString(); }
@if (Model.ContentItems.Items.Count > 0) { @if (Model.ContentItems.Items.Count > 0) {
<div class="actions"><a class="add button primaryAction" href="@Url.BlogCreate()">@T("New Blog")</a></div> <div class="actions"><a class="add button primaryAction" href="@Url.BlogCreate()">@T("New Blog")</a></div>

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Create New Blog Post").ToString()), "5"); @{ Layout.Title = T("Create New Blog Post").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Blog Post").ToString()), "5"); @{ Layout.Title = T("Edit Blog Post").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@using Orchard.Blogs.Extensions; @using Orchard.Blogs.Extensions;
@using Orchard.Blogs.Models; @using Orchard.Blogs.Models;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: (string)Model.Title), "5"); @{ Layout.Title = (string)Model.Title; }
@Display(Model.Header) @Display(Model.Header)
@Display(Model.Actions) @Display(Model.Actions)

View File

@@ -2,7 +2,7 @@
@using Orchard.Comments.Models; @using Orchard.Comments.Models;
@using Orchard.Comments.ViewModels; @using Orchard.Comments.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Comments for {0}", Model.DisplayNameForCommentedItem).ToString()), "5"); @{ Layout.Title = T("Comments for {0}", Model.DisplayNameForCommentedItem).ToString(); }
<div class="manage"> <div class="manage">
@if (Model.CommentsClosedOnItem) { @if (Model.CommentsClosedOnItem) {

View File

@@ -1,7 +1,7 @@
@model Orchard.Comments.ViewModels.CommentsEditViewModel @model Orchard.Comments.ViewModels.CommentsEditViewModel
@using Orchard.Comments.Models; @using Orchard.Comments.Models;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Comment").ToString()), "5"); @{ Layout.Title = T("Edit Comment").ToString(); }
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -6,9 +6,9 @@
@{ @{
Style.Require("Admin"); Style.Require("Admin");
Script.Require("ShapesBase"); Script.Require("ShapesBase");
}
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Comments").ToString()), "5"); Layout.Title = T("Manage Comments").ToString();
}
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,9 @@
@model Orchard.ContentTypes.ViewModels.AddFieldViewModel @model Orchard.ContentTypes.ViewModels.AddFieldViewModel
@{ Style.Require("ContentTypesAdmin"); } @{
Style.Require("ContentTypesAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString()), "5"); Layout.Title = T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString();
}
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,8 @@
@model Orchard.ContentTypes.ViewModels.AddPartsViewModel @model Orchard.ContentTypes.ViewModels.AddPartsViewModel
@{ Style.Require("ContentTypesAdmin"); } @{
Style.Require("ContentTypesAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add Parts To \"{0}\"", Model.Type.DisplayName).ToString()), "5"); Layout.Title = T("Add Parts To \"{0}\"", Model.Type.DisplayName).ToString();
}
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,6 +1,6 @@
@model Orchard.ContentTypes.ViewModels.CreateTypeViewModel @model Orchard.ContentTypes.ViewModels.CreateTypeViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("New Content Type").ToString()), "5"); @{ Layout.Title = T("New Content Type").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,6 +1,6 @@
@model Orchard.ContentTypes.ViewModels.CreatePartViewModel @model Orchard.ContentTypes.ViewModels.CreatePartViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("New Content Part").ToString()), "5"); @{ Layout.Title = T("New Content Part").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -3,9 +3,9 @@
Style.Require("ContentTypesAdmin"); Style.Require("ContentTypesAdmin");
Script.Require("jQuery"); Script.Require("jQuery");
Script.Include("admin.js"); Script.Include("admin.js");
}
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Content Type").ToString()), "5"); Layout.Title = T("Edit Content Type").ToString();
}
<p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@T("Edit Content Type")</p> <p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@T("Edit Content Type")</p>
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -3,9 +3,9 @@
Style.Require("ContentTypesAdmin"); Style.Require("ContentTypesAdmin");
Script.Require("jQuery"); Script.Require("jQuery");
Script.Include("admin.js"); Script.Include("admin.js");
}
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Part").ToString()), "5"); Layout.Title = T("Edit Part").ToString();
}
<p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@Html.ActionLink(T("Content Parts").Text, "listparts")@T(" &#62; ")@T("Edit Part")</p> <p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@Html.ActionLink(T("Content Parts").Text, "listparts")@T(" &#62; ")@T("Edit Part")</p>
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -1,7 +1,8 @@
@model Orchard.ContentTypes.ViewModels.ListContentTypesViewModel @model Orchard.ContentTypes.ViewModels.ListContentTypesViewModel
@{ Style.Require("ContentTypesAdmin"); } @{
Style.Require("ContentTypesAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Content Types").ToString()), "5"); Layout.Title = T("Manage Content Types").ToString();
}
<div class="manage"> <div class="manage">
@Html.ActionLink(T("Create new type").ToString(), "Create", new{Controller="Admin",Area="Orchard.ContentTypes"}, new { @class = "button primaryAction" }) @Html.ActionLink(T("Create new type").ToString(), "Create", new{Controller="Admin",Area="Orchard.ContentTypes"}, new { @class = "button primaryAction" })

View File

@@ -1,6 +1,6 @@
@model Orchard.ContentTypes.ViewModels.ListContentPartsViewModel @model Orchard.ContentTypes.ViewModels.ListContentPartsViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Content Parts").ToString()), "5"); @{ Layout.Title = T("Content Parts").ToString(); }
<p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@T("Content Parts")</p> <p class="breadcrumb">@Html.ActionLink(T("Content Types").Text, "index")@T(" &#62; ")@T("Content Parts")</p>
<div class="manage"> <div class="manage">

View File

@@ -1,7 +1,8 @@
@model Orchard.ContentTypes.ViewModels.RemoveFieldViewModel @model Orchard.ContentTypes.ViewModels.RemoveFieldViewModel
@{ Style.Require("ContentTypesAdmin"); } @{
Style.Require("ContentTypesAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Remove the \"{0}\" part from \"{1}\"", Model.Name, Model.Part.DisplayName).ToString()), "5"); Layout.Title = T("Remove the \"{0}\" part from \"{1}\"", Model.Name, Model.Part.DisplayName).ToString();
}
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
<p>@T("Looks like you couldn't use the fancy way to remove the field. Try hitting the button below to force the issue.")</p> <p>@T("Looks like you couldn't use the fancy way to remove the field. Try hitting the button below to force the issue.")</p>

View File

@@ -1,7 +1,8 @@
@model Orchard.ContentTypes.ViewModels.RemovePartViewModel @model Orchard.ContentTypes.ViewModels.RemovePartViewModel
@{ Style.Require("ContentTypesAdmin"); } @{
Style.Require("ContentTypesAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Remove the \"{0}\" part from \"{1}\"", Model.Name, Model.Type.DisplayName).ToString()), "5"); Layout.Title = T("Remove the \"{0}\" part from \"{1}\"", Model.Name, Model.Type.DisplayName).ToString();
}
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
<p>@T("Looks like you couldn't use the fancy way to remove the part. Try hitting the button below to force the issue.")</p> <p>@T("Looks like you couldn't use the fancy way to remove the part. Try hitting the button below to force the issue.")</p>

View File

@@ -1,6 +1,6 @@
@model Orchard.Indexing.ViewModels.IndexViewModel @model Orchard.Indexing.ViewModels.IndexViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Search Index Management").ToString()), "5"); @{ Layout.Title = T("Search Index Management").ToString(); }
@using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Indexing"})) { @using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Indexing"})) {
<fieldset> <fieldset>

View File

@@ -3,7 +3,8 @@
@{ @{
dynamic content = Model.Content; dynamic content = Model.Content;
content.Zones.Content.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0"); content.Zones.Content.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0");
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Translate Content").ToString()), "5");
Layout.Title = T("Translate Content").ToString();
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -1,9 +1,11 @@
@model Orchard.Media.ViewModels.MediaItemAddViewModel @model Orchard.Media.ViewModels.MediaItemAddViewModel
@using Orchard.Media.Helpers; @using Orchard.Media.Helpers;
@using Orchard.Media.Models; @using Orchard.Media.Models;
@{ Style.Require("MediaAdmin"); } @{
Style.Require("MediaAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add Media").ToString()), "5"); Layout.Title = T("Add Media").ToString();
}
<div class="breadCrumbs"> <div class="breadCrumbs">
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62; <p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62;

View File

@@ -1,9 +1,11 @@
@model Orchard.Media.ViewModels.MediaFolderCreateViewModel @model Orchard.Media.ViewModels.MediaFolderCreateViewModel
@using Orchard.Media.Helpers; @using Orchard.Media.Helpers;
@using Orchard.Media.Models; @using Orchard.Media.Models;
@{ Style.Require("MediaAdmin"); } @{
Style.Require("MediaAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add a Folder").ToString()), "5"); Layout.Title = T("Add a Folder").ToString();
}
<div class="breadCrumbs"> <div class="breadCrumbs">
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62; <p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62;

View File

@@ -2,9 +2,10 @@
@using Orchard.Media.Extensions; @using Orchard.Media.Extensions;
@using Orchard.Media.Helpers; @using Orchard.Media.Helpers;
@using Orchard.Media.Models; @using Orchard.Media.Models;
@{ Style.Require("MediaAdmin"); } @{
Style.Require("MediaAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Folder").ToString()), "5"); Layout.Title = T("Manage Folder").ToString();
}
<div class="breadCrumbs"> <div class="breadCrumbs">
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62; <p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62;

View File

@@ -2,9 +2,10 @@
@using Orchard.Media.Extensions; @using Orchard.Media.Extensions;
@using Orchard.Media.Helpers; @using Orchard.Media.Helpers;
@using Orchard.Media.Models; @using Orchard.Media.Models;
@{ Style.Require("MediaAdmin"); } @{
Style.Require("MediaAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Media - {0}", Model.Name).ToString()), "5"); Layout.Title = T("Edit Media - {0}", Model.Name).ToString();
}
<div class="breadCrumbs"> <div class="breadCrumbs">
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62; <p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62;

View File

@@ -1,9 +1,10 @@
@model Orchard.Media.ViewModels.MediaFolderEditPropertiesViewModel @model Orchard.Media.ViewModels.MediaFolderEditPropertiesViewModel
@using Orchard.Media.Helpers; @using Orchard.Media.Helpers;
@using Orchard.Media.Models; @using Orchard.Media.Models;
@{ Style.Require("MediaAdmin"); } @{
Style.Require("MediaAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Folder Properties").ToString()), "5"); Layout.Title = T("Folder Properties").ToString();
}
<div class="breadCrumbs"> <div class="breadCrumbs">
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62; <p>@Html.ActionLink(T("Media Folders").ToString(), "Index") &#62;

View File

@@ -1,7 +1,7 @@
@model Orchard.Media.ViewModels.MediaFolderIndexViewModel @model Orchard.Media.ViewModels.MediaFolderIndexViewModel
@using Orchard.Media.Extensions; @using Orchard.Media.Extensions;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Media Folders").ToString()), "5"); @{ Layout.Title = T("Manage Media Folders").ToString(); }
@Html.ValidationSummary() @Html.ValidationSummary()
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -9,7 +9,7 @@
Style.Require("Switchable"); Style.Require("Switchable");
Script.Require("Switchable"); Script.Require("Switchable");
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: "Modules"), "5"); Layout.Title = T("Modules").ToString();
} }
@if (Model.Features.Count() > 0) { @if (Model.Features.Count() > 0) {

View File

@@ -6,7 +6,7 @@
@{ @{
Style.Require("ModulesAdmin"); Style.Require("ModulesAdmin");
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: "Modules"), "5"); Layout.Title = T("Modules").ToString();
} }
@if (Model.InstallModules) { @if (Model.InstallModules) {

View File

@@ -1,6 +1,6 @@
@model Orchard.MultiTenancy.ViewModels.TenantAddViewModel @model Orchard.MultiTenancy.ViewModels.TenantAddViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add New Tenant").ToString()), "5"); @{ Layout.Title = T("Add New Tenant").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@model Orchard.MultiTenancy.ViewModels.TenantEditViewModel @model Orchard.MultiTenancy.ViewModels.TenantEditViewModel
@using Orchard.Environment.Configuration; @using Orchard.Environment.Configuration;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Tenant").ToString()), "5"); @{ Layout.Title = T("Edit Tenant").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,9 +1,10 @@
@model Orchard.MultiTenancy.ViewModels.TenantsIndexViewModel @model Orchard.MultiTenancy.ViewModels.TenantsIndexViewModel
@using Orchard.MultiTenancy.Extensions; @using Orchard.MultiTenancy.Extensions;
@{ Style.Require("MultiTenancyAdmin"); } @{
Style.Require("MultiTenancyAdmin");
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("List of Site's Tenants").ToString()), "5"); Layout.Title = T("List of Site's Tenants").ToString();
}
<div class="manage">@Html.ActionLink(T("Add a Tenant").ToString(), "Add", new {area = "Orchard.MultiTenancy"}, new { @class = "button primaryAction" })</div> <div class="manage">@Html.ActionLink(T("Add a Tenant").ToString(), "Add", new {area = "Orchard.MultiTenancy"}, new { @class = "button primaryAction" })</div>
<ul class="contentItems tenants"> <ul class="contentItems tenants">

View File

@@ -1,6 +1,6 @@
@model Orchard.Packaging.ViewModels.PackagingAddSourceViewModel @model Orchard.Packaging.ViewModels.PackagingAddSourceViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add a Feed").ToString()), "5"); @{ Layout.Title = T("Add a Feed").ToString(); }
@using ( Html.BeginFormAntiForgeryPost(Url.Action("AddSource")) ) { @using ( Html.BeginFormAntiForgeryPost(Url.Action("AddSource")) ) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -11,7 +11,7 @@
pageSizes.Add(defaultPageSize); pageSizes.Add(defaultPageSize);
} }
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: "Modules"), "5"); Layout.Title = T("Modules").ToString();
} }
@using ( Html.BeginFormAntiForgeryPost(Url.Action("Modules", "Gallery")) ) { @using ( Html.BeginFormAntiForgeryPost(Url.Action("Modules", "Gallery")) ) {

View File

@@ -1,6 +1,6 @@
@model Orchard.Packaging.ViewModels.PackagingSourcesViewModel @model Orchard.Packaging.ViewModels.PackagingSourcesViewModel
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Gallery Feeds").ToString()), "5"); @{ Layout.Title = T("Gallery Feeds").ToString(); }
<div class="manage"> <div class="manage">
@Html.ActionLink(T("Add Feed").Text, "AddSource", new { }, new { @class = "button primaryAction" }) @Html.ActionLink(T("Add Feed").Text, "AddSource", new { }, new { @class = "button primaryAction" })

View File

@@ -11,7 +11,7 @@
pageSizes.Add(defaultPageSize); pageSizes.Add(defaultPageSize);
} }
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: "Themes"), "5"); Layout.Title = T("Themes").ToString();
} }
@using ( Html.BeginFormAntiForgeryPost(Url.Action("Themes", "Gallery")) ) { @using ( Html.BeginFormAntiForgeryPost(Url.Action("Themes", "Gallery")) ) {

View File

@@ -1,5 +1,5 @@
@{ @{
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Install a Module").ToString()), "5"); Layout.Title = T("Install a Module").ToString();
using (Html.BeginFormAntiForgeryPost(Url.Action("AddModule", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request["returnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) { using (Html.BeginFormAntiForgeryPost(Url.Action("AddModule", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request["returnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -1,5 +1,5 @@
@{ @{
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Install a Theme").ToString()), "5"); Layout.Title = T("Install a Theme").ToString();
using (Html.BeginFormAntiForgeryPost(Url.Action("AddTheme", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request["returnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) { using (Html.BeginFormAntiForgeryPost(Url.Action("AddTheme", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request["returnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -1,7 +1,7 @@
@model RoleCreateViewModel @model RoleCreateViewModel
@using Orchard.Roles.ViewModels; @using Orchard.Roles.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add Role").ToString()), "5"); @{ Layout.Title = T("Add Role").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -1,7 +1,7 @@
@model RoleEditViewModel @model RoleEditViewModel
@using Orchard.Roles.ViewModels; @using Orchard.Roles.ViewModels;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Role").ToString()), "5"); @{ Layout.Title = T("Edit Role").ToString(); }
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -3,9 +3,9 @@
@using Orchard.Utility.Extensions; @using Orchard.Utility.Extensions;
@{ @{
Script.Require("ShapesBase"); Script.Require("ShapesBase");
}
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Roles").ToString()), "5"); Layout.Title = T("Manage Roles").ToString();
}
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -2,7 +2,7 @@
@using Orchard.ContentManagement; @using Orchard.ContentManagement;
@using Orchard.Utility.Extensions; @using Orchard.Utility.Extensions;
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage tag: {0}", Model.TagName).ToString()), "5"); @{ Layout.Title = T("Manage tag: {0}", Model.TagName).ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -4,10 +4,9 @@
@{ @{
Script.Require("ShapesBase"); Script.Require("ShapesBase");
Style.Require("TagsAdmin"); Style.Require("TagsAdmin");
Layout.Title = T("Manage Tags").ToString();
} }
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Tags").ToString()), "5");
@Html.ValidationSummary() @Html.ValidationSummary()
<div class="manage"> <div class="manage">
@Display.EditorTemplate(TemplateName: "Parts/CreateTag", Model: ViewData["CreateTag"] != null ? ViewData["CreateTag"] : new TagsAdminCreateViewModel()) @Display.EditorTemplate(TemplateName: "Parts/CreateTag", Model: ViewData["CreateTag"] != null ? ViewData["CreateTag"] : new TagsAdminCreateViewModel())

View File

@@ -4,7 +4,7 @@
@{ @{
Style.Require("ThemesAdmin"); Style.Require("ThemesAdmin");
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Themes").ToString()), "5"); Layout.Title = T("Themes").ToString();
} }
@if (Model.CurrentTheme == null) { @if (Model.CurrentTheme == null) {

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: "Add User"), "5"); @{ Layout.Title = T("Add User").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit User").ToString()), "5"); @{ Layout.Title = T("Edit User").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -11,7 +11,7 @@
pageSizes.Add(defaultPageSize); pageSizes.Add(defaultPageSize);
} }
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Users").ToString()), "5"); Layout.Title = T("Manage Users").ToString();
} }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add Layer").ToString()), "5"); @{ Layout.Title = T("Add Layer").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Add Widget").ToString()), "5"); @{ Layout.Title = T("Add Widget").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Layer").ToString()), "5"); @{ Layout.Title = T("Edit Layer").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -1,4 +1,4 @@
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Edit Widget").ToString()), "5"); @{ Layout.Title = T("Edit Widget").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary() @Html.ValidationSummary()

View File

@@ -3,9 +3,9 @@
@using Orchard.Widgets.ViewModels; @using Orchard.Widgets.ViewModels;
@{ @{
Style.Require("WidgetsAdmin"); Style.Require("WidgetsAdmin");
}
@WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: T("Manage Widgets").ToString()), "5"); Layout.Title = T("Manage Widgets").ToString();
}
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
Html.ValidationSummary(); Html.ValidationSummary();

View File

@@ -6,7 +6,6 @@
@using Orchard.ContentManagement; @using Orchard.ContentManagement;
@{ @{
SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
Style.Include("site.css"); Style.Include("site.css");
Style.Include("ie.css").UseCondition("lte IE 8").SetAttribute("media", "screen, projection"); Style.Include("ie.css").UseCondition("lte IE 8").SetAttribute("media", "screen, projection");
Style.Include("ie6.css").UseCondition("lte IE 6").SetAttribute("media", "screen, projection"); Style.Include("ie6.css").UseCondition("lte IE 6").SetAttribute("media", "screen, projection");
@@ -28,6 +27,10 @@
var thisUser = Html.Resolve<IAuthenticationService>().GetAuthenticatedUser(); var thisUser = Html.Resolve<IAuthenticationService>().GetAuthenticatedUser();
Model.Header.Add(Display.User(CurrentUser: thisUser)); Model.Header.Add(Display.User(CurrentUser: thisUser));
Model.Footer.Add(Display.OrchardVersion()); Model.Footer.Add(Display.OrchardVersion());
if (Model.Title != null) {
Model.Header.Add(Display.Title(Title: Model.Title));
}
} }

View File

@@ -126,7 +126,7 @@
<Content Include="TheAdmin\Views\LocalMenu.cshtml" /> <Content Include="TheAdmin\Views\LocalMenu.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="TheAdmin\Views\BeforeContent.cshtml" /> <Content Include="TheAdmin\Views\Title.cshtml" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />