Getting The Admin theme put together (instead of all admin pages including AdminHead and AdminFoot)

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044218
This commit is contained in:
skewed
2009-12-17 10:29:33 +00:00
parent d3b3829314
commit c2b870637f
88 changed files with 2061 additions and 1240 deletions

View File

@@ -76,7 +76,8 @@
<Compile Include="Common\ViewModels\BodyEditorViewModel.cs" /> <Compile Include="Common\ViewModels\BodyEditorViewModel.cs" />
<Compile Include="Common\ViewModels\OwnerEditorViewModel.cs" /> <Compile Include="Common\ViewModels\OwnerEditorViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Themes\SafeModeThemeSelector.cs" /> <Compile Include="Themes\Services\AdminThemeSelector.cs" />
<Compile Include="Themes\Services\SafeModeThemeSelector.cs" />
<Compile Include="Settings\AdminMenu.cs" /> <Compile Include="Settings\AdminMenu.cs" />
<Compile Include="Settings\Controllers\AdminController.cs" /> <Compile Include="Settings\Controllers\AdminController.cs" />
<Compile Include="Settings\Models\SiteSettingsHandler.cs" /> <Compile Include="Settings\Models\SiteSettingsHandler.cs" />

View File

@@ -1,12 +1,10 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Core.Settings.ViewModels.SettingsIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Core.Settings.ViewModels.SettingsIndexViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Edit Settings</h2>
<h2>Edit Settings</h2> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <%= Html.EditorForModel() %>
<%= Html.EditorForModel() %> <fieldset>
<fieldset> <input class="button" type="submit" value="Save" />
<input class="button" type="submit" value="Save" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,15 @@
using System.Globalization;
using System.Web.Routing;
using Orchard.Themes;
namespace Orchard.Core.Themes.Services {
public class AdminThemeSelector : IThemeSelector {
public ThemeSelectorResult GetTheme(RequestContext context) {
if (!context.HttpContext.Request.Path.StartsWith("/admin", true, CultureInfo.InvariantCulture))
return null;
return new ThemeSelectorResult { Priority = 0, ThemeName = "TheAdmin" };
}
}
}

View File

@@ -1,7 +1,7 @@
using System.Web.Routing; using System.Web.Routing;
using Orchard.Themes; using Orchard.Themes;
namespace Orchard.Core.Themes { namespace Orchard.Core.Themes.Services {
public class SafeModeThemeSelector : IThemeSelector { public class SafeModeThemeSelector : IThemeSelector {
public ThemeSelectorResult GetTheme(RequestContext context) { public ThemeSelectorResult GetTheme(RequestContext context) {
return new ThemeSelectorResult {Priority = -100, ThemeName = "Themes"}; return new ThemeSelectorResult {Priority = -100, ThemeName = "Themes"};

View File

@@ -47,13 +47,13 @@ h1, h2, h3, h4, h5, h6
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
} }
h1 .home h1
{ {
font-size: 2em; font-size: 2em;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 0; margin-bottom: 0;
} }
h2 h1
{ {
padding: 0 0 10px 0; padding: 0 0 10px 0;
} }

View File

@@ -1,36 +1,34 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<ThemesIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<ThemesIndexViewModel>" %>
<%@ Import Namespace="Orchard.Core.Themes.ViewModels"%> <%@ Import Namespace="Orchard.Core.Themes.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<%Html.Include("AdminHead");%> <h2>Manage Themes</h2>
<h2>Manage Themes</h2> <h3>Current Theme</h3>
<h3>Current Theme</h3> <% if (Model.CurrentTheme == null) {
<% if (Model.CurrentTheme == null) { %><p>There is no current theme in the application. The built-in theme will be used.<br /><%=Html.ActionLink("Install a new Theme", "Install") %></p><%
%><p>There is no current theme in the application. The built-in theme will be used.<br /><%=Html.ActionLink("Install a new Theme", "Install") %></p><% } else {
} else { %><h4><%= Model.CurrentTheme.DisplayName %></h4>
%><h4><%= Model.CurrentTheme.DisplayName %></h4> <p><img src="<%= ResolveUrl("~/Themes/" + Model.CurrentTheme.ThemeName + "/Theme.gif")%>" alt="<%= Model.CurrentTheme.DisplayName %>" /><br />
<p><img src="<%= ResolveUrl("~/Themes/" + Model.CurrentTheme.ThemeName + "/Theme.gif")%>" alt="<%= Model.CurrentTheme.DisplayName %>" /><br /> By <%= Model.CurrentTheme.Author %><br />
By <%= Model.CurrentTheme.Author %><br /> <%= Model.CurrentTheme.Version %><br />
<%= Model.CurrentTheme.Version %><br /> <%= Model.CurrentTheme.Description %><br />
<%= Model.CurrentTheme.Description %><br /> <%= Model.CurrentTheme.HomePage %><br />
<%= Model.CurrentTheme.HomePage %><br /> <%=Html.ActionLink("Install a new Theme", "Install") %>
<%=Html.ActionLink("Install a new Theme", "Install") %> </p>
</p> <% } %>
<% } %> <h3>Available Themes</h3>
<h3>Available Themes</h3> <ul class="templates">
<ul class="templates"> <% foreach (var theme in Model.Themes) {
<% foreach (var theme in Model.Themes) { if (Model.CurrentTheme == null || theme.ThemeName != Model.CurrentTheme.ThemeName) {
if (Model.CurrentTheme == null || theme.ThemeName != Model.CurrentTheme.ThemeName) { %><li>
%><li> <h4><%= theme.DisplayName %> </h4>
<h4><%= theme.DisplayName %> </h4> <p><img src="<%= ResolveUrl("~/Themes/" + theme.ThemeName + "/Theme.gif") %>" alt="<%= theme.DisplayName %>" /><br />
<p><img src="<%= ResolveUrl("~/Themes/" + theme.ThemeName + "/Theme.gif") %>" alt="<%= theme.DisplayName %>" /><br /> By <%= theme.Author %><br />
By <%= theme.Author %><br /> <%= theme.Version %><br />
<%= theme.Version %><br /> <%= theme.Description %><br />
<%= theme.Description %><br /> <%= theme.HomePage %><br />
<%= theme.HomePage %><br /> <%=Html.ActionLink("Activate", "Activate", new {themeName = theme.ThemeName}) %> | <%=Html.ActionLink("Uninstall", "Uninstall", new {themeName = theme.ThemeName}) %>
<%=Html.ActionLink("Activate", "Activate", new {themeName = theme.ThemeName}) %> | <%=Html.ActionLink("Uninstall", "Uninstall", new {themeName = theme.ThemeName}) %> </p>
</p> </li>
</li> <% }
<% } } %>
} %> </ul>
</ul>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,13 +1,11 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Install Theme</h2>
<h2>Install Theme</h2> <% using (Html.BeginForm("Install", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%>
<% using (Html.BeginForm("Install", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="pageTitle">File Path to the zip file:</label>
<label for="pageTitle">File Path to the zip file:</label> <input id="ThemeZipPath" name="ThemeZipPath" type="file" class="text" value="Browse" size="64"/><br />
<input id="ThemeZipPath" name="ThemeZipPath" type="file" class="text" value="Browse" size="64"/><br /> <input type="submit" class="button" value="Install" />
<input type="submit" class="button" value="Install" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -175,8 +175,6 @@
<Content Include="Content\Images\title_background.gif" /> <Content Include="Content\Images\title_background.gif" />
<Content Include="Content\Site2.css" /> <Content Include="Content\Site2.css" />
<Content Include="Content\Site3.css" /> <Content Include="Content\Site3.css" />
<Content Include="Views\Shared\AdminHead.aspx" />
<Content Include="Views\Shared\AdminFoot.aspx" />
<Content Include="Views\Shared\Messages.ascx" /> <Content Include="Views\Shared\Messages.ascx" />
<Content Include="Views\Shared\ExtraUserControl.ascx" /> <Content Include="Views\Shared\ExtraUserControl.ascx" />
<Content Include="Views\Shared\Footer.ascx" /> <Content Include="Views\Shared\Footer.ascx" />

View File

@@ -19,11 +19,11 @@ namespace Orchard.Blogs.Models {
Filters.Add(new ContentItemTemplates<Blog>("Blog", "Detail", "DetailAdmin", "Summary", "SummaryAdmin")); Filters.Add(new ContentItemTemplates<Blog>("Blog", "Detail", "DetailAdmin", "Summary", "SummaryAdmin"));
OnGetEditorViewModel<Blog>((context, blog) => OnGetEditorViewModel<Blog>((context, blog) =>
context.AddEditor(new TemplateViewModel(blog) { TemplateName = "BlogFields", ZoneName = "primary", Position = "1" }) context.AddEditor(new TemplateViewModel(blog) { TemplateName = "Blog/Fields", ZoneName = "primary", Position = "1" })
); );
OnUpdateEditorViewModel<Blog>((context, blog) => { OnUpdateEditorViewModel<Blog>((context, blog) => {
context.AddEditor(new TemplateViewModel(blog) { TemplateName = "BlogFields", ZoneName = "primary", Position = "1" }); context.AddEditor(new TemplateViewModel(blog) { TemplateName = "Blog/Fields", ZoneName = "primary", Position = "1" });
context.Updater.TryUpdateModel(blog, "", null, null); context.Updater.TryUpdateModel(blog, "", null, null);
}); });
} }

View File

@@ -60,14 +60,14 @@ namespace Orchard.Blogs.Models {
case "Detail": case "Detail":
context.AddDisplay( context.AddDisplay(
new TemplateViewModel(posts.Select(bp => contentManager.BuildDisplayModel(bp, null, "Summary"))) { new TemplateViewModel(posts.Select(bp => contentManager.BuildDisplayModel(bp, null, "Summary"))) {
TemplateName = "BlogPostList", TemplateName = "BlogPost/List",
ZoneName = "body" ZoneName = "body"
}); });
break; break;
case "DetailAdmin": case "DetailAdmin":
context.AddDisplay( context.AddDisplay(
new TemplateViewModel(posts.Select(bp => contentManager.BuildDisplayModel(bp, null, "SummaryAdmin"))) { new TemplateViewModel(posts.Select(bp => contentManager.BuildDisplayModel(bp, null, "SummaryAdmin"))) {
TemplateName = "BlogPostListAdmin", TemplateName = "BlogPost/ListAdmin",
ZoneName = "body" ZoneName = "body"
}); });
break; break;
@@ -75,13 +75,13 @@ namespace Orchard.Blogs.Models {
}); });
OnGetEditorViewModel<BlogPost>((context, blogPost) => { OnGetEditorViewModel<BlogPost>((context, blogPost) => {
context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPostFieldsPrimary", ZoneName = "primary", Position = "1" }); context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPost/FieldsPrimary", ZoneName = "primary", Position = "1" });
context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPostFieldsSecondary", ZoneName = "secondary", Position = "1" }); context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPost/FieldsSecondary", ZoneName = "secondary", Position = "1" });
}); });
OnUpdateEditorViewModel<BlogPost>((context, blogPost) => { OnUpdateEditorViewModel<BlogPost>((context, blogPost) => {
context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPostFieldsPrimary", ZoneName = "primary", Position = "1" }); context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPost/FieldsPrimary", ZoneName = "primary", Position = "1" });
context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPostFieldsSecondary", ZoneName = "secondary", Position = "1" }); context.AddEditor(new TemplateViewModel(blogPost) { TemplateName = "BlogPost/FieldsSecondary", ZoneName = "secondary", Position = "1" });
context.Updater.TryUpdateModel(blogPost, "", null, null); context.Updater.TryUpdateModel(blogPost, "", null, null);
}); });
} }

View File

@@ -97,29 +97,29 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Package.txt" /> <Content Include="Package.txt" />
<Content Include="Views\BlogPost\Create.aspx" /> <Content Include="Views\BlogPost\Create.ascx" />
<Content Include="Views\BlogPost\Edit.aspx" /> <Content Include="Views\BlogPost\Edit.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogDetailAdmin.ascx" /> <Content Include="Views\Shared\DisplayTemplates\Blog\DetailAdmin.ascx" />
<Content Include="Views\Blog\ItemForAdmin.aspx" /> <Content Include="Views\Blog\ItemForAdmin.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogSummaryAdmin.ascx" /> <Content Include="Views\Shared\DisplayTemplates\Blog\SummaryAdmin.ascx" />
<Content Include="Views\Blog\List.aspx" /> <Content Include="Views\Blog\List.ascx" />
<Content Include="Views\Blog\ListForAdmin.aspx" /> <Content Include="Views\Blog\ListForAdmin.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogPostDetail.ascx" /> <Content Include="Views\Shared\DisplayTemplates\BlogPost\Detail.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogPostSummary.ascx" /> <Content Include="Views\Shared\DisplayTemplates\BlogPost\Summary.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogDetail.ascx" /> <Content Include="Views\Shared\DisplayTemplates\Blog\Detail.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogPostList.ascx" /> <Content Include="Views\Shared\DisplayTemplates\BlogPost\List.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogSummary.ascx" /> <Content Include="Views\Shared\DisplayTemplates\Blog\Summary.ascx" />
<Content Include="Views\Models\EditorTemplates\BlogPostFieldsSecondary.ascx" /> <Content Include="Views\Shared\EditorTemplates\BlogPost\FieldsSecondary.ascx" />
<Content Include="Views\BlogPost\Item.aspx" /> <Content Include="Views\BlogPost\Item.ascx" />
<Content Include="Views\Blog\Create.aspx" /> <Content Include="Views\Blog\Create.ascx" />
<Content Include="Views\Blog\Edit.aspx" /> <Content Include="Views\Blog\Edit.ascx" />
<Content Include="Views\Blog\Item.aspx" /> <Content Include="Views\Blog\Item.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogPostSummaryAdmin.ascx" /> <Content Include="Views\Shared\DisplayTemplates\BlogPost\SummaryAdmin.ascx" />
<Content Include="Views\Models\DisplayTemplates\BlogPostListAdmin.ascx" /> <Content Include="Views\Shared\DisplayTemplates\BlogPost\ListAdmin.ascx" />
<Content Include="Views\Models\EditorTemplates\BlogFields.ascx" /> <Content Include="Views\Shared\EditorTemplates\Blog\Fields.ascx" />
<Content Include="Views\Models\EditorTemplates\Blog.ascx" /> <Content Include="Views\Shared\EditorTemplates\Blog\Detail.ascx" />
<Content Include="Views\Models\EditorTemplates\BlogPost.ascx" /> <Content Include="Views\Shared\EditorTemplates\BlogPost\Detail.ascx" />
<Content Include="Views\Models\EditorTemplates\BlogPostFieldsPrimary.ascx" /> <Content Include="Views\Shared\EditorTemplates\BlogPost\FieldsPrimary.ascx" />
<Content Include="Web.config" /> <Content Include="Web.config" />
<Content Include="Views\Web.config" /> <Content Include="Views\Web.config" />
</ItemGroup> </ItemGroup>

