mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +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) {
|
protected override DriverResult Display(SearchFormPart part, string displayType, dynamic shapeHelper) {
|
||||||
var model = new SearchViewModel();
|
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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Search.SearchForm.cshtml" />
|
|
||||||
<Content Include="Views\Search\Index.cshtml" />
|
<Content Include="Views\Search\Index.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\DisplayTemplates\Parts\Search.SearchForm.cshtml" />
|
<Content Include="Views\Parts\Search.SearchForm.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.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" })) {
|
@using(Html.BeginForm("index", "search", new { area = "Orchard.Search" }, FormMethod.Get, new { @class = "search" })) {
|
||||||
<fieldset>
|
<fieldset>
|
||||||
@Html.TextBox("q", Model.Query)
|
@Html.TextBox("q", (SearchViewModel)Model.ViewModel.Query)
|
||||||
<button type="submit">@T("Search")</button>
|
<button type="submit">@T("Search")</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
Reference in New Issue
Block a user