mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Moving script to end of page, and adding title and secondary zone
--HG-- branch : theming
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
@{
|
||||
var typeDisplayName = Model.ContentItem.TypeDefinition.DisplayName;
|
||||
var pageTitle = T("Edit Content");
|
||||
if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
|
||||
pageTitle = T("Edit {0}", typeDisplayName);
|
||||
}
|
||||
}
|
||||
|
||||
<h1>@Html.TitleForPage(pageTitle)</h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
@Display(Model)
|
||||
|
@@ -1,7 +1,11 @@
|
||||
content item -> @Model.ContentItem.ContentType
|
||||
|
||||
@Display(Model.primary)
|
||||
|
||||
<fieldset>
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
@Display(Model.primary)
|
||||
</div>
|
||||
<div class="secondary">
|
||||
@Display(Model.secondary)
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" name="submit.Save" value="@T("Save")"/>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
@@ -1,7 +1,7 @@
|
||||
@model Orchard.Core.Routable.ViewModels.RoutableEditorViewModel
|
||||
@using Orchard.Utility.Extensions
|
||||
@using Orchard.Mvc.Spooling
|
||||
|
||||
@Html.RegisterFootScript("jquery.slugify.js");
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.Title)
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "large text" })
|
||||
@@ -13,9 +13,12 @@
|
||||
<label for="@ViewData.TemplateInfo.GetFullHtmlFieldId("PromoteToHomePage")" class="forcheckbox">@T("Set as home page")</label>
|
||||
</fieldset>
|
||||
|
||||
@// todo: (sebros) add this script at the end of the page
|
||||
@/*
|
||||
<script type="text/javascript">
|
||||
@{
|
||||
Html.RegisterFootScript("jquery.slugify.js");
|
||||
|
||||
OutputStack.Push(new HtmlStringWriter());
|
||||
try {
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//pull slug input from tab order
|
||||
$("#@Html.FieldIdFor(m=>m.Slug)").attr("tabindex",-1);
|
||||
@@ -24,11 +27,17 @@
|
||||
if (slug.val()) { return true; }
|
||||
$(this).slugify({
|
||||
target:slug,
|
||||
url:"@Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})",
|
||||
contentType:"@Model.ContentType",
|
||||
id:"@Model.Id" @if (Model.ContainerId != null) { <text>, containerId:@Model.ContainerId</text> }
|
||||
id:"@Model.Id",
|
||||
@if (Model.ContainerId != null) {<text>containerId:@Model.ContainerId,</text>}
|
||||
url:"@Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})"
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
*/
|
||||
</script>
|
||||
}
|
||||
finally {
|
||||
var script = OutputStack.Pop();
|
||||
WorkContext.Page.Tail.Add(script);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user