View File

@@ -0,0 +1,9 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CreateBlogViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<h2>Add Blog</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(vm => vm.Blog) %>
<fieldset><input class="button" type="submit" value="Create" /></fieldset><%
} %>

View File

@@ -1,11 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<CreateBlogViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<% Html.Include("AdminHead"); %>
<h2>Add Blog</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(vm => vm.Blog) %>
<fieldset><input class="button" type="submit" value="Create" /></fieldset><%
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,9 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogEditViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<h2>Edit Blog</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.Blog) %>
<fieldset><input class="button" type="submit" value="Save" /></fieldset><%
} %>

View File

@@ -1,11 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEditViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<% Html.Include("AdminHead"); %>
<h2>Edit Blog</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.Blog) %>
<fieldset><input class="button" type="submit" value="Save" /></fieldset><%
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,4 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%=Html.DisplayForItem(m => m.Blog) %>

View File

@@ -1,7 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%-- todo: (heskew) make master-less when we get into theming --%>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<%=Html.DisplayForItem(m => m.Blog) %>
</asp:Content>

View File

@@ -0,0 +1,4 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogForAdminViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%=Html.DisplayForItem(m => m.Blog) %>

View File

@@ -1,6 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogForAdminViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<% Html.Include("AdminHead"); %>
<%=Html.DisplayForItem(m => m.Blog) %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,11 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogsViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<h1>Blogs</h1>
<p>All of the blogs.</p><%
if (Model.Blogs.Count() > 0) { %>
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %><%
}
else { %>
<p>No blogs found.</p><%
} %>

View File

@@ -1,17 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogsViewModel>" %>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%-- todo: (heskew) make master-less when we get into theming --%>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<h2>Blogs</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><%
if (Model.Blogs.Count() > 0) { %>
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %><%
}
else { %>
<p>No blogs found.</p><%
} %>
</asp:Content>

View File

@@ -0,0 +1,14 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogsForAdminViewModel>" %>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<h2>Manage Blogs</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><%
if (Model.Blogs.Count() > 0) { %>
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div>
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %>
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div><%
} else { %>
<div class="info message">There are no blogs for you to see. Want to <a href="<%=Url.BlogCreate() %>">add one</a>?</div><%
} %>

View File

@@ -1,16 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogsForAdminViewModel>" %>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %>
<h2>Manage Blogs</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><%
if (Model.Blogs.Count() > 0) { %>
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div>
<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %>
<div class="actions"><a class="add button" href="<%=Url.BlogCreate() %>">New Blog</a></div><%
} else { %>
<div class="info message">There are no blogs for you to see. Want to <a href="<%=Url.BlogCreate() %>">add one</a>?</div><%
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,8 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CreateBlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<h2>Add Post</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.BlogPost) %><%
} %>

View File

@@ -1,10 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<CreateBlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<% Html.Include("AdminHead"); %>
<h2>Add Post</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.BlogPost) %><%
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,8 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostEditViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<h2>Edit Post</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.BlogPost) %><%
} %>

View File

@@ -1,10 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogPostEditViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<% Html.Include("AdminHead"); %>
<h2>Edit Post</h2>
<% using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<%=Html.EditorForItem(m => m.BlogPost) %><%
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -0,0 +1,4 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%=Html.DisplayForItem(m=>m.BlogPost) %>

View File

@@ -1,7 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="ViewPage<BlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%-- todo: (heskew) make master-less when we get into theming --%>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<%=Html.DisplayForItem(m=>m.BlogPost) %>
</asp:Content>

View File

@@ -0,0 +1,11 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<Blog>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<% Html.AddTitleParts(Model.Item.Name); %>
<div class="manage"><a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit">edit</a></div>
<h1><%=Html.Encode(Model.Item.Name) %></h1>
<div><%=Html.Encode(Model.Item.Description) %></div>
<%--TODO: (erikpo) Need to figure out which zones should be displayed in this template--%>
<%=Html.DisplayZonesAny() %>

View File

@@ -0,0 +1,22 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<Blog>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%-- todo: (heskew) get what actions we can out of the h2 :| --%>
<h2 class="withActions">
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.Encode(Model.Item.Name) %></a>
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit" title="Edit Blog">Edit Blog</a>
<span class="actions"><span class="destruct"><a href="<%=Url.BlogDelete(Model.Item.Slug) %>" class="ibutton remove" title="Remove Blog">Remove Blog</a></span></span></h2>
<p><%=Model.Item.Description%></p>
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item.Slug) %>" class="add button">New Post</a></div>
<%--TODO: (erikpo) Need to figure out which zones should be displayed in this template--%>
<%=Html.DisplayZonesAny() %>
<%--<%
if (Model.Posts.Count() > 0) { %>
<%=Html.UnorderedList(Model.Posts, (p, i) => Html.DisplayFor(blog => p, "BlogPostPreviewForAdmin").ToHtmlString(), "contentItems")%>
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>" class="add button">New Post</a></div><%
} else { %>
<div class="info message">This blog is sad with no posts, but don't fret. You can add a new post right <a href="<%=Url.BlogPostCreate(Model.Blog.Slug) %>">here</a>!</div><%
} %>--%>

View File

@@ -0,0 +1,10 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<Blog>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%=Html.Link(Html.Encode(Model.Item.Name), Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog metadata"><a href="<%=Url.Blog(Model.Item.Slug) %>"><%=Model.Item.PostCount %> post<%=Model.Item.PostCount == 1 ? "" : "s" %></a></div>
<p><%=Model.Item.Description %></p>
<%--TODO: (erikpo) Need to figure out which zones should be displayed in this template--%>
<%--<%=Html.DisplayZonesAny() %>--%>

View File

@@ -0,0 +1,21 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<Blog>>" %>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.Encode(Model.Item.Name) %></a></h3>
<div class="meta">
<% var postCount = Model.Item.PostCount; %><a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=string.Format("{0} post{1}", postCount, postCount == 1 ? "" : "s") %></a>
| <a href="#">?? comments</a>
</div>
<%--<p>[list of authors] [modify blog access]</p>--%>
<p><%=Model.Item.Description %></p>
<p class="actions">
<%-- todo: (heskew) make into a ul --%>
<span class="construct">
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>" class="ibutton blog" title="Manage Blog">Manage Blog</a>
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit" title="Edit Blog">Edit Blog</a>
<a href="<%=Url.Blog(Model.Item.Slug) %>" class="ibutton view" title="View Blog">View Blog</a>
<a href="<%=Url.BlogPostCreate(Model.Item.Slug) %>" class="ibutton add page" title="New Post">New Post</a>
</span>
<span class="destruct"><a href="<%=Url.BlogDelete(Model.Item.Slug) %>" class="ibutton remove" title="Delete Blog">Remove Blog</a></span>
</p>

View File

@@ -0,0 +1,14 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<BlogPost>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<div class="manage"><a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton edit">edit</a></div>
<h1><%=Html.Encode(Model.Item.Title)%></h1>
<div class="metadata">
<% if (Model.Item.Creator != null)
{
%><div class="posted">Posted by <%=Html.Encode(Model.Item.Creator.UserName)%> <%=Html.PublishedWhen(Model.Item)%></div><%
} %>
</div>
<%=Html.DisplayZonesAny() %>

View File

@@ -0,0 +1,5 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<ItemDisplayModel<BlogPost>>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %>

View File

@@ -0,0 +1,5 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<ItemDisplayModel<BlogPost>>>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %>

View File

@@ -0,0 +1,12 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<BlogPost>>" %>
<%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>"><%=Html.Encode(Model.Item.Title) %></a></h3>
<div class="meta">
<%=Html.PublishedState(Model.Item) %>
| <a href="#">?? comments</a>
</div>
<div class="content"><%=Model.Item.As<BodyAspect>().Text ?? "<p><em>there's no content for this blog post</em></p>" %></div>

View File

@@ -0,0 +1,23 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemDisplayModel<BlogPost>>" %>
<%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Slug) %>"><%=Html.Encode(Model.Item.Title)%></a></h3>
<div class="meta">
<%=Html.PublishedState(Model.Item) %>
| <a href="#">?? comments</a>
</div>
<div class="content"><%=Model.Item.As<BodyAspect>().Text ?? "<p><em>there's no content for this blog post</em></p>"%></div>
<p class="actions">
<%-- todo: (heskew) make into a ul --%>
<span class="construct">
<a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton edit" title="Edit Post">Edit Post</a>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton view" title="View Post">View Post</a><%
if (Model.Item.Published == null) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^ %>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton publish" title="Publish Post Now">Publish Post Now</a>
<% } %>
</span>
<span class="destruct"><a href="#" class="ibutton remove" title="Remove Post">Remove Post</a></span>
</p>

View File

@@ -0,0 +1,6 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemEditorModel<Blog>>" %>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%=Html.EditorZone("primary") %>
<%=Html.EditorZonesAny() %>

View File

@@ -0,0 +1,15 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Blog>" %>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models" %>
<fieldset>
<label for="Name">Blog Name</label>
<%=Html.EditorFor(m => m.Name) %>
</fieldset>
<fieldset class="permalink">
<label class="sub" for="Slug">Permalink: <span><%=Request.Url.ToRootString() %>/</span></label>
<span><%=Html.TextBoxFor(m => m.Slug, new { @class = "text" })%></span>
</fieldset>
<fieldset>
<label for="Description">Description</label>
<%=Html.TextAreaFor(m => m.Description, 5, 60, null) %>
</fieldset>

View File

@@ -0,0 +1,16 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ItemEditorModel<BlogPost>>" %>
<%@ Import Namespace="Orchard.Models.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<div class="sections">
<div class="primary">
<%=Html.EditorZone("primary") %>
<%=Html.EditorZonesExcept("secondary") %>
</div>
<div class="secondary">
<%=Html.EditorZone("secondary")%>
<fieldset>
<input class="button" type="submit" name="submit.Save" value="Save"/>
</fieldset>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPost>" %>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<fieldset>
<label for="Title">Title</label>
<span><%=Html.TextBoxFor(m => m.Title, new { @class = "large text" })%></span>
</fieldset>
<fieldset class="permalink">
<label class="sub" for="Slug">Permalink<br /><span><%=Request.Url.ToRootString() %>/<%=Model.Blog.Slug %>/</span></label>
<span><%=Html.TextBoxFor(m => m.Slug, new { @class = "text" })%></span>
</fieldset>

View File

@@ -0,0 +1,15 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPost>" %>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<fieldset>
<legend>Publish Settings</legend>
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", true, new { id = "Command_SaveDraft" }) %> Save Draft</label><br />
</fieldset>
<%--<fieldset>
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
</fieldset>
<fieldset>
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
<%=Html.EditorFor(m => m.Published) %>
</fieldset>--%>

View File

