Gave search a friendly URL (/search)

- and changed the property on the view model from Term to Query (sounds better and goes with the 'q' param)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-06-04 08:35:24 -07:00
parent 727647a043
commit 784f9dfc09
6 changed files with 39 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ Html.RegisterStyle("search.css"); %>
<%
Html.Zone("search"); %><%
if (!string.IsNullOrWhiteSpace(Model.Term)) { %>
if (!string.IsNullOrWhiteSpace(Model.Query)) { %>
<p class="search-summary"><%=T("<em>{0}</em> results", Model.Results.Count()) %></p><%
}

View File

@@ -2,7 +2,7 @@
<%@ 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) %>
<%=Html.TextBox("q", Model.Query) %>
<button type="submit"><%=T("Search") %></button>
</fieldset><%
} %>