Updated html/css for settings page. Added a primary button style.

This commit is contained in:
jowall
2010-02-12 16:11:08 -08:00
parent fd0e034ea6
commit 49d95c1f13
5 changed files with 100 additions and 77 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>
<% } %>

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" })%>
<% } %>

View File

@@ -27,80 +27,81 @@
<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>
<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("~/Packages/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("~/Packages/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(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())%>
else
{ %>
<%=_Encoded("No Draft")%>
<% } %>
</td>
<td><%=_Encoded("By {0}", pageEntry.Page.Creator.UserName)%></td>
<td>
<% 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") %>" />
<% } %>
</td>
<td>
<%--Scheduled--%>
<% if (!pageEntry.Page.IsPublished)
{ %>
<%=pageEntry.Page.ScheduledPublishUtc != null
? string.Format("{0:d}<br />{0:t}", pageEntry.Page.ScheduledPublishUtc.Value)
: ""%>
<%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) %>
<% }%>
<% } %>
</td>
<td><%=Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.PageId })%></td>
</tr>
<%--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>

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

@@ -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,9 +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; } /* 15px */
table.items th, table.items td, table.items caption { font-size:1.4em; line-height:1.4em; } /* 14px */
p .button { font-size:inherit; }
.meta, .hint { font-size:1.2em; } /* 12px */
@@ -232,7 +231,6 @@ a:hover, a:active, a:focus {
}
#navigation li {
background:#fff;
margin:7px 0 20px 0;
}
#navigation ul li {
@@ -329,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;
@@ -357,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;
@@ -383,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;
@@ -412,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;
@@ -422,7 +445,6 @@ textarea {
padding:4px;
width:98%;
}
/* todo: (heskew) move editor specific style elsewhere */
.primary .mceEditor {
display:block;
@@ -442,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 {
@@ -505,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;
}