@@ -3,23 +3,21 @@
<%@ Import Namespace="Orchard.Utility"%> <%@ Import Namespace="Orchard.Utility"%>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Delete pages</h2>
<h2>Delete pages</h2> <p>Are you sure you want to delete the pages?</p>
<p>Are you sure you want to delete the pages?</p> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.Delete%>" />
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.Delete%>" /> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkDeleteConfirmed)%>" value="true" />
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkDeleteConfirmed)%>" value="true" /> <input class="button" type="submit" name="submit.BulkEdit" value="Delete" />
<input class="button" type="submit" name="submit.BulkEdit" value="Delete" /> <%
<% int pageIndex = 0;
int pageIndex = 0; foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) { var pi = pageIndex;
var pi = pageIndex; %><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/> <input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><% pageIndex++;
pageIndex++; } %>
} %> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,23 +3,21 @@
<%@ Import Namespace="Orchard.Utility"%> <%@ Import Namespace="Orchard.Utility"%>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <h2>Publish later</h2>
<h2>Publish later</h2> <p>Enter the scheduled publication date:</p>
<p>Enter the scheduled publication date:</p> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset>
<fieldset> <%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%>
<%=Html.EditorFor(m => m.Options.BulkPublishLaterDate)%> <input class="button" type="submit" name="submit.BulkEdit" value="Publish later" />
<input class="button" type="submit" name="submit.BulkEdit" value="Publish later" /> <input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" />
<input type="hidden" name="<%=Html.NameOf(m => m.Options.BulkAction)%>" value="<%=PageIndexBulkAction.PublishLater%>" /> <%
<% int pageIndex = 0;
int pageIndex = 0; foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) {
foreach (var pageEntry in Model.PageEntries.Where(e => e.IsChecked)) { var pi = pageIndex;
var pi = pageIndex; %><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/>
%><input type="hidden" value="<%=pageEntry.PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId)%>"/> <input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><%
<input type="hidden" value="<%=pageEntry.IsChecked %>" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked)%>"/><% pageIndex++;
pageIndex++; } %>
} %> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,23 +1,21 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.ChooseTemplateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.ChooseTemplateViewModel>" %>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%> <%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Change Template</h2>
<h2>Change Template</h2> <p>Select your layout from one of the templates below.</p>
<p>Select your layout from one of the templates below.</p> <% using (Html.BeginForm()) {
<% using (Html.BeginForm()) { %><%= Html.ValidationSummary() %>
%><%= Html.ValidationSummary() %> <ul class="templates"><%
<ul class="templates"><% foreach (var template in Model.Templates) {
foreach (var template in Model.Templates) { var t = template; %>
var t = template; %> <li><%=
<li><%= Html.EditorFor(m => t) %>
Html.EditorFor(m => t) %> </li><%
</li><% } %>
} %> </ul>
</ul> <p>
<p> <input class="button" type="submit" value="Save Template Change" />
<input class="button" type="submit" value="Save Template Change" /> <%-- todo: (heskew) should pull to give the browser some chance of rehydrating the edit page form state --%>
<%-- todo: (heskew) should pull to give the browser some chance of rehydrating the edit page form state --%> <%=Html.ActionLink("Cancel", "Edit", new { Id = ViewContext.RouteData.GetRequiredString("id") }, new { @class = "cancel" })%>
<%=Html.ActionLink("Cancel", "Edit", new { Id = ViewContext.RouteData.GetRequiredString("id") }, new { @class = "cancel" })%> </p><%
</p><% } %>
} %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,10 +1,8 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageCreateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageCreateViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add a Page</h2>
<h2>Add a Page</h2> <p>Select your layout from one of the templates below.</p>
<p>Select your layout from one of the templates below.</p> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <%=Html.EditorForModel() %>
<%=Html.EditorForModel() %> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,50 +1,48 @@
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageEditViewModel>" %> <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageEditViewModel>" %>
<%@ Import Namespace="Orchard.CmsPages.Models" %> <%@ Import Namespace="Orchard.CmsPages.Models" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2><%=_Encoded("Edit Page") %></h2>
<h2><%=_Encoded("Edit Page") %></h2> <p class="bottomSpacer"><%=_Encoded("about setting up a page") %></p>
<p class="bottomSpacer"><%=_Encoded("about setting up a page") %></p> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <div class="sections">
<div class="sections"> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <div class="primary">
<div class="primary"> <h3><%=_Encoded("Page Content") %></h3>
<h3><%=_Encoded("Page Content") %></h3> <%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%>
<%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%> <%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge") %>
<%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge") %> <%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink") %>
<%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink") %> <% foreach (ContentItem content in Model.Revision.Contents) {
<% foreach (ContentItem content in Model.Revision.Contents) { %><fieldset>
%><fieldset> <label for="<%="Revision.Contents[" + content.ZoneName + "].Content" %>"><%=_Encoded("Zone Name") %>: <%= content.ZoneName %></label>
<label for="<%="Revision.Contents[" + content.ZoneName + "].Content" %>"><%=_Encoded("Zone Name") %>: <%= content.ZoneName %></label> <% if (Model.Template != null && Model.Template.Zones.Contains(content.ZoneName) == false) {
<% if (Model.Template != null && Model.Template.Zones.Contains(content.ZoneName) == false) { %><span class="warning message">These contents are assigned to a zone that does not exist in the current template. Please delete it or copy it to another zone.</span><%
%><span class="warning message">These contents are assigned to a zone that does not exist in the current template. Please delete it or copy it to another zone.</span><%
} %>
<%= Html.TextArea("Revision.Contents[" + content.ZoneName + "].Content", content.Content, new { @class = "html" }) %>
</fieldset><%
} %> } %>
<fieldset> <%= Html.TextArea("Revision.Contents[" + content.ZoneName + "].Content", content.Content, new { @class = "html" }) %>
<p><strong>Current layout:</strong> </fieldset><%
<%=Html.Encode(Model.Revision.TemplateName) %> } %>
<%=Html.ActionLink("Change Template", "ChooseTemplate", new { Model.Revision.Page.Id }, new { @class = "button" }) %> <fieldset>
</p> <p><strong>Current layout:</strong>
</fieldset> <%=Html.Encode(Model.Revision.TemplateName) %>
</div> <%=Html.ActionLink("Change Template", "ChooseTemplate", new { Model.Revision.Page.Id }, new { @class = "button" }) %>
<div class="secondary"> </p>
<h3><%=_Encoded("Publish Settings") %></h3> </fieldset>
<fieldset>
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
</fieldset>
<fieldset>
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
<%=Html.EditorFor(m => m.PublishLaterDate) %>
</fieldset>
<fieldset>
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li>
</fieldset>
<fieldset>
<input class="button" type="submit" name="submit.Save" value="Save"/>
<input class="delete button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
</fieldset>
</div>
<% } %>
</div> </div>
<% Html.Include("AdminFoot"); %> <div class="secondary">
<h3><%=_Encoded("Publish Settings") %></h3>
<fieldset>
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
</fieldset>
<fieldset>
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
<%=Html.EditorFor(m => m.PublishLaterDate) %>
</fieldset>
<fieldset>
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", new { id = "Command_SaveDraft" }) %> Save Draft</label></li>
</fieldset>
<fieldset>
<input class="button" type="submit" name="submit.Save" value="Save"/>
<input class="delete button" type="submit" name="submit.DeleteDraft" value="Delete Draft" <%=Model.CanDeleteDraft ? "" : "disabled" %>/>
</fieldset>
</div>
<% } %>
</div>

View File

@@ -1,19 +1,17 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Orchard.CmsPages.Models.Page>>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Orchard.CmsPages.Models.Page>>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Export</h2>
<h2>Export</h2> <p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p> <ol>
<ol> <% foreach (var page in Model) {
<% foreach (var page in Model) { %><li>Page Id <%=page.Id %>
%><li>Page Id <%=page.Id %> <ol>
<ol> <% foreach (var revision in page.Revisions) {
<% foreach (var revision in page.Revisions) { %><li>Revision <%=revision.Number %> <strong><%=revision.Title %></strong> ~/<%=revision.Slug %>
%><li>Revision <%=revision.Number %> <strong><%=revision.Title %></strong> ~/<%=revision.Slug %> <br />Modified: <%=revision.ModifiedDate %>
<br />Modified: <%=revision.ModifiedDate %> <br />Published: <%=revision.PublishedDate %></li><%
<br />Published: <%=revision.PublishedDate %></li><% } %>
} %> </ol>
</ol> </li><%
</li><% } %>
} %> </ol>
</ol>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,98 +3,96 @@
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%> <%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<%-- todo: (heskew) localize --%> <%-- todo: (heskew) localize --%>
<% Html.Include("AdminHead"); %> <h2>Manage Pages</h2>
<h2>Manage Pages</h2> <p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction) %>">
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction) %>"> <%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.None, "Choose action...") %>
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.None, "Choose action...") %> <%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishNow, "Publish Now") %>
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishNow, "Publish Now") %> <%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishLater, "Publish Later") %>
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.PublishLater, "Publish Later") %> <%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Unpublish, "Unpublish") %>
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Unpublish, "Unpublish") %> <%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Delete, "Delete") %>
<%=Html.SelectOption(Model.Options.BulkAction, PageIndexBulkAction.Delete, "Delete") %> </select>
</select> <input class="button" type="submit" name="submit.BulkEdit" value="Apply" />
<input class="button" type="submit" name="submit.BulkEdit" value="Apply" /> </fieldset>
</fieldset> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="filterResults">Filter: </label>
<label for="filterResults">Filter: </label> <select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter) %>">
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter) %>"> <%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.All, "All Pages") %>
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.All, "All Pages") %> <%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Published, "Published Pages") %>
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Published, "Published Pages") %> <%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Offline, "Offline Pages") %>
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Offline, "Offline Pages") %> <%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Scheduled, "Publish Pending") %>
<%=Html.SelectOption(Model.Options.Filter, PageIndexFilter.Scheduled, "Publish Pending") %> </select>
</select> <input class="button" type="submit" name="submit.Filter" value="Apply"/>
<input class="button" type="submit" name="submit.Filter" value="Apply"/> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button" }) %></div>
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button" }) %></div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the PageEntries currently available for use in your application.">
<table class="items" summary="This is a table of the PageEntries currently available for use in your application."> <colgroup>
<colgroup> <col id="Actions" />
<col id="Actions" /> <col id="Status" />
<col id="Status" /> <col id="Title" />
<col id="Title" /> <col id="Author" />
<col id="Author" /> <col id="LastUpdated" />
<col id="LastUpdated" /> <col id="Draft" />
<col id="Draft" /> <col id="Timer" />
<col id="Timer" /> <col id="Edit" />
<col id="Edit" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Status</th>
<th scope="col">Status</th> <th scope="col">Title</th>
<th scope="col">Title</th> <th scope="col">Slug</th>
<th scope="col">Slug</th> <th scope="col">Author</th>
<th scope="col">Author</th> <th scope="col">Last Updated</th>
<th scope="col">Last Updated</th> <th scope="col">Draft</th>
<th scope="col">Draft</th> <th scope="col">Scheduled</th>
<th scope="col">Scheduled</th> <th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<%
int pageIndex = 0;
foreach (var pageEntry in Model.PageEntries)
{
var revision = pageEntry.Page.Revisions.LastOrDefault();
if (revision == null) continue;
%><tr>
<td>
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].IsChecked) %>"/>
</td>
<td>
<% if (pageEntry.IsPublished) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
<% } else {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
<% } %>
</td>
<td><%=Html.ActionLink(revision.Title ?? "(no title)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
<td><%=Html.ActionLink(revision.Slug ?? "(no slug)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
<td>By Unk</td>
<td><%=string.Format("{0:d}<br />{0:t}", revision.ModifiedDate) %></td>
<td>
<% if (pageEntry.HasDraft) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
<% }
if (revision.Page.Scheduled.Any()) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
<% } %>
</td>
<td><%=revision.Page.Scheduled.Any() ? string.Format("{0:d}<br />{0:t}", revision.Page.Scheduled.First().ScheduledDate.Value) : "" %></td>
<td><%=Html.ActionLink("Edit", "Edit", new { revision.Page.Id }) %></td>
</tr> </tr>
<% </thead>
pageIndex++; <%
}%> int pageIndex = 0;
</table> foreach (var pageEntry in Model.PageEntries)
</fieldset> {
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button"}) %></div> var revision = pageEntry.Page.Revisions.LastOrDefault();
<% } %>
<% Html.Include("AdminFoot"); %> if (revision == null) continue;
%><tr>
<td>
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].IsChecked) %>"/>
</td>
<td>
<% if (pageEntry.IsPublished) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
<% } else {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
<% } %>
</td>
<td><%=Html.ActionLink(revision.Title ?? "(no title)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
<td><%=Html.ActionLink(revision.Slug ?? "(no slug)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
<td>By Unk</td>
<td><%=string.Format("{0:d}<br />{0:t}", revision.ModifiedDate) %></td>
<td>
<% if (pageEntry.HasDraft) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
<% }
if (revision.Page.Scheduled.Any()) {
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
<% } %>
</td>
<td><%=revision.Page.Scheduled.Any() ? string.Format("{0:d}<br />{0:t}", revision.Page.Scheduled.First().ScheduledDate.Value) : "" %></td>
<td><%=Html.ActionLink("Edit", "Edit", new { revision.Page.Id }) %></td>
</tr>
<%
pageIndex++;
}%>
</table>
</fieldset>
<div class="manage"><%=Html.ActionLink("Add a page", "Create", new {}, new { @class = "button"}) %></div>
<% } %>

View File

