Fix Razor views single line comment syntax

@// is not valid anymore, use "@* ... *@" instead

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-10-07 10:53:02 -07:00
parent 1e826830f2
commit 833beaad3b
13 changed files with 24 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
@model Orchard.Core.PublishLater.ViewModels.PublishLaterViewModel @model Orchard.Core.PublishLater.ViewModels.PublishLaterViewModel
<ul class="pageStatus"> <ul class="pageStatus">
<li>@// Published or not <li>@* Published or not *@
@if (Model.HasPublished) { @if (Model.HasPublished) {
<img class="icon" src="@Href("~/Core/PublishLater/Content/Admin/images/online.gif")" alt="@T("Online")" title="@T("The page is currently online")" /> <text>@T("Published")&nbsp;&#124;&nbsp;</text> <img class="icon" src="@Href("~/Core/PublishLater/Content/Admin/images/online.gif")" alt="@T("Online")" title="@T("The page is currently online")" /> <text>@T("Published")&nbsp;&#124;&nbsp;</text>
} }
@@ -9,7 +9,7 @@
} }
</li> </li>
<li> <li>
@// Does the page have a draft @* Does the page have a draft *@
@if (Model.HasDraft) { @if (Model.HasDraft) {
<img class="icon" src="@Href("~/Core/PublishLater/Content/Admin/images/draft.gif")" alt="@T("Draft")" title="@T("The page has a draft")" /><text> @T("Draft")&nbsp;&#124;&nbsp;</text> <img class="icon" src="@Href("~/Core/PublishLater/Content/Admin/images/draft.gif")" alt="@T("Draft")" title="@T("The page has a draft")" /><text> @T("Draft")&nbsp;&#124;&nbsp;</text>
} }

View File

