Brining in some earlier admin work from Jon that looks like it never really got merged.

* Still need to verify I'm pulling in the changes from revs 657 & 665 correctly/completely

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-02-17 01:14:29 -08:00
parent ee30cb155b
commit 227b0181b5
17 changed files with 247 additions and 116 deletions

View File

@@ -24,6 +24,6 @@
<%= Html.EditorForItem(Model.ViewModel) %>
<fieldset>
<%=Html.EditorFor(s => s.Id) %>
<input class="button" type="submit" value="<%=_Encoded("Save") %>" />
<input class="button primaryAction" type="submit" value="<%=_Encoded("Save") %>" />
</fieldset>
<% } %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

View File

@@ -111,6 +111,11 @@
<Compile Include="ViewModels\BlogEditViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Admin\images\draft.gif" />
<Content Include="Content\Admin\images\offline.gif" />
<Content Include="Content\Admin\images\online.gif" />
<Content Include="Content\Admin\images\published.gif" />
<Content Include="Content\Admin\images\scheduled.gif" />
<Content Include="Module.txt" />
<Content Include="Scripts\archives.js" />
<Content Include="Scripts\jquery.ui.core.js" />

View File

@@ -5,19 +5,19 @@
<h1 class="withActions">
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.TitleForPage(Model.Item.Name) %></a>
</h1>
<ul class="actions">
<li class="construct">
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit" title="<%=_Encoded("Edit Blog") %>"></a>
</li>
<li class="destruct">
<% using (Html.BeginFormAntiForgeryPost(Url.BlogDelete(Model.Item.Slug), FormMethod.Post, new { @class = "inline" })) { %>
<fieldset>
<button type="submit" class="ibutton remove" title="<%=_Encoded("Remove Blog") %>"><%=_Encoded("Remove Blog") %></button>
</fieldset><%
} %>
</li>
</ul>
<p><%=Html.Encode(Model.Item.Description) %></p>
<%--<form>
<fieldset class="actions bulk">
<label for="filterResults"><%=_Encoded("Filter:")%></label>
<select id="filterResults" name="">
<option value="">All Posts</option>
<option value="">Published Posts</option>
</select>
<input class="button" type="submit" name="submit.Filter" value="<%=_Encoded("Apply") %>"/>
</fieldset>
</form>--%>
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item.Slug) %>" class="add button"><%=_Encoded("New Post")%></a></div>
<% Html.Zone("primary");
Html.ZonesAny(); %>

View File