@@ -1,22 +1,20 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<CommentsCreateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<CommentsCreateViewModel>" %>
<%@ Import Namespace="Orchard.Comments.ViewModels"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add Comment</h2>
<h2>Add Comment</h2> <% using(Html.BeginForm()) { %>
<% using(Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset class="who">
<fieldset class="who"> <label for="CommentName">Name</label>
<label for="CommentName">Name</label> <input id="CommentName" class="text" name="Name" type="text" value="<%=Model.Name %>" /><br />
<input id="CommentName" class="text" name="Name" type="text" value="<%=Model.Name %>" /><br /> <label for="CommentEmail">Email</label>
<label for="CommentEmail">Email</label> <input id="CommentEmail" class="text" name="Email" type="text" value="<%=Model.Email%>" /> <br />
<input id="CommentEmail" class="text" name="Email" type="text" value="<%=Model.Email%>" /> <br /> <label for="CommentSiteName">SiteName</label>
<label for="CommentSiteName">SiteName</label> <input id="CommentSiteName" class="text" name="SiteName" type="text" value="<%=Model.SiteName %>" />
<input id="CommentSiteName" class="text" name="SiteName" type="text" value="<%=Model.SiteName %>" /> </fieldset>
</fieldset> <fieldset class="what">
<fieldset class="what"> <label for="CommentText">Leave a comment</label>
<label for="CommentText">Leave a comment</label> <textarea id="CommentText" rows="10" cols="30" name="CommentText"><%=Model.CommentText %></textarea>
<textarea id="CommentText" rows="10" cols="30" name="CommentText"><%=Model.CommentText %></textarea> <input type="submit" class="button" value="Save" />
<input type="submit" class="button" value="Save" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -2,92 +2,90 @@
<%@ Import Namespace="Orchard.Comments.Models"%> <%@ Import Namespace="Orchard.Comments.Models"%>
<%@ Import Namespace="Orchard.Comments.ViewModels"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Comments for <%= Model.DisplayNameForCommentedItem %></h2>
<h2>Comments for <%= Model.DisplayNameForCommentedItem %></h2> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>">
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>"> <%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.None, "Choose action...")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.None, "Choose action...")%> <%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Delete, "Delete")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Delete, "Delete")%> <%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.MarkAsSpam, "Mark as Spam")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.MarkAsSpam, "Mark as Spam")%> </select>
</select> <input class="button roundCorners" type="submit" name="submit.BulkEdit" value="Apply" />
<input class="button roundCorners" type="submit" name="submit.BulkEdit" value="Apply" /> </fieldset>
</fieldset> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="filterResults">Filter: </label>
<label for="filterResults">Filter: </label> <select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>">
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>"> <%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.All, "All Comments")%>
<%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.All, "All Comments")%> <%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Approved, "Approved Comments")%>
<%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Approved, "Approved Comments")%> <%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Spam, "Spam")%>
<%=Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Spam, "Spam")%> </select>
</select> <input class="button roundCorners" type="submit" name="submit.Filter" value="Filter"/>
<input class="button roundCorners" type="submit" name="submit.Filter" value="Filter"/> </fieldset>
</fieldset> <div class="manage">
<div class="manage"> <% if (Model.CommentsClosedOnItem) {
<% if (Model.CommentsClosedOnItem) { %><%=Html.ActionLink("Enable Comments", "Enable", new { commentedItemId = Model.CommentedItemId }, new { @class = "button" })%><%
%><%=Html.ActionLink("Enable Comments", "Enable", new { commentedItemId = Model.CommentedItemId }, new { @class = "button" })%><% } else {
} else { %><%=Html.ActionLink("Close Comments", "Close", new { commentedItemId = Model.CommentedItemId }, new { @class = "button remove" })%><%
%><%=Html.ActionLink("Close Comments", "Close", new { commentedItemId = Model.CommentedItemId }, new { @class = "button remove" })%><% } %>
} %> </div>
</div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the comments in your application">
<table class="items" summary="This is a table of the comments in your application"> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> <col id="Col4" />
<col id="Col4" /> <col id="Col5" />
<col id="Col5" /> <col id="Col6" />
<col id="Col6" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Status</th>
<th scope="col">Status</th> <th scope="col">Author</th>
<th scope="col">Author</th> <th scope="col">Comment</th>
<th scope="col">Comment</th> <th scope="col">Date</th>
<th scope="col">Date</th> <th scope="col"></th>
<th scope="col"></th> </tr>
</tr> </thead>
</thead> <%
<% int commentIndex = 0;
int commentIndex = 0; foreach (var commentEntry in Model.Comments) {
foreach (var commentEntry in Model.Comments) { %>
%> <tr>
<tr> <td>
<td> <input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id%>" name="<%=Html.NameOf(m => m.Comments[commentIndex].Comment.Id)%>"/>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id%>" name="<%=Html.NameOf(m => m.Comments[commentIndex].Comment.Id)%>"/> <input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[commentIndex].IsChecked)%>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[commentIndex].IsChecked)%>"/> <input type="hidden" value="<%= Model.DisplayNameForCommentedItem %>" name="DisplayNameForCommentedtem" />
<input type="hidden" value="<%= Model.DisplayNameForCommentedItem %>" name="DisplayNameForCommentedtem" /> <input type="hidden" value="<%= Model.CommentedItemId %>" name="CommentedItemId" />
<input type="hidden" value="<%= Model.CommentedItemId %>" name="CommentedItemId" /> </td>
</td> <td><% if (commentEntry.Comment.Status == CommentStatus.Spam) {%> Spam <% } %>
<td><% if (commentEntry.Comment.Status == CommentStatus.Spam) {%> Spam <% } %> <% else {%> Approved <% } %>
<% else {%> Approved <% } %> </td>
</td> <td><%= commentEntry.Comment.UserName %></td>
<td><%= commentEntry.Comment.UserName %></td> <td>
<td> <% if (commentEntry.Comment.CommentText != null) {%>
<% if (commentEntry.Comment.CommentText != null) {%> <%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ...
<%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ... <% } %>
<% } %> </td>
</td> <td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td>
<td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td> <td>
<td> <%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> |
<%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> | <%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}) %>
<%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}) %> </td>
</td> </tr>
</tr> <%
<% commentIndex++;
commentIndex++; } %>
} %> </table>
</table> </fieldset>
</fieldset> <div class="manage">
<div class="manage"> <% if (Model.CommentsClosedOnItem) {
<% if (Model.CommentsClosedOnItem) { %><%=Html.ActionLink("Enable Comments", "Enable", new { commentedItemId = Model.CommentedItemId }, new { @class = "button" })%><%
%><%=Html.ActionLink("Enable Comments", "Enable", new { commentedItemId = Model.CommentedItemId }, new { @class = "button" })%><% } else {
} else { %><%=Html.ActionLink("Close Comments", "Close", new { commentedItemId = Model.CommentedItemId }, new { @class = "button remove" })%><%
%><%=Html.ActionLink("Close Comments", "Close", new { commentedItemId = Model.CommentedItemId }, new { @class = "button remove" })%><% } %>
} %> </div>
</div> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -2,33 +2,31 @@
<%@ Import Namespace="Orchard.Comments.Models"%> <%@ Import Namespace="Orchard.Comments.Models"%>
<%@ Import Namespace="Orchard.Comments.ViewModels"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Edit Comment</h2>
<h2>Edit Comment</h2> <% using(Html.BeginForm()) { %>
<% using(Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset class="who">
<fieldset class="who"> <label for="CommentName">Name</label>
<label for="CommentName">Name</label> <input id="CommentName" class="text" name="Name" type="text" value="<%=Model.Name %>" /><br />
<input id="CommentName" class="text" name="Name" type="text" value="<%=Model.Name %>" /><br /> <label for="CommentEmail">Email</label>
<label for="CommentEmail">Email</label> <input id="CommentEmail" class="text" name="Email" type="text" value="<%=Model.Email%>" /> <br />
<input id="CommentEmail" class="text" name="Email" type="text" value="<%=Model.Email%>" /> <br /> <label for="CommentSiteName">SiteName</label>
<label for="CommentSiteName">SiteName</label> <input id="CommentSiteName" class="text" name="SiteName" type="text" value="<%=Model.SiteName %>" />
<input id="CommentSiteName" class="text" name="SiteName" type="text" value="<%=Model.SiteName %>" /> </fieldset>
</fieldset> <fieldset class="what">
<fieldset class="what"> <label for="CommentText">Leave a comment</label>
<label for="CommentText">Leave a comment</label> <textarea id="Textarea1" rows="10" cols="30" name="CommentText"><%=Model.CommentText %></textarea>
<textarea id="Textarea1" rows="10" cols="30" name="CommentText"><%=Model.CommentText %></textarea> <input id="CommentId" name="Id" type="hidden" value="<%=Model.Id %>" />
<input id="CommentId" name="Id" type="hidden" value="<%=Model.Id %>" /> </fieldset>
</fieldset> <fieldset>
<fieldset> <label for="Status_Approved">
<label for="Status_Approved"> <%=Html.RadioButton("Status", "Approved", (Model.Status == CommentStatus.Approved), new { id = "Status_Approved" }) %> Approved
<%=Html.RadioButton("Status", "Approved", (Model.Status == CommentStatus.Approved), new { id = "Status_Approved" }) %> Approved </label>
</label> <label for="Status_Spam">
<label for="Status_Spam"> <%=Html.RadioButton("Status", "Spam", (Model.Status == CommentStatus.Spam), new { id = "Status_Spam" }) %> Mark As Spam
<%=Html.RadioButton("Status", "Spam", (Model.Status == CommentStatus.Spam), new { id = "Status_Spam" }) %> Mark As Spam </label>
</label> </fieldset>
</fieldset> <fieldset>
<fieldset> <input type="submit" class="button" value="Save" />
<input type="submit" class="button" value="Save" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -2,81 +2,79 @@
<%@ Import Namespace="Orchard.Comments.Models"%> <%@ Import Namespace="Orchard.Comments.Models"%>
<%@ Import Namespace="Orchard.Comments.ViewModels"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Manage Comments</h2>
<h2>Manage Comments</h2> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>">
<select id="publishActions" name="<%=Html.NameOf(m => m.Options.BulkAction)%>"> <%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, "Choose action...")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, "Choose action...")%> <%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, "Delete")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, "Delete")%> <%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, "Mark as Spam")%>
<%=Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, "Mark as Spam")%> </select>
</select> <input class="button" type="submit" name="submit.BulkEdit" value="Apply" />
<input class="button" type="submit" name="submit.BulkEdit" value="Apply" /> </fieldset>
</fieldset> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="filterResults">Filter: </label>
<label for="filterResults">Filter: </label> <select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>">
<select id="filterResults" name="<%=Html.NameOf(m => m.Options.Filter)%>"> <%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.All, "All Comments")%>
<%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.All, "All Comments")%> <%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Approved, "Approved Comments")%>
<%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Approved, "Approved Comments")%> <%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Spam, "Spam")%>
<%=Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Spam, "Spam")%> </select>
</select> <input class="button" type="submit" name="submit.Filter" value="Filter"/>
<input class="button" type="submit" name="submit.Filter" value="Filter"/> </fieldset>
</fieldset> <fieldset>
<fieldset> <table class="items" summary="This is a table of the comments in your application">
<table class="items" summary="This is a table of the comments in your application"> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> <col id="Col4" />
<col id="Col4" /> <col id="Col5" />
<col id="Col5" /> <col id="Col6" />
<col id="Col6" /> <col id="Col7" />
<col id="Col7" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Status</th>
<th scope="col">Status</th> <th scope="col">Author</th>
<th scope="col">Author</th> <th scope="col">Comment</th>
<th scope="col">Comment</th> <th scope="col">Date</th>
<th scope="col">Date</th> <th scope="col">Commented On</th>
<th scope="col">Commented On</th> <th scope="col"></th>
<th scope="col"></th> </tr>
</tr> </thead>
</thead> <%
<% int commentIndex = 0;
int commentIndex = 0; foreach (var commentEntry in Model.Comments) {
foreach (var commentEntry in Model.Comments) { %>
%> <tr>
<tr> <td>
<td> <input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id%>" name="<%=Html.NameOf(m => m.Comments[commentIndex].Comment.Id)%>"/>
<input type="hidden" value="<%=Model.Comments[commentIndex].Comment.Id%>" name="<%=Html.NameOf(m => m.Comments[commentIndex].Comment.Id)%>"/> <input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[commentIndex].IsChecked)%>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Comments[commentIndex].IsChecked)%>"/> </td>
</td> <td><% if (commentEntry.Comment.Status == CommentStatus.Spam) {%> Spam <% } %>
<td><% if (commentEntry.Comment.Status == CommentStatus.Spam) {%> Spam <% } %> <% else {%> Approved <% } %>
<% else {%> Approved <% } %> </td>
</td> <td><%= commentEntry.Comment.UserName %></td>
<td><%= commentEntry.Comment.UserName %></td> <td>
<td> <% if (commentEntry.Comment.CommentText != null) {%>
<% if (commentEntry.Comment.CommentText != null) {%> <%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ...
<%= commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %> ... <% } %>
<% } %> </td>
</td> <td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td>
<td><%= commentEntry.Comment.CommentDate.ToLocalTime() %></td> <td>
<td> <%=Html.ActionLink(commentEntry.CommentedOn, "Details", new {id = commentEntry.Comment.CommentedOn}) %>
<%=Html.ActionLink(commentEntry.CommentedOn, "Details", new {id = commentEntry.Comment.CommentedOn}) %> </td>
</td> <td>
<td> <%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> |
<%=Html.ActionLink("Edit", "Edit", new {commentEntry.Comment.Id}) %> | <%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Index"}) %>
<%=Html.ActionLink("Delete", "Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Index"}) %> </td>
</td> </tr>
</tr> <%
<% commentIndex++;
commentIndex++; } %>
} %> </table>
</table> </fieldset>
</fieldset> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,25 +3,23 @@
<%@ Import Namespace="Orchard.Media.Models"%> <%@ Import Namespace="Orchard.Media.Models"%>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add Media </h2>
<h2>Add Media </h2> <p>
<p> <%=Html.ActionLink("Media Folders", "Index")%> &#62;
<%=Html.ActionLink("Media Folders", "Index")%> &#62; <%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%> <%=Html.ActionLink(navigation.FolderName, "Edit",
<%=Html.ActionLink(navigation.FolderName, "Edit", new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
<% } %>
<% } %> Add Media</p>
Add Media</p> <% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%>
<% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="pageTitle">File Path - Multiple files must be in a zipped folder:</label>
<label for="pageTitle">File Path - Multiple files must be in a zipped folder:</label> <input id="FolderName" name="FolderName" type="hidden" value="<%= Model.FolderName %>" />
<input id="FolderName" name="FolderName" type="hidden" value="<%= Model.FolderName %>" /> <input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" />
<input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" /> <input id="MediaItemPath" name="MediaItemPath" type="file" class="text" value="Browse" size="64"/>
<input id="MediaItemPath" name="MediaItemPath" type="file" class="text" value="Browse" size="64"/> <input type="submit" class="button" value="Upload" /><br />
<input type="submit" class="button" value="Upload" /><br /> <span>After your files have been uploaded, you can edit the titles and descriptions.</span>
<span>After your files have been uploaded, you can edit the titles and descriptions.</span> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,21 +3,19 @@
<%@ Import Namespace="Orchard.Media.Helpers"%> <%@ Import Namespace="Orchard.Media.Helpers"%>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add a Folder</h2>
<h2>Add a Folder</h2> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
<p><%=Html.ActionLink("Media Folders", "Index")%> &#62; <%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%> <%=Html.ActionLink(navigation.FolderName, "Edit",
<%=Html.ActionLink(navigation.FolderName, "Edit", new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62; <% } %>
<% } %> Add a Folder</p>
Add a Folder</p> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="Name">Folder Name:</label>
<label for="Name">Folder Name:</label> <input id="Name" class="text" name="Name" type="text" />
<input id="Name" class="text" name="Name" type="text" /> <input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" />
<input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" /> <input type="submit" class="button" value="Save" />
<input type="submit" class="button" value="Save" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,91 +3,89 @@
<%@ Import Namespace="Orchard.Media.Helpers"%> <%@ Import Namespace="Orchard.Media.Helpers"%>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2 class="separator">Manage Folder</h2>
<h2 class="separator">Manage Folder</h2> <div class="manage"><%=Html.ActionLink("Folder Properties", "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button"})%></div>
<div class="manage"><%=Html.ActionLink("Folder Properties", "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button"})%></div> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
<p><%=Html.ActionLink("Media Folders", "Index")%> &#62; <%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%> <%=Html.ActionLink(navigation.FolderName, "Edit",
<%=Html.ActionLink(navigation.FolderName, "Edit", new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
<% } %>
<% } %> Manage Folder</p>
Manage Folder</p> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="Select1" name="publishActions">
<select id="Select1" name="publishActions"> <option value="1">Delete</option>
<option value="1">Delete</option> </select>
</select> <input class="button roundCorners" type="submit" value="Apply" />
<input class="button roundCorners" type="submit" value="Apply" /> </fieldset>
</fieldset> <div class="manage">
<div class="manage"> <%=Html.ActionLink("Add media", "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button" })%>
<%=Html.ActionLink("Add media", "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button" })%> <%=Html.ActionLink("Add a folder", "Create", new { Model.MediaPath }, new { @class = "button" })%>
<%=Html.ActionLink("Add a folder", "Create", new { Model.MediaPath }, new { @class = "button" })%> </div>
</div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the pages currently available for use in your application.">
<table class="items" summary="This is a table of the pages currently available for use in your application."> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> <col id="Col4" />
<col id="Col4" /> <col id="Col5" />
<col id="Col5" /> <col id="Col6" />
<col id="Col6" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Name</th>
<th scope="col">Name</th> <th scope="col">Author</th>
<th scope="col">Author</th> <th scope="col">Last Updated</th>
<th scope="col">Last Updated</th> <th scope="col">Type</th>
<th scope="col">Type</th> <th scope="col">Size</th>
<th scope="col">Size</th> </tr>
</tr> </thead>
</thead> <%foreach (var mediaFile in Model.MediaFiles) {
<%foreach (var mediaFile in Model.MediaFiles) { %>
%> <tr>
<tr> <td>
<td> <input type="checkbox" value="true" name="<%= "Checkbox.File." + mediaFile.Name %>"/>
<input type="checkbox" value="true" name="<%= "Checkbox.File." + mediaFile.Name %>"/> <input type="hidden" value="<%= Model.MediaPath %>" name="<%= mediaFile.Name %>" />
<input type="hidden" value="<%= Model.MediaPath %>" name="<%= mediaFile.Name %>" /> </td>
</td> <td>
<td> <%=Html.ActionLink(mediaFile.Name, "EditMedia", new { name = mediaFile.Name,
<%=Html.ActionLink(mediaFile.Name, "EditMedia", new { name = mediaFile.Name, lastUpdated = mediaFile.LastUpdated,
lastUpdated = mediaFile.LastUpdated, size = mediaFile.Size,
size = mediaFile.Size, folderName = mediaFile.FolderName,
folderName = mediaFile.FolderName, mediaPath = Model.MediaPath })%>
mediaPath = Model.MediaPath })%> </td>
</td> <td>Orchard User</td>
<td>Orchard User</td> <td><%= mediaFile.LastUpdated %></td>
<td><%= mediaFile.LastUpdated %></td> <td><%= mediaFile.Type %></td>
<td><%= mediaFile.Type %></td> <td><%= mediaFile.Size %></td>
<td><%= mediaFile.Size %></td> </tr>
</tr> <%}%>
<%}%> <%foreach (var mediaFolder in Model.MediaFolders) {
<%foreach (var mediaFolder in Model.MediaFolders) { %>
%> <tr>
<tr> <td>
<td> <input type="checkbox" value="true" name="<%= "Checkbox.Folder." + mediaFolder.Name %>"/>
<input type="checkbox" value="true" name="<%= "Checkbox.Folder." + mediaFolder.Name %>"/> <input type="hidden" value="<%= mediaFolder.MediaPath %>" name="<%= mediaFolder.Name %>" />
<input type="hidden" value="<%= mediaFolder.MediaPath %>" name="<%= mediaFolder.Name %>" /> </td>
</td> <td>
<td> <img src="<%=ResolveUrl("~/Packages/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16px" width="16px" class="mediaTypeIcon" alt="Folder" />
<img src="<%=ResolveUrl("~/Packages/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16px" width="16px" class="mediaTypeIcon" alt="Folder" /> <%=Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name,
<%=Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath})%>
mediaPath = mediaFolder.MediaPath})%> </td>
</td> <td>Orchard User</td>
<td>Orchard User</td> <td><%= mediaFolder.LastUpdated %></td>
<td><%= mediaFolder.LastUpdated %></td> <td>Folder</td>
<td>Folder</td> <td><%= mediaFolder.Size %></td>
<td><%= mediaFolder.Size %></td> </tr>
</tr> <%}%>
<%}%> </table>
</table> </fieldset>
</fieldset> <div class="manage">
<div class="manage"> <%=Html.ActionLink("Add media", "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button" })%>
<%=Html.ActionLink("Add media", "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button" })%> <%=Html.ActionLink("Add a folder", "Create", new { Model.MediaPath }, new { @class = "button" })%>
<%=Html.ActionLink("Add a folder", "Create", new { Model.MediaPath }, new { @class = "button" })%> </div>
</div> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,52 +3,50 @@
<%@ Import Namespace="Orchard.Media.Helpers"%> <%@ Import Namespace="Orchard.Media.Helpers"%>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Edit Media - <%= Model.Name %></h2>
<h2>Edit Media - <%= Model.Name %></h2> <p>
<p> <%=Html.ActionLink("Media Folders", "Index")%> &#62;
<%=Html.ActionLink("Media Folders", "Index")%> &#62; <%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%> <%=Html.ActionLink(navigation.FolderName, "Edit",
<%=Html.ActionLink(navigation.FolderName, "Edit", new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
<% } %>
<% } %> Edit Media </p>
Edit Media </p> <div class="sections">
<div class="sections"> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <div class="primary">
<div class="primary"> <h3>About this media</h3>
<h3>About this media</h3> <fieldset>
<fieldset> <label for="Name">Name:</label>
<label for="Name">Name:</label> <input id="Name" name="Name" type="hidden" value="<%= Model.Name %>"/>
<input id="Name" name="Name" type="hidden" value="<%= Model.Name %>"/> <input id="NewName" class="text" name="NewName" type="text" value="<%= Model.Name %>"/>
<input id="NewName" class="text" name="NewName" type="text" value="<%= Model.Name %>"/> <label for="Caption">Caption:</label>
<label for="Caption">Caption:</label> <input id="Caption" class="text" name="Caption" type="text" value="<%= Model.Caption %>"/>
<input id="Caption" class="text" name="Caption" type="text" value="<%= Model.Caption %>"/> <input id="LastUpdated" name="LastUpdated" type="hidden" value="<%= Model.LastUpdated %>"/>
<input id="LastUpdated" name="LastUpdated" type="hidden" value="<%= Model.LastUpdated %>"/> <input id="Size" name="Size" type="hidden" value="<%= Model.Size %>"/>
<input id="Size" name="Size" type="hidden" value="<%= Model.Size %>"/> <input id="FolderName" name="FolderName" type="hidden" value="<%= Model.FolderName %>"/>
<input id="FolderName" name="FolderName" type="hidden" value="<%= Model.FolderName %>"/> <input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" />
<input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" /> <span>This will be used for the image alt tag.</span>
<span>This will be used for the image alt tag.</span> </fieldset>
</fieldset> <fieldset>
<fieldset> <input type="submit" class="button" name="submit.Save" value="Save" />
<input type="submit" class="button" name="submit.Save" value="Save" /> <%--<input type="submit" class="button" name="submit.Delete" value="Delete" />--%>
<%--<input type="submit" class="button" name="submit.Delete" value="Delete" />--%> </fieldset>
</fieldset> </div>
</div> <div class="secondary">
<div class="secondary"> <h3>Preview</h3>
<h3>Preview</h3> <div><img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" /></div>
<div><img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" /></div> <ul>
<ul> <li><strong>Dimensions:</strong> 500 x 375 pixels</li>
<li><strong>Dimensions:</strong> 500 x 375 pixels</li> <li><strong>Size:</strong> <%= Model.Size %></li>
<li><strong>Size:</strong> <%= Model.Size %></li> <li><strong>Added on:</strong> <%= Model.LastUpdated %> by Orchard User</li>
<li><strong>Added on:</strong> <%= Model.LastUpdated %> by Orchard User</li> <li>
<li> <label for="embedPath">Embed:</label>
<label for="embedPath">Embed:</label> <input id="embedPath" class="inputText" name="embedPath" type="text" readonly="readonly" value="&lt;img src=&quot;<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>&quot; width=&quot;500&quot; height=&quot;375&quot; alt=&quot;<%= Model.Caption %>&quot; /&gt;" />
<input id="embedPath" class="inputText" name="embedPath" type="text" readonly="readonly" value="&lt;img src=&quot;<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>&quot; width=&quot;500&quot; height=&quot;375&quot; alt=&quot;<%= Model.Caption %>&quot; /&gt;" /> <p class="helperText">Copy this html to add this image to your site.</p>
<p class="helperText">Copy this html to add this image to your site.</p> </li>
</li> </ul>
</ul> </div>
</div> <% } %>
<% } %> </div>
</div>
<% Html.Include("AdminFoot"); %>

