mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adjusting search widget to new shape template format.
--HG-- branch : dev
This commit is contained in:
@@ -7,7 +7,13 @@ namespace Orchard.Search.Drivers {
|
||||
|
||||
protected override DriverResult Display(SearchFormPart part, string displayType, dynamic shapeHelper) {
|
||||
var model = new SearchViewModel();
|
||||
return ContentPartTemplate(model, "Parts/Search.SearchForm");
|
||||
return ContentShape("Parts_Search_SearchForm", "Content:1",
|
||||
() => {
|
||||
var shape = shapeHelper.Parts_Search_SearchForm();
|
||||
shape.ContentPart = part;
|
||||
shape.ViewModel = model;
|
||||
return shape;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@@ -101,11 +101,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Search.SearchForm.cshtml" />
|
||||
<Content Include="Views\Search\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\DisplayTemplates\Parts\Search.SearchForm.cshtml" />
|
||||
<Content Include="Views\Parts\Search.SearchForm.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@@ -1 +0,0 @@
|
||||
|
@@ -1,8 +1,8 @@
|
||||
@model Orchard.Search.ViewModels.SearchViewModel
|
||||
@using Orchard.Search.ViewModels;
|
||||
|
||||
@using(Html.BeginForm("index", "search", new { area = "Orchard.Search" }, FormMethod.Get, new { @class = "search" })) {
|
||||
<fieldset>
|
||||
@Html.TextBox("q", Model.Query)
|
||||
@Html.TextBox("q", (SearchViewModel)Model.ViewModel.Query)
|
||||
<button type="submit">@T("Search")</button>
|
||||
</fieldset>
|
||||
}
|
Reference in New Issue
Block a user