mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
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:
@@ -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><%
|
||||
|
@@ -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><%
|
||||
} %>
|
Reference in New Issue
Block a user