mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Start of the search UI
- includes a single search/results page (URL needs to change, currently @ /Search/Search when the feature is enabled) --HG-- branch : dev
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<%@ 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") %><%
|
||||
} %>
|
34
src/Orchard.Web/Modules/Orchard.Search/Views/Web.config
Normal file
34
src/Orchard.Web/Modules/Orchard.Search/Views/Web.config
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*" verb="*"
|
||||
type="System.Web.HttpNotFoundHandler"/>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
Reference in New Issue
Block a user