@@ -28,7 +28,7 @@
</div> </div>
</fieldset> </fieldset>
<script type="text/javascript"> $(function () { <script type="text/javascript"> $(function () {
@//todo: (heskew) make a plugin @* todo: (heskew) make a plugin *@
$("label.forpicker").each(function () { $("label.forpicker").each(function () {
var $this = $(this); var $this = $(this);
var pickerInput = $("#" + $this.attr("for")); var pickerInput = $("#" + $this.attr("for"));

View File

@@ -12,8 +12,8 @@
//todo: (heskew) have resource modules that can be leaned on (like a jQuery module that knows about various CDNs and jQuery's version and min naming schemes) //todo: (heskew) have resource modules that can be leaned on (like a jQuery module that knows about various CDNs and jQuery's version and min naming schemes)
//todo: (heskew) this is an interim solution to inlude jQuery in every page and still allow that to be overriden in some theme by it containing a headScripts partial //todo: (heskew) this is an interim solution to inlude jQuery in every page and still allow that to be overriden in some theme by it containing a headScripts partial
} }
@//Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model); @* Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model); *@
@//Html.Zone("head", ":metas :styles :scripts"); %> @* Html.Zone("head", ":metas :styles :scripts"); %> *@
@Display(Model.Head) @Display(Model.Head)
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script> <script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
</head> </head>

View File

@@ -1,4 +1,4 @@
@// Html.RegisterStyle("site.css"); @* Html.RegisterStyle("site.css"); *@
@{ @{
Model.Header.Add(Display.Header(), "5"); Model.Header.Add(Display.Header(), "5");
Model.Header.Add(Display.User(), "10"); Model.Header.Add(Display.User(), "10");

View File

@@ -11,7 +11,7 @@
@Display(Model.secondary) @Display(Model.secondary)
<fieldset> <fieldset>
<input class="button primaryAction" type="submit" name="submit.Save" value="@T("Save")"/> <input class="button primaryAction" type="submit" name="submit.Save" value="@T("Save")"/>
@//TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to @* TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to *@
@if (blogPost.HasDraft && blogPost.HasPublished) { @if (blogPost.HasDraft && blogPost.HasPublished) {
@Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"}) @Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"})
} }

View File

@@ -6,7 +6,7 @@
<a href="@Url.BlogForAdmin((string)Model.Slug)" title="@T("List Posts")">@T("List Posts")</a>@T(" | ") <a href="@Url.BlogForAdmin((string)Model.Slug)" title="@T("List Posts")">@T("List Posts")</a>@T(" | ")
<a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" title="@T("New Post")">@T("New Post")</a>@T(" | ") <a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" title="@T("New Post")">@T("New Post")</a>@T(" | ")
<a href="@Url.BlogEdit((string)Model.Slug)" title="@T("Edit")">@T("Edit")</a>@T(" | ") <a href="@Url.BlogEdit((string)Model.Slug)" title="@T("Edit")">@T("Edit")</a>@T(" | ")
@//todo: (heskew) this is a bit too verbose. need template helpers for all ibuttons @* todo: (heskew) this is a bit too verbose. need template helpers for all ibuttons *@
@using (Html.BeginFormAntiForgeryPost(Url.BlogRemove((string)Model.Slug), FormMethod.Post, new { @class = "inline link" })) { @using (Html.BeginFormAntiForgeryPost(Url.BlogRemove((string)Model.Slug), FormMethod.Post, new { @class = "inline link" })) {
<button type="submit" class="linkButton" title="@T("Remove")">@T("Remove")</button> <button type="submit" class="linkButton" title="@T("Remove")">@T("Remove")</button>
} }
@@ -14,7 +14,7 @@
<div class="properties"> <div class="properties">
<h3>@Html.Link((string)Model.Title, Url.BlogForAdmin((string)Model.Slug))</h3> <h3>@Html.Link((string)Model.Title, Url.BlogForAdmin((string)Model.Slug))</h3>
<p>@Display(Model.meta)</p> <p>@Display(Model.meta)</p>
@//<p>[list of authors] [modify blog access]</p> @* <p>[list of authors] [modify blog access]</p> *@
<p>@Model.Description</p> <p>@Model.Description</p>
</div> </div>
<div style="clear:both;"></div> <div style="clear:both;"></div>

View File

@@ -9,9 +9,9 @@
<fieldset> <fieldset>
<label for="DisplayName">@T("Display Name")</label> <label for="DisplayName">@T("Display Name")</label>
@Html.TextBoxFor(m => m.DisplayName, new { @class = "textMedium" }) @Html.TextBoxFor(m => m.DisplayName, new { @class = "textMedium" })
@// todo: if we continue to go down the midrodata route, some helpers would be nice @* todo: if we continue to go down the midrodata route, some helpers would be nice *@
<meta itemprop="DisplayName" content="@Model.DisplayName" /> <meta itemprop="DisplayName" content="@Model.DisplayName" />
@// has unintended consequences (renamging the type) - changing the name creates a new type of that name @* has unintended consequences (renamging the type) - changing the name creates a new type of that name *@
<meta itemprop="Name" content="@Model.Name" /> <meta itemprop="Name" content="@Model.Name" />
@Html.HiddenFor(m => m.Name) @Html.HiddenFor(m => m.Name)
</fieldset> </fieldset>

View File

@@ -6,7 +6,7 @@
@Html.ValidationSummary() @Html.ValidationSummary()
<fieldset> <fieldset>
<label for="Name">@T("Name")</label> <label for="Name">@T("Name")</label>
@// has unintended consequences (renamging the part) - changing the name creates a new part of that name @* has unintended consequences (renamging the part) - changing the name creates a new part of that name *@
@Html.TextBoxFor(m => m.Name, new {@class = "textMedium", disabled = "disabled"}) @Html.TextBoxFor(m => m.Name, new {@class = "textMedium", disabled = "disabled"})
@Html.HiddenFor(m => m.Name) @Html.HiddenFor(m => m.Name)
</fieldset> </fieldset>

View File

@@ -2,7 +2,7 @@
<fieldset class="manage-field"> <fieldset class="manage-field">
<h3>@Model.Name <span>(@Model.FieldDefinition.Name)</span></h3> <h3>@Model.Name <span>(@Model.FieldDefinition.Name)</span></h3>
<div class="manage"> <div class="manage">
@Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) @// <- some experimentation @Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) @* <- some experimentation *@
</div> </div>
<div class="details"> <div class="details">
@{Html.RenderTemplates(Model.Templates);} @{Html.RenderTemplates(Model.Templates);}

View File

@@ -2,7 +2,7 @@
<fieldset class="manage-part" itemscope="itemscope" itemid="@Model.PartDefinition.Name" itemtype="http://orchardproject.net/data/ContentTypePart"> <fieldset class="manage-part" itemscope="itemscope" itemid="@Model.PartDefinition.Name" itemtype="http://orchardproject.net/data/ContentTypePart">
<h3 itemprop="Name">@Model.PartDefinition.DisplayName</h3> <h3 itemprop="Name">@Model.PartDefinition.DisplayName</h3>
<div class="manage"> <div class="manage">
@Html.ActionLink(T("Remove").Text, "RemovePartFrom", new { area = "Orchard.ContentTypes", id = Model.Type.Name, Model.PartDefinition.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) @// <- some experimentation @Html.ActionLink(T("Remove").Text, "RemovePartFrom", new { area = "Orchard.ContentTypes", id = Model.Type.Name, Model.PartDefinition.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) @* <- some experimentation *@
</div> </div>
<div class="details">@Html.EditorFor(m => m.PartDefinition.Fields, "TypePartFields", "PartDefinition") <div class="details">@Html.EditorFor(m => m.PartDefinition.Fields, "TypePartFields", "PartDefinition")
@if (Model.Templates.Any()) { @if (Model.Templates.Any()) {
@@ -13,7 +13,7 @@
} }
</div> </div>
} }
@//don't show global part settings for now - @Html.DisplayFor(m => m.PartDefinition.Settings, "Settings", "PartDefinition") @* don't show global part settings for now - @Html.DisplayFor(m => m.PartDefinition.Settings, "Settings", "PartDefinition") *@
@Html.HiddenFor(m => m.PartDefinition.Name) @Html.HiddenFor(m => m.PartDefinition.Name)
@Html.HiddenFor(m => m.Index) @Html.HiddenFor(m => m.Index)
</div> </div>

View File

@@ -4,11 +4,11 @@
Style.Include("blog.css"); Style.Include("blog.css");
} }
<div id="wrapper"> <div id="wrapper">
@// HTML.Include will render a div with a class="user-display" @* HTML.Include will render a div with a class="user-display" *@
@// Can use this -> {Html.Include("User");} @* Can use this -> {Html.Include("User");} *@
@// or the following. At least they appear to do the same thing currently. The first is a standard Html.Include, the second "displays the (New) User shape" @* or the following. At least they appear to do the same thing currently. The first is a standard Html.Include, the second "displays the (New) User shape" *@
@Display.User() @Display.User()
@// Top Navigation and branding @* Top Navigation and branding *@
<div id="headercontainer"> <div id="headercontainer">
<div id="header"> <div id="header">
<h1>@WorkContext.CurrentSite.SiteName</h1> <h1>@WorkContext.CurrentSite.SiteName</h1>
@@ -21,14 +21,14 @@
<div id="main"> <div id="main">
<div id="content"> <div id="content">
@// Main Content @* Main Content *@
@Display(Model.Content) @Display(Model.Content)
</div> </div>
<div id="sidebar"> <div id="sidebar">
@Display(Model.search) @Display(Model.search)
@Display(Model.sidebar) @Display(Model.sidebar)
</div> </div>
@// End Content @* End Content *@
@Display.Footer(Navigation:Model.Navigation) @Display.Footer(Navigation:Model.Navigation)
</div> </div>
</div> </div>

View File

@@ -12,7 +12,7 @@
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script> <script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
</head> </head>
<body> <body>
@// Layout (template) is in the Body zone @ the default position (nothing, zero, zilch) @* Layout (template) is in the Body zone @ the default position (nothing, zero, zilch) *@
@Display(Model.Body) @Display(Model.Body)
@Display(Model.Tail) @Display(Model.Tail)
</body> </body>

View File

@@ -13,7 +13,7 @@
} }
<div id="layout-wrapper"> <div id="layout-wrapper">
<header id="layout-header"> <header id="layout-header">
@// needs to be the page title, not page (head) title... @* needs to be the page title, not page (head) title... *@
<h1><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1> <h1><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1>
@if(Model.Header != null) { @if(Model.Header != null) {
<div id="header"> <div id="header">
@@ -36,7 +36,7 @@
@Zone(Model.Featured) @Zone(Model.Featured)
</div> </div>
} }
@// the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) @* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@
@if(Model.Content != null) { @if(Model.Content != null) {
<div id="content"> <div id="content">
@Zone(Model.Content) @Zone(Model.Content)