Wrapping up cleanup pass on the media package's admin UI

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043004
This commit is contained in:
skewed
2009-12-03 02:17:50 +00:00
parent 3a3c34bf90
commit 6e36ef09b2
8 changed files with 232 additions and 277 deletions

View File

@@ -388,6 +388,7 @@ button:focus, .button:focus {
#main .manage a.button { #main .manage a.button {
float:right; float:right;
height:inherit; height:inherit;
margin-left:.3em;
padding-bottom:.3em; padding-bottom:.3em;
padding-top:.3em; padding-top:.3em;
} }

View File

@@ -4,9 +4,8 @@
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<div class="yui-g"> <h2>Add Media </h2>
<h2 class="separator">Add Media </h2> <p>
<p class="bottomSpacer">
<%=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",
@@ -14,20 +13,15 @@
<% } %> <% } %>
Add Media</p> Add Media</p>
<div id="dialog" title="Upload files">
<% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%> <% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%>
<ol> <%= Html.ValidationSummary() %>
<li><label for="pageTitle">File Path - Multiple files must be in a zipped folder:</label> <fieldset>
<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="button" value="Browse" size="64"/> <input id="MediaItemPath" name="MediaItemPath" type="file" class="text" value="Browse" size="64"/>
<p class="helperText">After your files have been uploaded, you can edit the titles and descriptions.</p> <input type="submit" class="button" value="Upload" /><br />
</li> <span>After your files have been uploaded, you can edit the titles and descriptions.</span>
<li> </fieldset>
<input type="submit" class="button" value="Upload" />
</li>
</ol>
<% } %> <% } %>
</div>
</div>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -4,27 +4,20 @@
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<div class="yui-g"> <h2>Add a Folder</h2>
<h2 class="separator">Add a New Folder</h2> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
<p class="bottomSpacer">
<%=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 new Folder</p> Add a Folder</p>
<%using (Html.BeginForm()) { %> <%using (Html.BeginForm()) { %>
<%= Html.ValidationSummary() %> <%= Html.ValidationSummary() %>
<ol> <fieldset>
<li><label for="Name">Folder Name:</label> <label for="Name">Folder Name:</label>
<input id="Name" class="inputText inputTextLarge roundCorners" 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 %>" />
</li> <input type="submit" class="button" value="Save" />
<li> </fieldset>
<input type="submit" class="button buttonFocus roundCorners" value="Save" />
</li>
</ol>
<% } %> <% } %>
</div>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -4,35 +4,29 @@
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<% Html.BeginForm(); %>
<div class="yui-g">
<h2 class="separator">Manage Folder</h2> <h2 class="separator">Manage Folder</h2>
<span class="filterActions"> <div class="manage"><%=Html.ActionLink("Folder Properties", "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button"})%></div>
<%=Html.ActionLink("Folder Properties", "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath })%> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
</span>
<p class="bottomSpacer">
<%=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>
<ol class="horizontal actions floatLeft"> <% Html.BeginForm(); %>
<li><label class="floatLeft" for="bulkActions">Actions:</label> <fieldset class="actions bulk">
<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> </li> </select>
<li>
<input class="button roundCorners" type="submit" value="Apply" /> <input class="button roundCorners" type="submit" value="Apply" />
</li> </fieldset>
</ol> <div class="manage">
<span class="filterActions"> <%=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 })%> <%=Html.ActionLink("Add a folder", "Create", new { Model.MediaPath }, new { @class = "button" })%>
| </div>
<%=Html.ActionLink("Add a new folder", "Create", new { Model.MediaPath }) %> <fieldset>
</span> <table summary="This is a table of the pages currently available for use in your application.">
<table id="Table1" cellspacing="0" class="roundCorners clearLayout" 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" />
@@ -43,7 +37,7 @@
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th scope="col"><%--<input type="checkbox" value="" />--%></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>
@@ -90,6 +84,10 @@
</tr> </tr>
<%}%> <%}%>
</table> </table>
</fieldset>
<div class="manage">
<%=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" })%>
</div> </div>
<% Html.EndForm(); %> <% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -4,9 +4,8 @@
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<div class="yui-g"> <h2>Edit Media - <%= Model.Name %></h2>
<h2 class="separator">Edit Media - <%= Model.Name %></h2> <p>
<p class="bottomSpacer">
<%=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",
@@ -14,64 +13,42 @@
<% } %> <% } %>
Edit Media </p> Edit Media </p>
</div> <div class="sections">
<div class="yui-gc">
<div class="yui-u first">
<h3>About this media</h3>
<%using (Html.BeginForm()) { %> <%using (Html.BeginForm()) { %>
<ol> <%= Html.ValidationSummary() %>
<%-- <li><label for="imageTitle">Title:</label> <div class="primary">
<input id="imageTitle" class="inputText inputTextLarge" name="imageTitle" type="text" /> <h3>About this media</h3>
</li>--%>
<li><label for="Name">Name:</label>
<input id="Name" class="inputText inputTextLarge" name="Name" type="hidden" value="<%= Model.Name %>"/>
<input id="NewName" class="inputText inputTextLarge" name="NewName" type="text" value="<%= Model.Name %>"/>
</li>
<li><label for="Caption">Caption:</label>
<input id="Caption" class="inputText" name="Caption" type="text" value="<%= Model.Caption %>"/>
<input id="LastUpdated" class="inputText" name="LastUpdated" type="hidden" value="<%= Model.LastUpdated %>"/>
<input id="Size" class="inputText" name="Size" type="hidden" value="<%= Model.Size %>"/>
<input id="FolderName" class="inputText" name="FolderName" type="hidden" value="<%= Model.FolderName %>"/>
<input id="MediaPath" class="inputText" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>"
<p class="helperText">This will be used for the image alt tag.</p>
</li>
<%-- <li><label for="tags">Tags:</label>
<input id="tags" class="inputText" name="tags" type="text" />
<p class="helperText">Seperate each tag with a comma. Example: Lorem, Ipsum, Dolor</p>
</li>--%>
<%-- <li><label for="description">Description:</label>
<textarea id="description" name="description"></textarea>
</li>--%>
<li>
<input type="submit" class="button" name="submit.Save" value="Save" />
<input type="submit" class="button" name="submit.Delete" value="Delete" />
</li>
</ol>
<%}%>
</div>
<div class="yui-u sideBar">
<h3>Preview</h3>
<fieldset> <fieldset>
<ol> <label for="Name">Name:</label>
<li> <input id="Name" name="Name" type="hidden" value="<%= Model.Name %>"/>
<img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" /> <input id="NewName" class="text" name="NewName" type="text" value="<%= Model.Name %>"/>
</li> <label for="Caption">Caption:</label>
<li> <input id="Caption" class="text" name="Caption" type="text" value="<%= Model.Caption %>"/>
<strong>Dimensions:</strong> 500 x 375 pixels <input id="LastUpdated" name="LastUpdated" type="hidden" value="<%= Model.LastUpdated %>"/>
</li> <input id="Size" name="Size" type="hidden" value="<%= Model.Size %>"/>
<li> <input id="FolderName" name="FolderName" type="hidden" value="<%= Model.FolderName %>"/>
<strong>Size:</strong> <%= Model.Size %> <input id="MediaPath" name="MediaPath" type="hidden" value="<%= Model.MediaPath %>" />
</li> <span>This will be used for the image alt tag.</span>
<li> </fieldset>
<strong>Added on:</strong> <%= Model.LastUpdated %> by Orchard User <fieldset>
</li> <input type="submit" class="button" name="submit.Save" value="Save" />
<%--<input type="submit" class="button" name="submit.Delete" value="Delete" />--%>
</fieldset>
</div>
<div class="secondary">
<h3>Preview</h3>
<div><img src="<%=ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name)%>" class="previewImage" alt="<%= Model.Caption %>" /></div>
<ul>
<li><strong>Dimensions:</strong> 500 x 375 pixels</li>
<li><strong>Size:</strong> <%= Model.Size %></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>
</ol> </ul>
</fieldset>
</div> </div>
<% } %>
</div> </div>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -4,29 +4,22 @@
<%@ Import Namespace="Orchard.Media.ViewModels"%> <%@ Import Namespace="Orchard.Media.ViewModels"%>
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<div class="yui-g"> <h2>Folder Properties</h2>
<h2 class="separator">Folder Properties</h2> <p><%=Html.ActionLink("Media Folders", "Index")%> &#62;
<p class="bottomSpacer">
<%=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 Folder Properties</p>
</p>
<%using (Html.BeginForm()) { %> <%using (Html.BeginForm()) { %>
<%= Html.ValidationSummary() %> <%= Html.ValidationSummary() %>
<ol> <fieldset>
<li><label for="Name">Folder Name:</label> <label for="Name">Folder Name:</label>
<input id="Name" class="inputText inputTextLarge roundCorners" name="Name" type="text" value="<%= Model.Name %>" />
<input id="MediaPath" name="MediaPath" type="hidden" value="<%=Model.MediaPath %>" /> <input id="MediaPath" name="MediaPath" type="hidden" value="<%=Model.MediaPath %>" />
</li> <input id="Name" class="text" name="Name" type="text" value="<%= Model.Name %>" />
<li>
<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" />--%>
</li> </fieldset>
</ol>
<%}%> <%}%>
</div>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -3,22 +3,19 @@
<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.Html"%>
<% Html.Include("AdminHead"); %> <% Html.Include("AdminHead"); %>
<h2>Manage Media Folders</h2> <h2>Manage Media Folders</h2>
<% Html.BeginForm(); %>
<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.ValidationSummary() %> <%=Html.ValidationSummary() %>
<ol class="horizontal actions floatLeft"> <fieldset class="actions bulk">
<li><label class="floatLeft" for="bulkActions">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> </li> </select>
<li>
<input class="button roundCorners" type="submit" value="Apply" /> <input class="button roundCorners" type="submit" value="Apply" />
</li> </fieldset>
</ol> <div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div>
<span class="filterActions"> <fieldset>
<%=Html.ActionLink("Add a new folder", "Create") %> <table summary="This is a table of the media folders currently available for use in your application.">
</span>
<table id="Table1" cellspacing="0" class="roundCorners clearLayout" 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" />
@@ -29,7 +26,7 @@
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th scope="col"><%--<input type="checkbox" value="" />--%></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>
@@ -51,6 +48,7 @@
</tr> </tr>
<%}%> <%}%>
</table> </table>
</div> </fieldset>
<div class="manage"><%=Html.ActionLink("Add a folder", "Create", new {}, new { @class = "button"}) %></div>
<% Html.EndForm(); %> <% Html.EndForm(); %>
<% Html.Include("AdminFoot"); %> <% Html.Include("AdminFoot"); %>

View File

@@ -3,6 +3,7 @@
<%@ Import Namespace="Orchard.Mvc.Html" %> <%@ Import Namespace="Orchard.Mvc.Html" %>
<% Html.Include("AdminHead"); %> <% 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 --%>
<% Html.BeginForm(); %> <% Html.BeginForm(); %>
<%= Html.ValidationSummary() %> <%= Html.ValidationSummary() %>
<fieldset> <fieldset>