View File

@@ -3,23 +3,21 @@
<%@ Import Namespace="Orchard.Media.Helpers"%> <%@ Import Namespace="Orchard.Media.Helpers"%>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Folder Properties</h2>
<h2>Folder Properties</h2> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
<p><%=Html.ActionLink("Media Folders", "Index")%> &#62; <%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%> <%=Html.ActionLink(navigation.FolderName, "Edit",
<%=Html.ActionLink(navigation.FolderName, "Edit", new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> &#62;
<% } %>
<% } %> Folder Properties</p>
Folder Properties</p> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="Name">Folder Name:</label>
<label for="Name">Folder Name:</label> <input id="MediaPath" name="MediaPath" type="hidden" value="<%=Model.MediaPath %>" />
<input id="MediaPath" name="MediaPath" type="hidden" value="<%=Model.MediaPath %>" /> <input id="Name" class="text" name="Name" type="text" value="<%= Model.Name %>" />
<input id="Name" class="text" name="Name" type="text" value="<%= Model.Name %>" /> <input type="submit" class="button buttonFocus roundCorners" name="submit.Save" value="Save" />
<input type="submit" class="button buttonFocus roundCorners" name="submit.Save" value="Save" /> <%--<input type="submit" class="button buttonFocus roundCorners" name="submit.Delete" value="Delete" />--%>
<%--<input type="submit" class="button buttonFocus roundCorners" name="submit.Delete" value="Delete" />--%> </fieldset>
</fieldset> <%}%>
<%}%>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,54 +1,52 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MediaFolderIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MediaFolderIndexViewModel>" %>
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Manage Media Folders</h2>
<h2>Manage Media Folders</h2> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62; Manage Media Folders</p>
<p><%=Html.ActionLink("Media Folders", "Index")%> &#62; Manage Media Folders</p> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="Select1" name="publishActions">
<select id="Select1" name="publishActions"> <option value="1">Delete</option>
<option value="1">Delete</option> </select>
</select> <input class="button roundCorners" type="submit" value="Apply" />
<input class="button roundCorners" type="submit" value="Apply" /> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div>
<div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the media folders currently available for use in your application.">
<table class="items" summary="This is a table of the media folders currently available for use in your application."> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> <col id="Col4" />
<col id="Col4" /> <col id="Col5" />
<col id="Col5" /> <col id="Col6" />
<col id="Col6" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Name</th>
<th scope="col">Name</th> <th scope="col">Author</th>
<th scope="col">Author</th> <th scope="col">Last Updated</th>
<th scope="col">Last Updated</th> <th scope="col">Type</th>
<th scope="col">Type</th> <th scope="col">Size</th>
<th scope="col">Size</th> </tr>
</tr> </thead>
</thead> <%foreach (var mediaFolder in Model.MediaFolders) {
<%foreach (var mediaFolder in Model.MediaFolders) { %>
%> <tr>
<tr> <td><input type="checkbox" value="true" name="<%= "Checkbox." + mediaFolder.Name %>"/></td>
<td><input type="checkbox" value="true" name="<%= "Checkbox." + mediaFolder.Name %>"/></td> <td><img src="<%=ResolveUrl("~/Packages/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16px" width="16px" class="mediaTypeIcon" alt="Folder" />
<td><img src="<%=ResolveUrl("~/Packages/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16px" width="16px" class="mediaTypeIcon" alt="Folder" /> <%=Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath })%>
<%=Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath })%> </td>
</td> <td>Orchard User</td>
<td>Orchard User</td> <td><%=mediaFolder.LastUpdated %></td>
<td><%=mediaFolder.LastUpdated %></td> <td>Folder</td>
<td>Folder</td> <td><%=mediaFolder.Size %></td>
<td><%=mediaFolder.Size %></td> </tr>
</tr> <%}%>
<%}%> </table>
</table> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div>
<div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,43 +1,41 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<RoleCreateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<RoleCreateViewModel>" %>
<%@ Import Namespace="Orchard.Roles.ViewModels"%> <%@ Import Namespace="Orchard.Roles.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add Role</h2>
<h2>Add Role</h2> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <%=Html.ValidationSummary()%>
<%=Html.ValidationSummary()%> <fieldset>
<legend>Information</legend>
<label for="pageTitle">Role Name:</label>
<input id="Name" class="inputText inputTextLarge" name="Name" type="text" value="<%= Model.Name %>" />
</fieldset>
<fieldset>
<legend>Permissions</legend>
<% foreach (var packageName in Model.PackagePermissions.Keys) { %>
<fieldset> <fieldset>
<legend>Information</legend> <legend><%=packageName%> Module</legend>
<label for="pageTitle">Role Name:</label> <table class="items">
<input id="Name" class="inputText inputTextLarge" name="Name" type="text" value="<%= Model.Name %>" /> <colgroup>
</fieldset> <col id="Permission" />
<fieldset> <col id="Allow" />
<legend>Permissions</legend> </colgroup>
<% foreach (var packageName in Model.PackagePermissions.Keys) { %> <thead>
<fieldset>
<legend><%=packageName%> Module</legend>
<table class="items">
<colgroup>
<col id="Permission" />
<col id="Allow" />
</colgroup>
<thead>
<tr>
<th scope="col">Permission</th>
<th scope="col">Allow</th>
</tr>
</thead>
<% foreach (var permission in Model.PackagePermissions[packageName]) {%>
<tr> <tr>
<td><%=permission.Description%></td> <th scope="col">Permission</th>
<td style="width:60px;/* todo: (heskew) make not inline :("><input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>"/></td> <th scope="col">Allow</th>
</tr> </tr>
<% } %> </thead>
</table> <% foreach (var permission in Model.PackagePermissions[packageName]) {%>
</fieldset> <tr>
<% } %> <td><%=permission.Description%></td>
</fieldset> <td style="width:60px;/* todo: (heskew) make not inline :("><input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>"/></td>
<fieldset> </tr>
<input type="submit" class="button" value="Save" /> <% } %>
</fieldset> </table>
<% } %> </fieldset>
<% Html.Include("AdminFoot"); %> <% } %>
</fieldset>
<fieldset>
<input type="submit" class="button" value="Save" />
</fieldset>
<% } %>

View File

@@ -1,51 +1,49 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<RoleEditViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<RoleEditViewModel>" %>
<%@ Import Namespace="Orchard.Roles.ViewModels"%> <%@ Import Namespace="Orchard.Roles.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Edit Role</h2>
<h2>Edit Role</h2> <% using(Html.BeginForm()) { %>
<% using(Html.BeginForm()) { %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset>
<legend>Information</legend>
<label for="pageTitle">Role Name:</label>
<input id="Name" class="inputText inputTextLarge" name="Name" type="text" value="<%=Model.Name %>"/>
<input type="hidden" value="<%= Model.Id %>" name="Id" />
</fieldset>
<fieldset>
<legend>Permissions</legend>
<% foreach (var packageName in Model.PackagePermissions.Keys) { %>
<fieldset> <fieldset>
<legend>Information</legend> <legend><%=packageName%> Module</legend>
<label for="pageTitle">Role Name:</label> <table class="items">
<input id="Name" class="inputText inputTextLarge" name="Name" type="text" value="<%=Model.Name %>"/> <colgroup>
<input type="hidden" value="<%= Model.Id %>" name="Id" /> <col id="Col1" />
</fieldset> <col id="Col2" />
<fieldset> </colgroup>
<legend>Permissions</legend> <thead>
<% foreach (var packageName in Model.PackagePermissions.Keys) { %> <tr>
<fieldset> <th scope="col">Permission</th>
<legend><%=packageName%> Module</legend> <th scope="col">Allow</th>
<table class="items">
<colgroup>
<col id="Col1" />
<col id="Col2" />
</colgroup>
<thead>
<tr>
<th scope="col">Permission</th>
<th scope="col">Allow</th>
</tr>
</thead>
<% foreach (var permission in Model.PackagePermissions[packageName]) {%>
<tr>
<td><%=permission.Description%></td>
<td style="width:60px;/* todo: (heskew) make not inline :(">
<% if (Model.CurrentPermissions.Contains(permission.Name)) {%>
<input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>" checked="checked"/>
<% } else {%>
<input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>"/>
<% }%>
</td>
</tr> </tr>
<% } %> </thead>
</table> <% foreach (var permission in Model.PackagePermissions[packageName]) {%>
</fieldset> <tr>
<% } %> <td><%=permission.Description%></td>
</fieldset> <td style="width:60px;/* todo: (heskew) make not inline :(">
<fieldset> <% if (Model.CurrentPermissions.Contains(permission.Name)) {%>
<input type="submit" class="button" name="submit.Save" value="Save" /> <input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>" checked="checked"/>
<input type="submit" class="button" name="submit.Delete" value="Delete" /> <% } else {%>
</fieldset> <input type="checkbox" value="true" name="<%="Checkbox." + permission.Name%>"/>
<% } %> <% }%>
<% Html.Include("AdminFoot"); %> </td>
</tr>
<% } %>
</table>
</fieldset>
<% } %>
</fieldset>
<fieldset>
<input type="submit" class="button" name="submit.Save" value="Save" />
<input type="submit" class="button" name="submit.Delete" value="Delete" />
</fieldset>
<% } %>