@@ -6,26 +6,69 @@
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h2><%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id)) %></h2>
<div class="meta"><%=Html.PublishedState(Model.Item) %> | <%Html.Zone("meta");%></div>
<div class="content"><%=Model.Item.As<BodyAspect>().Text ?? string.Format("<p><em>{0}</em></p>", _Encoded("there's no content for this blog post"))%></div>
<ul class="actions">
<li class="construct">
<a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit" title="<%=_Encoded("Edit Post")%>"><%=_Encoded("Edit Post")%></a>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton view" title="<%=_Encoded("View Post")%>"><%=_Encoded("View Post")%></a><%
if (Model.Item.ContentItem.VersionRecord.Published == false) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^
using (Html.BeginFormAntiForgeryPost(Url.BlogPostPublish(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %>
<fieldset>
<button type="submit" class="ibutton publish" title="<%=_Encoded("Publish Post Now") %>"><%=_Encoded("Publish Post Now")%></button>
</fieldset><%
}
} %>
<ul>
<li class="properties">
<h3><%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id))%></h3>
<ul>
<li>
<%if (Model.IsPublished)
{ %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" /><%=_Encoded(" Published")%>
<% }
else
{ %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" /><%=_Encoded(" Not Published")%>
<% } %>
&nbsp;&#124;&nbsp;
</li>
<li>
<% if (Model.IsDraft) { %>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The post has a draft") %>" /><%=Html.PublishedState(Model.Item)%>
<% }
else
{ %>
<%=_Encoded("No draft")%>
<% } %>
&nbsp;&#124;&nbsp;
</li>
<%--This should show publised date, last modified, or scheduled.
<li>
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/scheduled.gif") %>" alt="<%=_Encoded("Scheduled") %>" title="<%=_Encoded("The post is scheduled for publishing") %>" /><%=_Encoded("Scheduled")%>
&nbsp;&#124;&nbsp;
</li>--%>
<li>
<%=_Encoded("By {0}", Model.Item.Creator.UserName)%>
</li>
</ul>
</li>
<li class="destruct">
<li class="related">
<%if (Model.IsPublished){ %>
<a href="<%=Url.BlogPost(Model.Item.Blog.Slug, Model.Item.Slug) %>" title="<%=_Encoded("View Post")%>"><%=_Encoded("View")%></a><%=_Encoded(" | ")%>
<% } %>
<a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" title="<%=_Encoded("Edit Post")%>"><%=_Encoded("Edit")%></a><%=_Encoded(" | ")%>
<%if (Model.Item.ContentItem.VersionRecord.Published == false) { // todo: (heskew) be smart about this and maybe have other contextual actions - including view/preview for view up there ^^
using (Html.BeginFormAntiForgeryPost(Url.BlogPostPublish(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %>
<button type="submit" class="linkButton" title="<%=_Encoded("Publish") %>"><%=_Encoded("Publish")%></button><%=_Encoded(" | ")%><%
}
} %>
<% using (Html.BeginFormAntiForgeryPost(Url.BlogPostDelete(Model.Item.Blog.Slug, Model.Item.Id), FormMethod.Post, new { @class = "inline" })) { %>
<fieldset>
<button type="submit" class="ibutton remove" title="<%=_Encoded("Remove Post") %>"><%=_Encoded("Remove Post") %></button>
</fieldset><%
} %>
<button type="submit" class="linkButton" title="<%=_Encoded("Delete") %>"><%=_Encoded("Delete") %></button>
<%
} %>
<br /><%Html.Zone("meta");%>
</li>
<li style="clear:both;"></li>
</ul>

View File

@@ -10,7 +10,7 @@
<div class="secondary">
<% Html.Zone("secondary");%>
<fieldset>
<input class="button" type="submit" name="submit.Save" value="<%=_Encoded("Save") %>"/>
<input class="button primaryAction" type="submit" name="submit.Save" value="<%=_Encoded("Save") %>"/>
<% if (Model.IsDraft) { %>
<%=Html.ActionLink(T("Discard Draft").ToString(), "DiscardDraft", new { Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id=Model.Item.Id }, new { @class = "button" })%>
<% } %>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 642 B

View File

@@ -26,81 +26,82 @@
</select>
<input class="button" type="submit" name="submit.Filter" value="<%=_Encoded("Apply") %>"/>
</fieldset>
<fieldset>
<table class="items" summary="<%=_Encoded("This is a table of the PageEntries currently available for use in your application.") %>">
<colgroup>
<col id="Actions" />
<col id="Status" />
<col id="Title" />
<col id="Author" />
<col id="LastUpdated" />
<col id="Draft" />
<col id="Timer" />
<col id="Edit" />
</colgroup>
<thead>
<tr>
<th scope="col">&nbsp;&darr;<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
<th scope="col"><%=_Encoded("Status")%></th>
<th scope="col"><%=_Encoded("Title")%></th>
<th scope="col"><%=_Encoded("Slug")%></th>
<th scope="col"><%=_Encoded("Author")%></th>
<th scope="col"><%=_Encoded("Draft")%></th>
<th scope="col"><%=_Encoded("Scheduled")%></th>
<th scope="col"></th>
</tr>
</thead>
<fieldset>
<ul class="contentItems" style="margin-top:0;">
<%
int pageIndex = 0;
foreach (var pageEntry in Model.PageEntries)
{
var pi = pageIndex; %>
<tr>
<td>
<li style="padding:1em .5em;">
<div style="float:left;">
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pi].IsChecked) %>"/>
</td>
<td>
<h3 style="border-bottom:none; margin:0; padding:0; display:inline;"><%=Html.Encode(pageEntry.Page.Title ?? T("(no title)").ToString())%></h3>
<p style="margin:.5em 0;">
<%--Published or not--%>
<% if (pageEntry.Page.HasPublished)
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" />
<img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%=_Encoded("Online") %>" title="<%=_Encoded("The page is currently online") %>" style="<%=_Encoded("margin:0 0 -2px 0;") %>" /><%=_Encoded(" Published |") %>
<% }
else
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" />
<img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%=_Encoded("Offline") %>" title="<%=_Encoded("The page is currently offline") %>" style="margin:0 0 -2px 0;" /><%=_Encoded(" Not Published |")%>
<% } %>
</td>
<td><%=Html.Encode(pageEntry.Page.Title ?? T("(no title)").ToString())%></td>
<td><% if (pageEntry.Page.HasPublished)
{ %>
<%=Html.ActionLink(!string.IsNullOrEmpty(pageEntry.Page.Slug) ? pageEntry.Page.Slug : T("(no slug)").ToString(), "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug })%>
<%--Does the page have a draft--%>
<% if (pageEntry.Page.HasDraft)
{ %>
<img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The page has a draft") %>" style="margin:0 0 -2px 0;" /><%=_Encoded(" Draft")%>
<% }
else
{%>
<%=Html.Encode(pageEntry.Page.Slug ?? T("(no slug)").ToString())%>
<% } %>
</td>
<td><%=_Encoded("By {0}", pageEntry.Page.Creator.UserName)%></td>
<td>
<% if (pageEntry.Page.HasDraft)
{ %>
<img src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%=_Encoded("Draft") %>" title="<%=_Encoded("The page has a draft") %>" />
else
{ %>
<%=_Encoded("No Draft")%>
<% } %>
</td>
<td>
<%--Scheduled--%>
<% if (!pageEntry.Page.IsPublished)
{ %>
<%=pageEntry.Page.ScheduledPublishUtc != null
? string.Format("{0:d}<br />{0:t}", pageEntry.Page.ScheduledPublishUtc.Value)
: ""%>
<% } %>
</td>
<td><%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%></td>
</tr>
<%if (pageEntry.Page.ScheduledPublishUtc != null) { %>
<%=" | " %>
<img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%=_Encoded("Scheduled") %>" title="<%=_Encoded("The page is scheduled for publishing") %>" style="margin:0 0 -2px 0;" />
<%=string.Format("Scheduled: {0:d}", pageEntry.Page.ScheduledPublishUtc.Value) %>
<% }%>
<% } %>
<%--Author--%>
<%=_Encoded(" | By {0}", pageEntry.Page.Creator.UserName)%>
</p>
</div>
<div style="float:right;">
<span style="margin:0; text-align:right; font-size:1.4em;">
<% if (pageEntry.Page.HasPublished)
{ %>
<%=Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug })%>
<%=_Encoded("|")%>
<% }
else
{%>
<%=""%>
<% } %>
<%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%>
</span>
</div>
<div style="clear:both;"></div>
</li>
<%
pageIndex++;
} %>
</table>
</ul>
</fieldset>
<% } %>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button" })%></div>
<div class="manage"><%=Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button" })%></div>

