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) {
<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 pageTitle = T("Create {0}", typeDisplayName);
WorkContext.Layout.BeforeContent.Add(New.BeforeContent(Title: (string)pageTitle.Text), "5");
Layout.Title = (string)pageTitle.Text;
}
@using (Html.BeginFormAntiForgeryPost()) {

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
@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("Have fun!")<br />@T("The Orchard Team")</p>

View File

@@ -3,7 +3,7 @@
@using Orchard.Core.Navigation.Models;
@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()) {
<table class="items">

View File

@@ -1,7 +1,7 @@
@model DisplayReportViewModel
@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()) {
@Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@model ReportsAdminIndexViewModel
@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()) {
@Html.ValidationSummary()

View File

@@ -1,7 +1,7 @@
@model SiteCulturesViewModel
@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>
<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()) {
@Html.ValidationSummary()