mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00

- includes a single search/results page (URL needs to change, currently @ /Search/Search when the feature is enabled) --HG-- branch : dev
15 lines
745 B
Plaintext
15 lines
745 B
Plaintext
<%@ 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.TextBoxFor(m => m.Term) %>
|
|
<button type="submit"><%=T("Search") %></button>
|
|
</fieldset><%
|
|
}
|
|
|
|
if (Model.Results.Count() > 0) { %>
|
|
<p class="search-summary"><%=T("<em>{0}</em> results", Model.Results.Count()) %></p>
|
|
<%=Html.UnorderedList(Model.Results, (r, i) => Html.DisplayForItem(r.Content).ToHtmlString(), "search-results contentItems") %><%
|
|
} %> |