Added search UI to home page on green theme.

--HG--
branch : dev
This commit is contained in:
Jonathan Wall
2010-07-27 16:09:25 -07:00
parent d6a51bde87
commit ff553fd36c
4 changed files with 37 additions and 13 deletions

View File

@@ -113,30 +113,39 @@ input[type="submit"], input[type="button"] {
/* Search
----------------------------------------------------------*/
.search
{
margin: 12px 0 12px 0;
.search {
margin: 16px 0 12px 0;
}
.search fieldset
{
.search fieldset {
overflow: auto;
margin: 0;
}
.search input
{
.search input {
width: auto;
float: left;
padding: 3px;
margin: 0;
}
.search button
{
float: left;
.search button {
padding:1px 6px;
margin: 0 0 0 4px;
font-weight:600;
}
.search-summary {
padding:12px 0 0 0;
}
.search-summary em {
font-weight:600;
}
.search-results li.first {
margin:0 0 12px 0;
}
/* Tables
----------------------------------------------------------*/
@@ -228,6 +237,7 @@ colgroup
margin:33px 2px 0 0;
font-size:104%;
float:right;
text-align:right;
}
#maincolumn {

View File

@@ -29,6 +29,7 @@ return false;
<div id="logIn">
<%-- todo:(nheskew) this will need to all go in the header zone (user widget) --%>
<% Html.Include("User"); %>
<%Html.Zone("search");%>
</div>
</div>
</div>

View File

@@ -27,6 +27,7 @@ return false;
<div id="logIn">
<%-- todo:(nheskew) this will need to all go in the header zone (user widget) --%>
<% Html.Include("User"); %>
<%Html.Zone("search"); %>
</div>
</div>
</div>
@@ -52,9 +53,6 @@ return false;
<div>
<%Html.Zone("sidebar");%>
<ul>
<li>
<%Html.Zone("search"); %>
</li>
<li>
<%Html.Zone("sideBarZone1"); %>
</li>

View File

@@ -0,0 +1,15 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchViewModel>" %>
<% Html.RegisterStyle("search.css"); %>
<h1 class="page-title"><%:Html.TitleForPage(T("Search").Text)%></h1><%
if (!string.IsNullOrWhiteSpace(Model.Query)) {
if (Model.PageOfResults.Count() == 0) { %>
<p class="search-summary"><%=T.Plural("There is <em>one</em> result", "Sorry, there are <em>no</em> results", Model.PageOfResults.Count()) %></p><%
}
else { %>
<p class="search-summary"><%=T.Plural("There is <em>one</em> result", "There are <em>{0}</em> results", Model.PageOfResults.TotalItemCount, Model.PageOfResults.StartPosition, Model.PageOfResults.EndPosition)%></p><%
}
}
if (Model.PageOfResults != null && Model.PageOfResults.Count() > 0) { %>
<%=Html.UnorderedList(Model.PageOfResults, (r, i) => Html.DisplayForItem(r.Content) , "search-results contentItems") %>
<%=Html.Pager(Model.PageOfResults, Model.PageOfResults.PageNumber, Model.DefaultPageSize, new {q = Model.Query}) %><%
} %>