View File

@@ -1,39 +1,37 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Roles.ViewModels.RolesIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Roles.ViewModels.RolesIndexViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Manage Roles</h2>
<h2>Manage Roles</h2> <% using(Html.BeginForm()) { %>
<% using(Html.BeginForm()) { %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="Select1" name="roleActions">
<select id="Select1" name="roleActions"> <option value="1">Delete</option>
<option value="1">Delete</option> </select>
</select> <input class="button" type="submit" value="Apply" />
<input class="button" type="submit" value="Apply" /> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a role", "Create", new {}, new { @class = "button" }) %></div>
<div class="manage"><%=Html.ActionLink("Add a role", "Create", new {}, new { @class = "button" }) %></div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the roles currently available for use in your application.">
<table class="items" summary="This is a table of the roles currently available for use in your application."> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Name</th>
<th scope="col">Name</th> <th scope="col"></th>
<th scope="col"></th> </tr>
</tr> </thead>
</thead> <%foreach (var row in Model.Rows) { %>
<%foreach (var row in Model.Rows) { %> <tr>
<tr> <td><input type="checkbox" value="true" name="<%= "Checkbox." + row.Id %>"/></td>
<td><input type="checkbox" value="true" name="<%= "Checkbox." + row.Id %>"/></td> <td><%=Html.Encode(row.Name) %></td>
<td><%=Html.Encode(row.Name) %></td> <td><%=Html.ActionLink("Edit", "Edit", new { row.Id })%></td>
<td><%=Html.ActionLink("Edit", "Edit", new { row.Id })%></td> </tr>
</tr> <%}%>
<%}%> </table>
</table> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,15 +1,13 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminCreateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminCreateViewModel>" %>
<%@ Import Namespace="Orchard.Tags.ViewModels"%> <%@ Import Namespace="Orchard.Tags.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add a Tag</h2>
<h2>Add a Tag</h2> <%-- todo: (heskew) change all of the explicit begin/end forms to using blocks --%>
<%-- todo: (heskew) change all of the explicit begin/end forms to using blocks --%> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="TagName">Name:</label>
<label for="TagName">Name:</label> <input id="TagName" class="text" name="TagName" type="text" value="<%= Model.TagName %>" />
<input id="TagName" class="text" name="TagName" type="text" value="<%= Model.TagName %>" /> <input type="submit" class="button" value="Save" />
<input type="submit" class="button" value="Save" /> </fieldset>
</fieldset> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,15 +1,13 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminEditViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminEditViewModel>" %>
<%@ Import Namespace="Orchard.Tags.ViewModels"%> <%@ Import Namespace="Orchard.Tags.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Edit a Tag</h2>
<h2>Edit a Tag</h2> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <fieldset>
<fieldset> <label for="Name">Name:</label>
<label for="Name">Name:</label> <input id="Id" name="Id" type="hidden" value="<%=Model.Id %>" />
<input id="Id" name="Id" type="hidden" value="<%=Model.Id %>" /> <input id="TagName" class="text" name="TagName" type="text" value="<%= Model.TagName %>" />
<input id="TagName" class="text" name="TagName" type="text" value="<%= Model.TagName %>" /> <input type="submit" class="button" value="Save" />
<input type="submit" class="button" value="Save" /> </fieldset>
</fieldset> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,52 +1,50 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminIndexViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsAdminIndexViewModel>" %>
<%@ Import Namespace="Orchard.Tags.ViewModels"%> <%@ Import Namespace="Orchard.Tags.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>Manage Tags</h2>
<h2>Manage Tags</h2> <% Html.BeginForm(); %>
<% Html.BeginForm(); %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset class="actions bulk">
<fieldset class="actions bulk"> <label for="publishActions">Actions: </label>
<label for="publishActions">Actions: </label> <select id="publishActions" name="<%=Html.NameOf(m => m.BulkAction)%>">
<select id="publishActions" name="<%=Html.NameOf(m => m.BulkAction)%>"> <%=Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, "Choose action...")%>
<%=Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, "Choose action...")%> <%=Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, "Delete")%>
<%=Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, "Delete")%> </select>
</select> <input class="button" type="submit" name="submit" value="Apply" />
<input class="button" type="submit" name="submit" value="Apply" /> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a tag", "Create", new { }, new { @class = "button" })%></div>
<div class="manage"><%=Html.ActionLink("Add a tag", "Create", new { }, new { @class = "button" })%></div> <fieldset>
<fieldset> <table class="items" summary="This is a table of the tags in your application">
<table class="items" summary="This is a table of the tags in your application"> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> <col id="Col3" />
<col id="Col3" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th> <th scope="col">Name</th>
<th scope="col">Name</th> <th scope="col"></th>
<th scope="col"></th> </tr>
</tr> </thead>
</thead> <%
<% int tagIndex = 0;
int tagIndex = 0; foreach (var tagEntry in Model.Tags) {
foreach (var tagEntry in Model.Tags) { %>
%> <tr>
<tr> <td>
<td> <input type="hidden" value="<%=Model.Tags[tagIndex].Tag.Id%>" name="<%=Html.NameOf(m => m.Tags[tagIndex].Tag.Id)%>"/>
<input type="hidden" value="<%=Model.Tags[tagIndex].Tag.Id%>" name="<%=Html.NameOf(m => m.Tags[tagIndex].Tag.Id)%>"/> <input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[tagIndex].IsChecked)%>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[tagIndex].IsChecked)%>"/> </td>
</td> <td>
<td> <%=Html.ActionLink(tagEntry.Tag.TagName, "Search", new {id = tagEntry.Tag.Id}) %>
<%=Html.ActionLink(tagEntry.Tag.TagName, "Search", new {id = tagEntry.Tag.Id}) %> </td>
</td> <td>
<td> <%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}) %>
<%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}) %> </td>
</td> </tr>
</tr> <% tagIndex++; } %>
<% tagIndex++; } %> </table>
</table> </fieldset>
</fieldset> <div class="manage"><%=Html.ActionLink("Add a tag", "Create", new { }, new { @class = "button" })%></div>
<div class="manage"><%=Html.ActionLink("Add a tag", "Create", new { }, new { @class = "button" })%></div> <% Html.EndForm(); %>
<% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %>

View File

