<commit_before>﻿@model Orchard.Core.Routable.ViewModels.RoutableEditorViewModel
@using Orchard.Utility.Extensions

<fieldset>
    @Html.LabelFor(m => m.Title)
    @Html.TextBoxFor(m => m.Title, new { @class = "large text" })
</fieldset>
<fieldset class="permalink">
    <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>
    @Html.EditorFor(m => m.PromoteToHomePage)
    <label for="@ViewData.TemplateInfo.GetFullHtmlFieldId("PromoteToHomePage")" class="forcheckbox">@T("Set as home page")</label>
</fieldset>
@//todo: IResourceManager -> Html.RegisterFootScript("jquery.slugify.js");
@using(Capture(script => WorkContext.Page.Tail.Add(script))){
	<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(){
				var slug = $("#@Html.FieldIdFor(m=>m.Slug)");
				if (slug.val()) { return true; }
				$(this).slugify({
					target:slug,
					contentType:"@Model.ContentType",
					id:"@Model.Id",
					@if (Model.ContainerId != null) {<text>containerId:@Model.ContainerId,</text>}
					url:"@Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})"
				})
			})
		})
	</script> 
}<commit_msg>Use resource manager in routable template<commit_after>﻿@model Orchard.Core.Routable.ViewModels.RoutableEditorViewModel
@using Orchard.Utility.Extensions
@Script.Require("Slugify");

<fieldset>
    @Html.LabelFor(m => m.Title)
    @Html.TextBoxFor(m => m.Title, new { @class = "large text" })
</fieldset>
<fieldset class="permalink">
    <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>
    @Html.EditorFor(m => m.PromoteToHomePage)
    <label for="@ViewData.TemplateInfo.GetFullHtmlFieldId("PromoteToHomePage")" class="forcheckbox">@T("Set as home page")</label>
</fieldset>
@using(Capture(script => WorkContext.Page.Tail.Add(script))){
	<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(){
				var slug = $("#@Html.FieldIdFor(m=>m.Slug)");
				if (slug.val()) { return true; }
				$(this).slugify({
					target:slug,
					contentType:"@Model.ContentType",
					id:"@Model.Id",
					@if (Model.ContainerId != null) {<text>containerId:@Model.ContainerId,</text>}
					url:"@Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})"
				})
			})
		})
	</script> 
}
{'fraction_non_alphanumeric': 0.21229656419529838, 'fraction_numerical': 0.0007233273056057866, 'mean_word_length': 5.092511013215859, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4944055', 'n_tokens_mistral': 1077, 'n_tokens_neox': 986, 'n_words': 141}