View File

@@ -10,7 +10,7 @@
<div class="secondary">
<% Html.Zone("secondary");%>
<fieldset>
<input class="button" type="submit" name="submit.Save" value="<%=_Encoded("Save") %>"/>
<input class="button primaryAction" type="submit" name="submit.Save" value="<%=_Encoded("Save") %>"/>
<% if (Model.IsDraft) { %>
<%=Html.ActionLink(T("Discard Draft").ToString(), "DiscardDraft", new { Area = "Orchard.Pages", Controller = "Admin", Model.Item.Id }, new { @class = "button" })%>
<% } %>

View File

@@ -241,6 +241,7 @@
<Content Include="Themes\TheAdminClassic\Views\Layout.ascx" />
<Content Include="Themes\TheAdminClassic\Views\Menu.ascx" />
<Content Include="Themes\TheAdminClassic\Views\User.ascx" />
<Content Include="Themes\TheAdmin\Styles\images\backgroundGradient.gif" />
<Content Include="Themes\TheAdmin\Styles\images\backgroundHeader.gif" />
<Content Include="Themes\TheAdmin\Styles\images\orchardLogo.gif" />
<Content Include="Themes\TheAdmin\Views\Menu.ascx" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

View File

@@ -60,7 +60,7 @@ body#preview {
min-width:0;
}
#content {
background:#fff;
background:#fcfcfc;
}
@@ -134,7 +134,6 @@ number of columns: 24; actual width: 946; column width: 26; gutter width:14
width:23.629%;
}
/* Headings and defaults
----------------------------------------------------------*/
h1, h2, h3, h4, h5, legend {
@@ -149,10 +148,9 @@ h3 { font-size:1.8em; } /* 18px */
h4 { font-size:1.6em; } /* 16px */
h5 { font-size:1.4em; } /* 14px */
h6, p, legend, label, input, select, .button,
h6, p, label, input, select, .button,
.message, .validation-summary-errors,
table.items th, table.items td, table.items caption { font-size:1.4em; line-height:1.4em; } /* 14px */
table.items p, table.items label, table.items input, table.items .button { font-size:1em; line-height:1em; }
p .button { font-size:inherit; }
.meta, .hint { font-size:1.2em; } /* 12px */
@@ -233,7 +231,6 @@ a:hover, a:active, a:focus {
}
#navigation li {
background:#fff;
margin:7px 0 20px 0;
}
#navigation ul li {
@@ -330,8 +327,14 @@ span.message {
color:#fff;
}
.info.message {
background:#fff; /* orange :P */
border:1px dashed #D2D6C6;
background:#e4ebef; /* blue */
border:1px solid #4687AD;
color:#062232;
}
.info.message {
background:#e6e7ef; /* blue */
border:1px solid #b5b9c4;
color:#062232;
}
.debug.message {
background:#eee;
@@ -358,13 +361,18 @@ fieldset.bulk.actions {
margin:0 1.4em 0 0;
padding-top:0;
}
legend {
font-size:1.6em;
font-weight:600;
font-weight:bold;
}
label {
display: block;
font-weight:600;
color:#1d1b1b;
}
label.forcheckbox {
display:inline;
line-height:1.8em;
}
fieldset.bulk.actions label, label.sub {
display:inline;
@@ -384,8 +392,7 @@ label input {
/* todo: (heskew) try to get .text on stuff like .text-box */
select, textarea, input.text, input.text-box {
padding:2px;
border:1px solid #ddd;
color:#000;
border:1px solid #bdbcbc;
}
input.text, input.text-box {
line-height:1.2em;
@@ -413,7 +420,22 @@ input.large.text, textarea, fieldset {
clear:both;
}
fieldset {
margin:.7em 0 .4em;
margin:1.8em 0 .4em 0;
}
/* Settings page styles */
.settings fieldset {
margin:.5em 0;
border-bottom:1px solid #eaeaea;
padding:1em;
}
.settings fieldset div, .settings .button {
margin:1em 0 .5em 1em;
}
.settings legend {
margin:0 0 -.4em 0;
}
.settings input.text, .settings input.text-box {
width:26em;
}
textarea {
min-height:8em;
@@ -423,7 +445,6 @@ textarea {
padding:4px;
width:98%;
}
/* todo: (heskew) move editor specific style elsewhere */
.primary .mceEditor {
display:block;
@@ -443,16 +464,17 @@ button, .button, .button:link, .button:visited {
text-align:center;
padding:0 .8em .1em .8em;
}
.primaryAction{
background:#4687ad;
border:1px solid #8f8f8f;
color:#fff;
}
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 {
@@ -506,7 +528,6 @@ button.remove:focus::-moz-focus-inner, .remove.button:focus::-moz-focus-inner {
float:right;
height:inherit;
margin-left:.3em;
padding-bottom:.3em;
}
@@ -568,19 +589,18 @@ button.ibutton {
----------------------------------------------------------*/
.contentItems {
background:#FFF;
border:1px solid #B0B083;
margin:1.4em 0;
padding:2px;
}
.contentItems li {
background:#FFF;
border-bottom:1px solid #EAE9D9;
border-bottom:1px solid #eaeaea;
margin:0;
overflow:hidden;
padding:.7em 1.4em;
padding:.4em 1.4em;
}
.contentItems li.last {
border-bottom:0;
.contentItems li.first {
background:#fff url(images/backgroundGradient.gif) repeat-x top left;
}
#main .contentItems li h3 {
border-bottom:0;
@@ -599,7 +619,7 @@ button.ibutton {
margin-left:8px;
margin-right:0;
}
#main .contentItems li:hover { background:#fafbed; }
#main .contentItems li:hover { background:#f8f8f8; }
#main .contentItems li:hover .ibutton { background-position:0 0; }
#main .contentItems li:hover .ibutton.remove { background-position:-20px 0; }
#main .contentItems li:hover .ibutton.view { background-position:-40px 0; }
@@ -641,6 +661,10 @@ table.items thead, table.items th {
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 {
@@ -693,4 +717,61 @@ table.items, textarea, input.text, input.text-box,
-moz-border-radius:3px 3px 0 0;
-webkit-border-radius:3px 3px 0 0;
border-radius:3px 3px 0 0;
}*/
}*/
/* Added classes for new blog list layout
---------------------------------------------------------- */
.actions {
height:auto;
overflow:visible;
padding:0;
text-align:right;
}
.contentItems {
padding:0;
}
.contentItems li ul li {
border:0;
background:inherit;
}
li.properties {
float:left;
}
#main .contentItems li.properties h3 {
border-bottom:none;
margin:0;
padding:0;
}
li.related{
font-size:1.4em;
float:right;
padding:.4em 0;
text-align:right;
}
li.related .commentcount{
line-height:2em;
}
li.properties ul li{
border:0;
float:left;
padding:.8em 0;
font-size:1.4em;
background:inherit;
}
.icon {
margin:0 0 -2px 4px;
margin:0 .2em -.2em .2em;
}
.linkButton {
border:none;
padding:0;
background:none;
color:#1E5D7D;
}
.linkButton:hover {
background-color:Transparent;
text-decoration:underline;
color:#1E5D7D;
}