A search box for anyone.

- pulled the search box out into its own partial
- added a search filter that sticks the search form partial into the search zone
- added the search zone to the top of the classic theme's sidebar

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-06-03 16:17:31 -07:00
parent 43f1031054
commit dcc51f28c6
6 changed files with 41 additions and 10 deletions

View File

@@ -1,13 +1,9 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %><%
Html.RegisterStyle("search.css"); %>
<h1><%=Html.TitleForPage(T("Search"))%></h1><%
using(Html.BeginForm("index", "search", FormMethod.Get, new { @class = "search" })) { %>
<fieldset>
<%=Html.TextBox("q", Model.Term) %>
<button type="submit"><%=T("Search") %></button>
</fieldset><%
}
<h1><%=Html.TitleForPage(T("Search"))%></h1>
<%
Html.Zone("search"); %><%
if (!string.IsNullOrWhiteSpace(Model.Term)) { %>
<p class="search-summary"><%=T("<em>{0}</em> results", Model.Results.Count()) %></p><%

View File

@@ -0,0 +1,8 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SearchViewModel>" %>
<%@ Import Namespace="Orchard.Search.ViewModels" %><%
using(Html.BeginForm("index", "search", new { area = "Orchard.Search" }, FormMethod.Get, new { @class = "search" })) { %>
<fieldset>
<%=Html.TextBox("q", Model.Term) %>
<button type="submit"><%=T("Search") %></button>
</fieldset><%
} %>