Making the WidgetPart title optional and using the widget type's display name in the widget admin...

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-20 14:30:49 -07:00
parent ddc9843726
commit 5c8d2f1864
3 changed files with 5 additions and 2 deletions

View File

@@ -10,7 +10,6 @@ namespace Orchard.Widgets.Models {
/// <summary> /// <summary>
/// The widget's title. /// The widget's title.
/// </summary> /// </summary>
[Required]
public string Title { public string Title {
get { return Record.Title; } get { return Record.Title; }
set { Record.Title = value; } set { Record.Title = value; }

View File

@@ -40,7 +40,7 @@
@{ @{
i++; i++;
} }
@Html.ActionLink(@widget.Title, "EditWidget", new { @widget.Id }) @Html.ActionLink(@widget.TypeDefinition.DisplayName, "EditWidget", new { @widget.Id })
</li> </li>
} }
</ul> </ul>

View File

@@ -5,10 +5,14 @@
var tag = Tag(Model, "article"); var tag = Tag(Model, "article");
} }
@tag.StartElement @tag.StartElement
@if (HasText(title) || Model.Header != null) {
<header> <header>
@if (HasText(title)) {
<h1>@title</h1> <h1>@title</h1>
}
@Display(Model.Header) @Display(Model.Header)
</header> </header>
}
@Display(Model.Child) @Display(Model.Child)
@if(Model.Footer != null) { @if(Model.Footer != null) {
<footer> <footer>