Some cleanup in the CMSPages template selection and a temp hack to get template thumbnails to render.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042214
This commit is contained in:
skewed
2009-11-25 17:58:49 +00:00
parent 6557915f98
commit b8a947743f
5 changed files with 38 additions and 35 deletions

View File

@@ -110,7 +110,7 @@ number of columns: 24; actual width: 946; column width: 26; gutter width:14
overflow:hidden;
}
#content {
overflow:hidden;
overflow:auto;
padding:1.4em;
}
#main {
@@ -127,10 +127,12 @@ number of columns: 24; actual width: 946; column width: 26; gutter width:14
overflow:hidden;
}
.sections .primary {
display:inline;
float:left;
width:74.543%;
}
.sections .secondary {
display:inline;
float:left;
margin-left:1.71%;
width:23.629%;
@@ -515,11 +517,13 @@ ul.horizontal li a, ul.horizontal li a:visited, ul.horizontal li a:active, ol.ho
----------------------------------------------------------*/
/* CMSPages */
.templates fieldset {
margin:0 0 .933%;
}
.templates p {
overflow:hidden;
}
.templates p img {
border:1px solid #000;
float:left;
height:144px;
margin:.27em .93em .93em .54em;

View File

@@ -6,18 +6,17 @@
<p>Select your layout from one of the templates below.</p>
<% using (Html.BeginForm()) {
%><%= Html.ValidationSummary() %>
<fieldset>
<ol class="templates"><%
foreach (var template in Model.Templates) {
var t = template; %>
<li><%=
Html.EditorFor(m => t) %>
</li><%
} %>
</ol>
</fieldset>
<ul class="templates"><%
foreach (var template in Model.Templates) {
var t = template; %>
<li><%=
Html.EditorFor(m => t) %>
</li><%
} %>
</ul>
<div>
<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 --%>
<%=Html.ActionLink("Cancel", "Edit", new { Id = ViewContext.RouteData.GetRequiredString("id") }, new { @class = "cancel" })%>
</div><%
} %>

View File

@@ -2,14 +2,12 @@
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
<%@ Import Namespace="Orchard.CmsPages.ViewModels" %>
<%@ Import Namespace="Orchard.Utility" %>
<fieldset>
<ol class="templates">
<% foreach (var template in Model.Templates) {
var t = template; %>
<li>
<%=Html.EditorFor(m => t) %>
</li><%
} %>
</ol>
</fieldset>
<ul class="templates">
<% foreach (var template in Model.Templates) {
var t = template; %>
<li>
<%=Html.EditorFor(m => t) %>
</li><%
} %>
</ul>
<div><input class="button" type="submit" value="Create" /></div>

View File

@@ -1,16 +1,13 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateDescriptor>" %>
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
<ul>
<li>
<h3><%=Html.Encode(Model.DisplayName)%></h3>
</li>
<li>
<div>
<h3><%=Html.Encode(Model.DisplayName)%></h3>
<fieldset>
<label title="<%=Html.Encode(Model.DisplayName)%>" for="TemplateName_<%=Model.Name%>">
<%-- todo: (heskew) need to know if this template descriptor is what's currently set. view model? --%>
<input type="radio" name="TemplateName" checked="<%="" == Model.Name ? "checked" : ""%>" value="<%=Model.Name %>" id="<%=string.Format("TemplateName_{0}", Model.Name) %>" />
Select this template</label>
</li>
<li>
<p><img src="<%=Html.Encode(Model.Name)%>.gif" alt="<%=Html.Encode(Model.DisplayName)%>" /><%=Html.Encode(Model.Description)%></p>
</li>
</ul>
</fieldset>
<%-- todo: (heskew) need an HTML helper (+route and controller/action for an ImageResult) for template thumbnails --%>
<p><img src="/Packages/Orchard.CMSPages/Views/Templates/<%=Html.Encode(Model.Name)%>.gif" alt="<%=Html.Encode(Model.DisplayName)%>" /><%=Html.Encode(Model.Description)%></p>
</div>

View File

@@ -2,8 +2,11 @@
<configuration>
<system.web>
<httpHandlers>
<add path="*" verb="*"
type="System.Web.HttpNotFoundHandler"/>
<add path="*.aspx" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*.ascx" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*.master" verb="*" type="System.Web.HttpNotFoundHandler"/>
<!-- todo: (heskew) put back into place when template thumbnails aren't being hit directly
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>-->
</httpHandlers>
<!--
@@ -28,7 +31,9 @@
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
<add name="BlockViewHandler" path="*.aspx,*.ascx,*.master" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
<!-- todo: (heskew) put back into place when template thumbnails aren't being hit directly
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>-->
</handlers>
</system.webServer>
</configuration>