mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-22 03:37:25 +08:00
Fixing Content Picker when Search is the only tab
--HG-- branch : 1.x
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Orchard.Search.Controllers {
|
||||
}
|
||||
|
||||
if (!_indexManager.HasIndexProvider()) {
|
||||
return HttpNotFound();
|
||||
return View("NoIndex");
|
||||
}
|
||||
|
||||
var builder = _indexManager.GetSearchIndexProvider().CreateSearchBuilder("Search");
|
||||
|
@@ -118,6 +118,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\DefinitionTemplates\ContentPickerSearchFieldSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\ContentPicker\NoIndex.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
@@ -0,0 +1 @@
|
||||
@T("You need to enable a search index module.")
|
@@ -9,13 +9,13 @@
|
||||
<h1>@Html.TitleForPage(T("Search").Text)</h1>
|
||||
|
||||
@if (HasText(Model.Query)) {
|
||||
if (searchResults.Count() == 0) {
|
||||
if (!searchResults.Any()) {
|
||||
<p class="search-summary">@T.Plural("There is <em>one</em> result", "<em>zero</em> results", searchResults.Count())</p>
|
||||
} else {
|
||||
<p class="search-summary">@T.Plural("There is <em>one</em> result", "<em>{1} - {2}</em> of <em>{0}</em> results", Model.TotalItemCount, Model.StartPosition, Model.EndPosition)</p>
|
||||
}
|
||||
}
|
||||
@if (searchResults != null && searchResults.Count() > 0) {
|
||||
@if (searchResults != null && searchResults.Any()) {
|
||||
@Display(searchResults)
|
||||
@Display(Model.Pager)
|
||||
}
|
Reference in New Issue
Block a user