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>
/// The widget's title.
/// </summary>
[Required]
public string Title {
get { return Record.Title; }
set { Record.Title = value; }

View File

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

View File

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