@@ -2,29 +2,27 @@
<%@ Import Namespace="Orchard.Models"%> <%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Tags.ViewModels"%> <%@ Import Namespace="Orchard.Tags.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <h2>List of contents tagged with <%=Model.TagName %></h2>
<h2>List of contents tagged with <%=Model.TagName %></h2> <% using(Html.BeginForm()) { %>
<% using(Html.BeginForm()) { %> <%=Html.ValidationSummary() %>
<%=Html.ValidationSummary() %> <fieldset>
<fieldset> <table class="items">
<table class="items"> <colgroup>
<colgroup> <col id="Col1" />
<col id="Col1" /> <col id="Col2" />
<col id="Col2" /> </colgroup>
</colgroup> <thead>
<thead> <tr>
<tr> <th scope="col">Name</th>
<th scope="col">Name</th> <th scope="col">Link to the content item</th>
<th scope="col">Link to the content item</th> </tr>
</tr> </thead>
</thead> <% foreach (var contentItem in Model.Contents) { %>
<% foreach (var contentItem in Model.Contents) { %> <tr>
<tr> <td><%=Html.ItemDisplayText(contentItem)%></td>
<td><%=Html.ItemDisplayText(contentItem)%></td> <td><%=Html.ItemDisplayLink(contentItem)%></td>
<td><%=Html.ItemDisplayLink(contentItem)%></td> </tr>
</tr> <% } %>
<% } %> </table>
</table> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,13 +1,11 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Users.ViewModels.UserCreateViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Users.ViewModels.UserCreateViewModel>" %>
<%@ Import Namespace="Orchard.Security" %> <%@ Import Namespace="Orchard.Security" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Add User</h2>
<h2>Add User</h2> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <%= Html.EditorForModel() %>
<%= Html.EditorForModel() %> <fieldset>
<fieldset> <input class="button" type="submit" value="Create" />
<input class="button" type="submit" value="Create" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -1,14 +1,12 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Users.ViewModels.UserEditViewModel>" %> <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Users.ViewModels.UserEditViewModel>" %>
<%@ Import Namespace="Orchard.Security" %> <%@ Import Namespace="Orchard.Security" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Edit User</h2>
<h2>Edit User</h2> <%using (Html.BeginForm()) { %>
<%using (Html.BeginForm()) { %> <ol>
<ol> <%= Html.ValidationSummary() %>
<%= Html.ValidationSummary() %> <%= Html.EditorForModel() %>
<%= Html.EditorForModel() %> <fieldset>
<fieldset> <input class="button" type="submit" value="Save" />
<input class="button" type="submit" value="Save" /> </fieldset>
</fieldset> <% } %>
<% } %>
<% Html.Include("AdminFoot"); %>

View File

@@ -2,44 +2,42 @@
<%@ Import Namespace="Orchard.Models"%> <%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Security" %> <%@ Import Namespace="Orchard.Security" %>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <h2>Manage Users</h2>
<h2>Manage Users</h2> <% using (Html.BeginForm()) { %>
<% using (Html.BeginForm()) { %> <%=Html.ValidationSummary()%>
<%=Html.ValidationSummary()%> <%=Html.ActionLink("Add a new user", "Create", new { }, new { @class = "floatRight topSpacer" })%>
<%=Html.ActionLink("Add a new user", "Create", new { }, new { @class = "floatRight topSpacer" })%> <table class="items">
<table class="items"> <colgroup>
<colgroup> <col id="Name" />
<col id="Name" /> <col id="Email" />
<col id="Email" /> <col id="Edit" />
<col id="Edit" /> </colgroup>
</colgroup> <thead>
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Email
</th>
<th scope="col">
</th>
</tr>
</thead>
<% foreach (var row in Model.Rows)
{ %>
<tr> <tr>
<td> <th scope="col">
<%=Html.Encode(row.User.UserName)%> Name
</td> </th>
<td> <th scope="col">
<%=Html.Encode(row.User.Email)%> Email
</td> </th>
<td> <th scope="col">
<%=Html.ActionLink("Edit", "Edit", new { row.User.Id })%> </th>
</td>
</tr> </tr>
<%}%> </thead>
</table> <% foreach (var row in Model.Rows)
</div> { %>
<% } %> <tr>
<% Html.Include("AdminFoot"); %> <td>
<%=Html.Encode(row.User.UserName)%>
</td>
<td>
<%=Html.Encode(row.User.Email)%>
</td>
<td>
<%=Html.ActionLink("Edit", "Edit", new { row.User.Id })%>
</td>
</tr>
<%}%>
</table>
</div>
<% } %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

View File

@@ -0,0 +1,662 @@
/* begin: reset
todo: (heskew) pare down and combine with existing selectors where appropriate */
/* http://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border:0;
font-size:100%;
margin:0;
padding:0;
vertical-align:baseline;
}
ol, ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
ins {
text-decoration:none;
}
del {
text-decoration:line-through;
}
table {
border-collapse:collapse;
border-spacing:0;
}
/* end: reset */
/* Base setup
----------------------------------------------------------*/
html {
background:#8a8f7a;
color:#525e50;
}
body {
color:#5a5b32;
font-family:Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size:62.5%; /* 10px */
line-height:1.6em;
margin:0 auto 1em;
min-width:94.6em; /* 946px */
padding:0 .4em;
}
body#preview {
min-width:0;
}
#content {
background:#f9faf5;
}
/* Layout
number of columns: 24; actual width: 946; column width: 26; gutter width:14
| 24| 23| 22| 21| 20| 19| 18| 17| 16| 15| 14| 13| 12| 11| 10| 9| 8| 7| 6| 5| 4| 3| 2
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.5g| 0.759| 0.793| 0.829| 0.870| 0.914| 0.963| 1.017| 1.079| 1.148| 1.226| 1.316| 1.420| 1.542| 1.687| 1.862| 2.077| 2.349| 2.703| 3.182| 3.867| 4.930| 6.796| 10.938
24|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
23| 95.770|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
22| 91.540| 95.583|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
21| 87.310| 91.166| 95.379|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
20| 83.080| 86.750| 90.758| 95.155|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
19| 78.850| 82.333| 86.137| 90.311| 94.909|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
18| 74.620| 77.916| 81.517| 85.466| 89.817| 94.635|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
17| 70.390| 73.499| 76.896| 80.621| 84.726| 89.271| 94.331|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
16| 66.161| 69.083| 72.275| 75.776| 79.634| 83.906| 88.663| 93.991|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
15| 61.931| 64.666| 67.654| 70.932| 74.543| 78.542| 82.994| 87.982| 93.607|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
14| 57.701| 60.249| 63.033| 66.087| 69.452| 73.177| 77.326| 81.972| 87.213| 93.170|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
13| 53.471| 55.832| 58.412| 61.242| 64.360| 67.813| 71.657| 75.963| 80.820| 86.340| 92.669|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
12| 49.241| 51.416| 53.791| 56.398| 59.269| 62.448| 65.988| 69.954| 74.426| 79.510| 85.338| 92.089|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---| ---
11| 45.011| 46.999| 49.171| 51.553| 54.178| 57.084| 60.320| 63.945| 68.033| 72.680| 78.008| 84.178| 91.410|100.000| ---| ---| ---| ---| ---| ---| ---| ---| ---
10| 40.781| 42.582| 44.550| 46.708| 49.086| 51.719| 54.651| 57.935| 61.639| 65.849| 70.677| 76.268| 82.819| 90.602|100.000| ---| ---| ---| ---| ---| ---| ---| ---
9| 36.551| 38.165| 39.929| 41.863| 43.995| 46.355| 48.983| 51.926| 55.246| 59.019| 63.346| 68.357| 74.229| 81.205| 89.628|100.000| ---| ---| ---| ---| ---| ---| ---
8| 32.321| 33.749| 35.308| 37.019| 38.903| 40.990| 43.314| 45.917| 48.852| 52.189| 56.015| 60.446| 65.639| 71.807| 79.255| 88.427|100.000| ---| ---| ---| ---| ---| ---
7| 28.091| 29.332| 30.687| 32.174| 33.812| 35.626| 37.645| 39.908| 42.459| 45.359| 48.684| 52.535| 57.048| 62.410| 68.883| 76.855| 86.913|100.000| ---| ---| ---| ---| ---
6| 23.861| 24.915| 26.066| 27.329| 28.721| 30.261| 31.977| 33.898| 36.066| 38.529| 41.353| 44.625| 48.458| 53.012| 58.511| 65.282| 73.826| 84.942|100.000| ---| ---| ---| ---
5| 19.631| 20.498| 21.445| 22.484| 23.629| 24.897| 26.308| 27.889| 29.672| 31.699| 34.023| 36.714| 39.868| 43.614| 48.138| 53.709| 60.738| 69.884| 82.273|100.000| ---| ---| ---
4| 15.401| 16.082| 16.825| 17.640| 18.538| 19.532| 20.640| 21.880| 23.279| 24.869| 26.692| 28.803| 31.278| 34.217| 37.766| 42.136| 47.651| 54.826| 64.545| 78.453|100.000| ---| ---
3| 11.171| 11.665| 12.204| 12.795| 13.446| 14.168| 14.971| 15.871| 16.885| 18.039| 19.361| 20.892| 22.687| 24.819| 27.394| 30.564| 34.564| 39.768| 46.818| 56.906| 72.535|100.000| ---
2| 6.941| 7.248| 7.583| 7.950| 8.355| 8.803| 9.302| 9.861| 10.492| 11.208| 12.030| 12.982| 14.097| 15.422| 17.021| 18.991| 21.477| 24.710| 29.091| 35.359| 45.070| 62.136|100.000
1| 2.711| 2.831| 2.962| 3.106| 3.264| 3.439| 3.634| 3.852| 4.098| 4.378| 4.699| 5.071| 5.507| 6.024| 6.649| 7.418| 8.389| 9.653| 11.364| 13.812| 17.606| 24.272| 39.063
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 24| 23| 22| 21| 20| 19| 18| 17| 16| 15| 14| 13| 12| 11| 10| 9| 8| 7| 6| 5| 4| 3| 2
----------------------------------------------------------*/
#header, #footer {
width:100%;
}
#header {
overflow:hidden;
}
#content {
overflow:auto;
padding:1.4em;
}
#main {
display:inline;
float:right;
width:83.08%;
}
#navigation {
display:inline;
float:left;
width:15.401%;
}
.wrapper, .sections {
overflow:hidden;
}
.sections .primary {
display:inline;
float:left;
width:74.543%;
}
.sections .secondary {
display:inline;
float:left;
margin-left:1.71%;
width:23.629%;
}
/* Headings and defaults
----------------------------------------------------------*/
h1, h2, h3, h4, h5, legend {
padding:.4em 0;
font-family:"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
font-style: normal;
font-weight:normal;
}
h1 { font-size:2.8em; } /* 28px */
h2 { font-size:2.4em; } /* 24px */
h3 { font-size:2.1em; } /* 21px */
h3 span { font-size:.57em; } /* 12px */
h4 { font-size:1.8em; } /* 18px */
h5 { font-size:1.6em; } /* 16px */
h6, p, legend, label, input, select, .button,
.message, .validation-summary-errors,
table.items th, table.items td, table.items caption { font-size:1.5em; line-height:1.5em; } /* 15px */
p .button { font-size:inherit; }
.meta { font-size:1.2em; } /* 12px */
/* Links
----------------------------------------------------------*/
a, a:link, a:visited {
color:#1e5d7d;
text-decoration:none;
}
a:hover, a:active, a:focus {
color:#1e5d7d;
text-decoration:underline;
}
/* Header - Branding and Login
----------------------------------------------------------*/
#header {
background:#8a8f7a url(images/background_header.jpg) no-repeat bottom right;
height:60px;
}
#header h1 {
float:left;
}
#header h1 a {
background:url(images/orchardLogo.jpg) no-repeat;
display:block;
height:60px;
margin:-11px 0 0 14px;
text-indent:-9999px;
width:105px;
}
#site, #login {
font-size:1.5em;
}
#site a, #site a:visited, #site a:active {
color:#e2e4dd;
float:left;
line-height:2.2em;
padding:14px 0 0 12px;
position:relative;
}
#login {
color:#1a1505;
display:block;
float:right;
margin:20px 20px 0 0;
white-space:nowrap;
}
#login a, #login a:link, #login a:visited {
color:#e2e4dd;
padding:0;
}
#login a:hover, #login a:active, #login a:focus {
color:#ffea9b;
}
/* Navigation
----------------------------------------------------------*/
#navshortcut {
height:0;
overflow:hidden;
width:0;
}
#navigation li {
background:#fff;
border:1px solid #d2d6c6;
margin:10px 0 15px 0;
}
#navigation ul li {
border:0;
margin:0;
}
#navigation li h4 {
padding:0;
}
#navigation li h4 a, #navigation li h4 span {
background:#dddfcb url(images/tableHeaderBackground.gif) repeat-x top left;
display:block;
padding:6px 4px 8px 8px;
}
#navigation li h4 a, #navigation li h4 a:link, #navigation li h4 a:visited {
color:inherit;
}
#navigation li h4 a:hover, #navigation li h4 a:active, #navigation li h4 a:focus {
background:#8a8f7a;
color:#f6faea;
text-decoration:none;
}
#navigation ul a, #navigation ul a:link, #navigation ul a:visited {
color:#5a5b32;
display:block;
font-size:1.5em;
height:28px;
line-height:28px;
padding:0 0 0 12px;
text-decoration:none;
}
#navigation ul a:hover, #navigation ul a:active, #navigation ul a:focus {
background:#f0ecd2;
color: #3e4301;
text-decoration:underline;
}
/* Content
----------------------------------------------------------*/
#main h2 {
margin:.23em 0 1em;
}
#main h3, #main h4 {
margin:.5em 0;
}
#main p {
margin:0 0 1.5em;
}
#main .main.actions {
margin:0 0 1.4em;
}
#main .meta {
margin:-.4em 0 .4em;
}
#main form {
margin:.345em 0 1.5em;
}
#main h2 {
border-bottom:1px dashed #e4e7dc;
}
#main h3 {
border-bottom:1px solid #e4e7dc;
}
/* Confirmations, Messages and the like
----------------------------------------------------------*/
.message, .validation-summary-errors {
margin:10px 0 4px 0;
padding:4px;
}
span.message {
display:block;
margin:4px 0 4px 4px;
}
.message a {
font-weight:bold;
}
.confirmation.message {
background:#e6f1c9; /* green */
border:1px solid #cfe493;
}
.warning.message {
background:#fdf5bc; /* yellow */
border:1px solid #ffea9b;
}
/* todo: (heskew) what else (other inputs) needs this? */
.critical.message, .validation-summary-errors,
.input-validation-error.text-box, .input-validation-error.text {
border:1px solid #990808;
}
.critical.message, .validation-summary-errors {
background:#e68585; /* red */
color:#fff;
}
.info.message {
background:#fff; /* orange :P */
border:1px dashed #D2D6C6;
}
.debug.message {
background:#eee;
border:1px dashed #D2D6C6;
color:#7a7a7a;
margin:20px 0 14px 0;
}
.debug.message:before {
content:"DEBUG » ";
}
/* Forms
----------------------------------------------------------*/
fieldset.bulk.actions {
display:inline;
height:auto;
margin:0 1.4em -.7em 0;
padding-top:0;
}
label {
display: block;
font-weight:700;
}
fieldset.bulk.actions label, label.sub {
display:inline;
}
label span {
font-weight:normal;
}
label input {
vertical-align:text-top;
}
/* todo: (heskew) try to get .text on stuff like .text-box */
select, textarea, input.text, input.text-box {
padding:2px;
border:1px solid #d2d6c6;
color:#5a5b32;
}
input.text, input.text-box {
line-height:1.2em;
}
select:focus, textarea:focus, input.text:focus, input.text-box:focus {
border-color:#666d51;
}
.permalink input {
background:transparent;
border-color:#EAE9D9;
border-style:dashed;
margin-left:0;
width:350px;
}
.permalink input:focus {
background:#FFF;
border-color:#666d51;
border-style:solid;
}
input.large.text, textarea, fieldset {
clear:both;
}
fieldset {
margin:.7em 0 .4em;
}
textarea {
min-height:8em;
}
.primary input.large.text, .primary textarea {
margin:0;
padding:4px;
width:98%;
}
/* todo: (heskew) move editor specific style elsewhere */
.primary .mceEditor {
display:block;
margin:0;
}
.secondary fieldset {
margin:.446% 0 .446% .446%;
padding:4px;
width:98.662%;
}
button, .button, .button:link, .button:visited {
background:#dddfcb url(images/tableHeaderBackground.gif) repeat-x top left;
border:1px solid #d2d6c6;
color:#5a5b32;
cursor:pointer;
height:26px;
padding:0 8px 3px;
text-align:center;
}
button.remove, .remove.button, .remove.button:link, .remove.button:visited {
background-color:#DECCCA;
background-image:url(images/tableHeaderBackgroundRed.gif);
border-color:#d6c9c7;
color:#5c3732;
}
a.button, a.button:link, a.button:visited {
line-height:1em;
padding:.2em .6em;
}
button:hover, .button:hover,
button:active, .button:active,
button:focus, .button:focus {
background:#8a8f7a;
border-color:#666d51;
color:#f6faea;
text-decoration:none;
}
button:focus::-moz-focus-inner, .button:focus::-moz-focus-inner {
border-color:#8a8f7a;
}
button.remove:hover, .remove.button:hover,
button.remove:active, .remove.button:active,
button.remove:focus, .remove.button:focus {
background:#8f7c79;
border-color:#6e5551;
color:#faedeb;
}
button.remove:focus::-moz-focus-inner, .remove.button:focus::-moz-focus-inner {
border-color:#8f7c79;
}
.delete.button {
float:right;
}
.cancel {
margin:0 0 0 .93em;
}
.manage {
float:right;
margin:4px 0 6px 4px;
overflow:hidden;
}
.actions {
height:2em;
overflow:hidden;
padding:.6em 0 .1em;
text-align:right;
}
.actions .construct {
float:left;
}
.actions .destruct {
float:right;
}
.manage a.button {
float:right;
height:inherit;
margin-left:.3em;
padding-bottom:.3em;
padding-top:.3em;
}
/* Icon buttons
----------------------------------------------------------*/
a.ibutton, a.ibutton:link, a.ibutton:visited {
background:url(images/icons.png) 0 -20px;
border:none;
display:inline;
float:left;
height:17px;
overflow:hidden;
padding:0 0 0 17px;
width:0;
}
a.ibutton:hover, a.ibutton:active, a.ibutton:focus { background-position:0 0; }
a.ibutton.remove,
a.ibutton.remove:link,
a.ibutton.remove:visited { background-position:-20px -20px; }
a.ibutton.remove:hover, a.ibutton.remove:active, a.ibutton.remove:focus { background-position:-20px 0; }
a.ibutton.view,
a.ibutton.view:link,
a.ibutton.view:visited { background-position:-40px -20px; }
a.ibutton.view:hover, a.ibutton.view:active, a.ibutton.view:focus { background-position:-40px 0; }
a.ibutton.add.page,
a.ibutton.add.page:link,
a.ibutton.add.page:visited { background-position:-60px -20px; }
a.ibutton.add.page:hover, a.ibutton.add.page:active, a.ibutton.add.page:focus { background-position:-60px 0; }
a.ibutton.edit,
a.ibutton.edit:link,
a.ibutton.edit:visited { background-position:-80px -20px; }
a.ibutton.edit:hover, a.ibutton.edit:active, a.ibutton.edit:focus { background-position:-80px 0; }
a.ibutton.publish,
a.ibutton.publish:link,
a.ibutton.publish:visited { background-position:-100px -20px; }
a.ibutton.publish:hover, a.ibutton.publish:active, a.ibutton.publish:focus { background-position:-100px 0; }
a.ibutton.blog,
a.ibutton.blog:link,
a.ibutton.blog:visited { background-position:-120px -20px; }
a.ibutton.blog:hover, a.ibutton.blog:active, a.ibutton.blog:focus { background-position:-120px 0; }
/* todo: (heskew) needs attention */
.withActions {
overflow:hidden;
}
.withActions a {
display:inline;
float:left;
margin-right:7px;
}
/* Content item lists
----------------------------------------------------------*/
.contentItems {
background:#FFF;
border:1px solid #B0B083;
margin:1.4em 0;
padding:2px;
}
.contentItems li {
background:#FFF;
border-bottom:1px solid #EAE9D9;
margin:0;
overflow:hidden;
padding:.7em 1.4em;
}
.contentItems li.last {
border-bottom:0;
}
#main .contentItems li h3 {
border-bottom:0;
margin-top:0;
}
#main .contentItems li .actions {
color:#EAE9D9;
height:auto;
margin:-1.3em 0 0;
padding:0 0 .1em;
}
#main .contentItems li .actions .ibutton {
margin-right:6px;
}
#main .contentItems li .actions .destruct .ibutton {
margin-left:8px;
margin-right:0;
}
#main .contentItems li:hover { background:#fafbed; }
#main .contentItems li:hover a.ibutton { background-position:0 0; }
#main .contentItems li:hover a.ibutton.remove { background-position:-20px 0; }
#main .contentItems li:hover a.ibutton.view { background-position:-40px 0; }
#main .contentItems li:hover a.ibutton.add.page { background-position:-60px 0; }
#main .contentItems li:hover a.ibutton.edit { background-position:-80px 0; }
#main .contentItems li:hover a.ibutton.publish { background-position:-100px 0; }
#main .contentItems li:hover a.ibutton.blog { background-position:-120px 0; }
/* (Items) Tables
----------------------------------------------------------*/
table.items {
background:#fff;
border:1px solid #B0B083;
border-collapse:separate;
border-spacing:0;
width:100%;
}
table.items caption {
padding:8px 0;
text-indent:0;
}
table.items col {
border-spacing:0;
display:table-column;
}
table.items colgroup
{
border-spacing:0;
display:table-column-group;
}
table.items tbody {
border-spacing:0;
vertical-align:middle;
}
table.items thead, table.items th {
background:url(images/tableHeaderBackground.gif) repeat-x top left #dddfcb;
font-weight:700;
overflow:hidden;
text-align:left;
}
/* todo: (heskew) hook back up */
table.items tr.hover {
background-color:#f0f3d6;
}
table.items tr.critical {background:#e68585; border:inherit;}
table.items tr.warning {background:#fdf5bc; border:inherit;}
table.items th, table.items td {
border-bottom:1px solid #EAE9D9;
border-spacing:0px;
display:table-cell;
padding:8px 12px;
vertical-align:middle;
}
/* MISC.
todo: (heskew) pull out into relevant modules where appropriate
----------------------------------------------------------*/
/* CMSPages
----------------------------------------------------------*/
.templates fieldset {
margin:0 0 .933%;
}
.templates p {
overflow:hidden;
}
.templates p img {
float:left;
height:144px;
margin:.27em .93em .93em .54em;
width:124px;
}
.previewImage {
border:1px solid #525e50;
height:70%;
width:70%;
}
/* Rounded borders and other "works in some browsers" additions
----------------------------------------------------------*/
#content, #navigation li, button, .button,
table.items, textarea, input.text, input.text-box,
.contentItems, .message, .validation-summary-errors {
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
}
#navigation li h4 a {
-moz-border-radius:3px 3px 0 0;
-webkit-border-radius:3px 3px 0 0;
border-radius:3px 3px 0 0;
}

View File

@@ -0,0 +1 @@
name: The Admin

View File

@@ -0,0 +1,33 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BaseViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"
%><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title><%=Html.Title() %></title><%
Html.Zone("head", ":metas :styles :scripts"); %>
<%-- todo: (heskew) this should come from the admin "page" (partial)
todo: (heskew) should have at the minimum something like, say, includeScript(scriptName[, releaseScriptName], scriptPath[, releaseScriptPath])
--%><script src="<%=Page.ResolveClientUrl("~/Scripts/jquery-1.3.2.js") %>" type="text/javascript"></script>
<%-- todo: (heskew) this should come from the admin "page" (partial)
todo: (heskew) use the TinyMCE jQuery package instead?
--%><script type="text/javascript" src="<%=ResolveUrl("~/Packages/TinyMce/Scripts/tiny_mce.js") %>"></script>
<script type="text/javascript">
tinyMCE.init({
theme: "advanced",
mode: "specific_textareas",
editor_selector: "html",
plugins: "fullscreen,autoresize,searchreplace",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
theme_advanced_buttons2: "",
theme_advanced_buttons3: ""
});
</script>
</head>
<body><%
Html.ZoneBody("body"); %>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %><%
Html.RegisterStyle("site.css"); %>
<div id="header" role="banner">
<h1><%=Html.ActionLink("Project Orchard", "Index", new { Area = "", Controller = "Home" })%></h1>
<div id="site"><%=Html.ActionLink("Your Site", "Index", new { Area = "", Controller = "Home" })%></div>
<% if (Model.CurrentUser != null) { //todo: (heskew) localize the string format "User: <username> | a:logoff"
%><div id="login"><%="User"%>: <%=Html.Encode(Model.CurrentUser.UserName)%> | <%=Html.ActionLink("Logout", "LogOff", new { Area = "", Controller = "Account" }) %></div><%
} %>
</div>
<div id="content">
<div id="navshortcut"><a href="#navigation"><%="Skip to navigation" %></a></div>
<div id="main" role="main">
<div class="wrapper">
<% Html.RenderPartial("Messages", Model.Messages); %>
</div><%
Html.ZoneBody("content");
%> </div>
<ul id="navigation" role="navigation">
<li class="first"><h4><span>Dashboard</span></h4></li>
<%if (Model.AdminMenu != null) {
foreach (var menuSection in Model.AdminMenu) {
// todo: (heskew) need some help(er)
var firstSectionItem = menuSection.Items.FirstOrDefault();
var sectionHeaderMarkup = firstSectionItem != null
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
%>
<li><h4><%=sectionHeaderMarkup%></h4><ul><%foreach (var menuItem in menuSection.Items) { %>
<li><%=Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
<%} %></ul></li>
<%
}
}%>
</ul>
</div>
<div id="footer" role="contentinfo"><%
Html.Zone("footer");
%></div>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<configuration>
<system.web>
<httpHandlers>
<add path="*.aspx" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*.ascx" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*.master" verb="*" type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*.aspx,*.ascx,*.master" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
</handlers>
</system.webServer>
</configuration>

View File

@@ -1,25 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<AdminViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
</div><%-- .wrapper --%>
</div><%-- #main --%>
<ul id="navigation" role="navigation">
<li class="first"><h4><span>Dashboard</span></h4></li>
<%if (Model.AdminMenu != null) {
foreach (var menuSection in Model.AdminMenu) {
// todo: (heskew) need some help(er)
var firstSectionItem = menuSection.Items.FirstOrDefault();
var sectionHeaderMarkup = firstSectionItem != null
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
%>
<li><h4><%=sectionHeaderMarkup%></h4><ul><%foreach (var menuItem in menuSection.Items) { %>
<li><%=Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
<%} %></ul></li>
<%
}
}%>
</ul>
</div><%-- #content --%>
<div id="footer" role="contentinfo"></div><%-- #contentinfo --%>
</body>
</html>

View File

@@ -1,45 +0,0 @@
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<AdminViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
<%@ Import Namespace="Orchard.Mvc.Html"
%><%--
todo: (heskew) rework how/what pages are assembled when we get into theming --%><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<%-- todo: (heskew) get this from the menu system
--%><title>Admin :: Orchard</title>
<%-- todo: (heskew) same as scripts [below]
--%><link href="<%=Page.ResolveClientUrl("~/Content/Admin/css/base.css") %>" rel="stylesheet" type="text/css" />
<%-- todo: (heskew) this should come from the admin "page" (partial)
todo: (heskew) should have at the minimum something like, say, includeScript(scriptName[, releaseScriptName], scriptPath[, releaseScriptPath])
--%><script src="<%=Page.ResolveClientUrl("~/Scripts/jquery-1.3.2.js") %>" type="text/javascript"></script>
<%-- todo: (heskew) this should come from the admin "page" (partial)
todo: (heskew) use the TinyMCE jQuery package instead?
--%><script type="text/javascript" src="<%=ResolveUrl("~/Packages/TinyMce/Scripts/tiny_mce.js") %>"></script>
<script type="text/javascript">
tinyMCE.init({
theme: "advanced",
mode: "specific_textareas",
editor_selector: "html",
plugins: "fullscreen,autoresize,searchreplace",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
theme_advanced_buttons2: "",
theme_advanced_buttons3: ""
});
</script>
</head>
<body>
<div id="header" role="banner">
<h1><%=Html.ActionLink(T("Project Orchard").ToString(), "Index", new { Area = "", Controller = "Home" })%></h1>
<div id="site"><%=Html.ActionLink(T("Your Site").ToString(), "Index", new { Area = "", Controller = "Home" })%></div>
<% if (Model.CurrentUser != null) { //todo: (heskew) localize the string format "User: <username> | a:logoff"
%><div id="login"><%=T("User")%>: <%=H(Model.CurrentUser.UserName)%> | <%=Html.ActionLink(T("Logout").ToString(), "LogOff", new { Area = "", Controller = "Account" }) %></div><%
} %>
</div>
<div id="content">
<div id="navshortcut"><a href="#navigation"><%=T("Skip to navigation") %></a></div>
<div id="main" role="main">
<div class="wrapper">
<% Html.RenderPartial("Messages", Model.Messages); %>

View File

@@ -1,3 +1,4 @@
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<h1>DON'T USE THE MASTER PAGE!</h1>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" /> <asp:ContentPlaceHolder ID="TitleContent" runat="server" />
<asp:ContentPlaceHolder ID="MainContent" runat="server" /> <asp:ContentPlaceHolder ID="MainContent" runat="server" />

View File

@@ -6,6 +6,7 @@ using Orchard.Models.ViewModels;
namespace Orchard.Models.Driver { namespace Orchard.Models.Driver {
public class ContentItemTemplates<TContent> : TemplateFilterBase<TContent> where TContent : class, IContent { public class ContentItemTemplates<TContent> : TemplateFilterBase<TContent> where TContent : class, IContent {
private readonly string _templateName; private readonly string _templateName;
// todo: (heskew) use _prefix?
private readonly string _prefix; private readonly string _prefix;
private readonly string[] _displayTypes; private readonly string[] _displayTypes;
private Action<UpdateEditorModelContext, ItemEditorModel<TContent>> _updater; private Action<UpdateEditorModelContext, ItemEditorModel<TContent>> _updater;
@@ -18,7 +19,7 @@ namespace Orchard.Models.Driver {
protected override void BuildDisplayModel(BuildDisplayModelContext context, TContent instance) { protected override void BuildDisplayModel(BuildDisplayModelContext context, TContent instance) {
var longestMatch = LongestMatch(context.DisplayType); var longestMatch = LongestMatch(context.DisplayType);
context.DisplayModel.TemplateName = _templateName + longestMatch; context.DisplayModel.TemplateName = _templateName + "/" + longestMatch;
context.DisplayModel.Prefix = _prefix; context.DisplayModel.Prefix = _prefix;
if (context.DisplayModel.GetType() != typeof(ItemDisplayModel<TContent>)) { if (context.DisplayModel.GetType() != typeof(ItemDisplayModel<TContent>)) {
@@ -46,7 +47,7 @@ namespace Orchard.Models.Driver {
} }
protected override void BuildEditorModel(BuildEditorModelContext context, TContent instance) { protected override void BuildEditorModel(BuildEditorModelContext context, TContent instance) {
context.EditorModel.TemplateName = _templateName; context.EditorModel.TemplateName = _templateName + "/Detail";
context.EditorModel.Prefix = _prefix; context.EditorModel.Prefix = _prefix;
if (context.EditorModel.GetType() != typeof(ItemEditorModel<TContent>)) { if (context.EditorModel.GetType() != typeof(ItemEditorModel<TContent>)) {
context.EditorModel.Adaptor = (html, viewModel) => { context.EditorModel.Adaptor = (html, viewModel) => {

View File

@@ -1,4 +1,5 @@
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Routing;
namespace Orchard.UI.Resources { namespace Orchard.UI.Resources {
public interface IResourceManager : IDependency { public interface IResourceManager : IDependency {
@@ -7,8 +8,8 @@ namespace Orchard.UI.Resources {
void RegisterHeadScript(string fileName); void RegisterHeadScript(string fileName);
void RegisterFootScript(string fileName); void RegisterFootScript(string fileName);
MvcHtmlString GetMetas(); MvcHtmlString GetMetas();
MvcHtmlString GetStyles(); MvcHtmlString GetStyles(RequestContext requestContext);
MvcHtmlString GetHeadScripts(); MvcHtmlString GetHeadScripts(RequestContext requestContext);
MvcHtmlString GetFootScripts(); MvcHtmlString GetFootScripts(RequestContext requestContext);
} }
} }

View File

@@ -15,9 +15,9 @@ namespace Orchard.UI.Resources {
if (model != null) { if (model != null) {
model.Zones.AddAction("head:metas", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetMetas())); model.Zones.AddAction("head:metas", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetMetas()));
model.Zones.AddAction("head:styles", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetStyles())); model.Zones.AddAction("head:styles", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetStyles(filterContext.RequestContext)));
model.Zones.AddAction("head:scripts", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetHeadScripts())); model.Zones.AddAction("head:scripts", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetHeadScripts(filterContext.RequestContext)));
model.Zones.AddAction("body:after", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetFootScripts())); model.Zones.AddAction("body:after", html => html.ViewContext.HttpContext.Response.Output.Write(_resourceManager.GetFootScripts(filterContext.RequestContext)));
} }
} }

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Routing;
using Orchard.Extensions; using Orchard.Extensions;
using Orchard.Themes; using Orchard.Themes;
@@ -53,17 +54,16 @@ namespace Orchard.UI.Resources {
MvcHtmlString.Create(string.Join("\r\n", MvcHtmlString.Create(string.Join("\r\n",
_metas.Select(m => string.Format(MetaFormat, m.Key, m.Value)).ToArray())); _metas.Select(m => string.Format(MetaFormat, m.Key, m.Value)).ToArray()));
} }
public MvcHtmlString GetStyles(RequestContext requestContext) {
public MvcHtmlString GetStyles() { return GetFiles(_styles, StyleFormat, s => GetThemePath("/styles/" + s, requestContext));
return GetFiles(_styles, StyleFormat, s => GetThemePath("/styles/" + s));
} }
public MvcHtmlString GetHeadScripts() { public MvcHtmlString GetHeadScripts(RequestContext requestContext) {
return GetFiles(_headScripts, ScriptFormat, s => GetThemePath("/scripts/" + s)); return GetFiles(_headScripts, ScriptFormat, s => GetThemePath("/scripts/" + s, requestContext));
} }
public MvcHtmlString GetFootScripts() { public MvcHtmlString GetFootScripts(RequestContext requestContext) {
return GetFiles(_footScripts, ScriptFormat, s => GetThemePath("/scripts/" + s)); return GetFiles(_footScripts, ScriptFormat, s => GetThemePath("/scripts/" + s, requestContext));
} }
private static MvcHtmlString GetFiles(IEnumerable<string> files, string fileFormat, Func<string, string> getPath) { private static MvcHtmlString GetFiles(IEnumerable<string> files, string fileFormat, Func<string, string> getPath) {
@@ -72,8 +72,8 @@ namespace Orchard.UI.Resources {
files.Select(s => string.Format(fileFormat, getPath(s))).ToArray())); files.Select(s => string.Format(fileFormat, getPath(s))).ToArray()));
} }
private string GetThemePath(string fileName) { private string GetThemePath(string fileName, RequestContext requestContext) {
var requestTheme = _themeService.GetRequestTheme(null); // <- todo: (erikpo) will need context eventually var requestTheme = _themeService.GetRequestTheme(requestContext); // <- todo: (erikpo) will need context eventually
if (requestTheme == null) if (requestTheme == null)
return fileName; return fileName;