mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
- Orchard.Indexing...
--HG-- branch : dev
This commit is contained in:
@@ -55,9 +55,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Admin\Index.ascx" />
|
||||
<Content Include="Views\DefinitionTemplates\FieldIndexing.ascx" />
|
||||
<Content Include="Views\DefinitionTemplates\TypeIndexing.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -97,6 +94,11 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Views\Admin\Index.cshtml" />
|
||||
<None Include="Views\DefinitionTemplates\FieldIndexing.cshtml" />
|
||||
<None Include="Views\DefinitionTemplates\TypeIndexing.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
|
@@ -1,8 +1,7 @@
|
||||
using Orchard.Indexing.Services;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Indexing.ViewModels {
|
||||
public class IndexViewModel : BaseViewModel {
|
||||
public class IndexViewModel {
|
||||
public IndexEntry IndexEntry { get; set;}
|
||||
}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Indexing.ViewModels.IndexViewModel>" %>
|
||||
<% Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%:Html.TitleForPage(T("Search Index Management").ToString()) %></h1><%
|
||||
using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Indexing"})) { %>
|
||||
<fieldset>
|
||||
<% if (Model.IndexEntry == null) {%>
|
||||
<p><%:T("There is currently no search index")%></p>
|
||||
<% } else if (Model.IndexEntry.LastUpdateUtc == null) { %>
|
||||
<p><%:T("The search index has not been built yet.")%></p>
|
||||
<% } else { %>
|
||||
<% if (Model.IndexEntry.DocumentCount == 0) { %>
|
||||
<p><%:T("The search index does not contain any document.")%></p>
|
||||
<% } else { %>
|
||||
<p><%:T("The search index contains {0} document(s).", Model.IndexEntry.DocumentCount)%></p>
|
||||
<% } %>
|
||||
|
||||
<% if (!Model.IndexEntry.Fields.Any()) { %>
|
||||
<p><%:T("The search index does not contain any field.")%></p>
|
||||
<% } else { %>
|
||||
<p><%:T("The search index contains the following fields: {0}.", string.Join(T(", ").Text, Model.IndexEntry.Fields))%></p>
|
||||
<% } %>
|
||||
|
||||
<p><%:T("The search index was last updated {0}.", Html.DateTimeRelative(Model.IndexEntry.LastUpdateUtc.Value, T))%></p>
|
||||
<% } %>
|
||||
<p><%:T("Update the search index now: ") %><button type="submit" title="<%:T("Update the search index.") %>" class="primaryAction"><%:T("Update")%></button></p>
|
||||
<%:Html.AntiForgeryTokenOrchard() %>
|
||||
</fieldset><%
|
||||
}
|
||||
using (Html.BeginForm("rebuild", "admin", FormMethod.Post, new {area = "Orchard.Search"})) { %>
|
||||
<fieldset>
|
||||
<p><%:T("Rebuild the search index for a fresh start.") %>
|
||||
<button type="submit" title="<%:T("Rebuild the search index.") %>"><%:T("Rebuild") %></button></p>
|
||||
<%:Html.AntiForgeryTokenOrchard() %>
|
||||
</fieldset><%
|
||||
} %>
|
@@ -0,0 +1,36 @@
|
||||
@model Orchard.Indexing.ViewModels.IndexViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Search Index Management").ToString())</h1>
|
||||
@using (Html.BeginForm("update", "admin", FormMethod.Post, new {area = "Orchard.Indexing"})) {
|
||||
<fieldset>
|
||||
@if (Model.IndexEntry == null) {
|
||||
<p>@T("There is currently no search index")</p>
|
||||
} else if (Model.IndexEntry.LastUpdateUtc == null) {
|
||||
<p>@T("The search index has not been built yet.")</p>
|
||||
} else {
|
||||
if (Model.IndexEntry.DocumentCount == 0) {
|
||||
<p>@T("The search index does not contain any document.")</p>
|
||||
} else {
|
||||
<p>@T("The search index contains {0} document(s).", Model.IndexEntry.DocumentCount)</p>
|
||||
}
|
||||
|
||||
if (!Model.IndexEntry.Fields.Any()) {
|
||||
<p>@T("The search index does not contain any field.")</p>
|
||||
} else {
|
||||
<p>@T("The search index contains the following fields: {0}.", string.Join(T(", ").Text, Model.IndexEntry.Fields))</p>
|
||||
}
|
||||
|
||||
<p>@T("The search index was last updated {0}.", Html.DateTimeRelative(Model.IndexEntry.LastUpdateUtc.Value, T))</p>
|
||||
}
|
||||
<p>@T("Update the search index now: ")<button type="submit" title="@T("Update the search index.")" class="primaryAction">@T("Update")</button></p>
|
||||
@Html.AntiForgeryTokenOrchard()
|
||||
</fieldset>
|
||||
}
|
||||
@using (Html.BeginForm("rebuild", "admin", FormMethod.Post, new {area = "Orchard.Search"})) {
|
||||
<fieldset>
|
||||
<p>@T("Rebuild the search index for a fresh start.")
|
||||
<button type="submit" title="@T("Rebuild the search index.")">@T("Rebuild")</button></p>
|
||||
@Html.AntiForgeryTokenOrchard()
|
||||
</fieldset>
|
||||
}
|
||||
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Indexing.Settings.FieldIndexing>" %>
|
||||
<fieldset>
|
||||
<%:Html.EditorFor(m=>m.Included) %>
|
||||
<label for="<%:Html.FieldIdFor(m => m.Included) %>" class="forcheckbox"><%:T("Include in the index") %></label><%:
|
||||
Html.ValidationMessageFor(m => m.Included)%>
|
||||
</fieldset>
|
@@ -0,0 +1,7 @@
|
||||
@model Orchard.Indexing.Settings.FieldIndexing
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m=>m.Included)
|
||||
<label for="@Html.FieldIdFor(m => m.Included)" class="forcheckbox">@T("Include in the index")</label>
|
||||
@Html.ValidationMessageFor(m => m.Included)
|
||||
</fieldset>
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Indexing.Settings.TypeIndexing>" %>
|
||||
<fieldset>
|
||||
<%:Html.EditorFor(m=>m.Included) %>
|
||||
<label for="<%:Html.FieldIdFor(m => m.Included) %>" class="forcheckbox"><%:T("Index this content type for search") %></label><%:
|
||||
Html.ValidationMessageFor(m=>m.Included) %>
|
||||
</fieldset>
|
@@ -0,0 +1,7 @@
|
||||
@model Orchard.Indexing.Settings.TypeIndexing
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m=>m.Included)
|
||||
<label for="@Html.FieldIdFor(m => m.Included)" class="forcheckbox">@T("Index this content type for search")</label>
|
||||
@Html.ValidationMessageFor(m=>m.Included)
|
||||
</fieldset>
|
@@ -74,7 +74,7 @@ namespace Orchard.Setup.Services {
|
||||
"HomePage",
|
||||
"Navigation",
|
||||
//"Scheduling",
|
||||
//"Indexing",
|
||||
"Indexing",
|
||||
//"Localization",
|
||||
"Routable",
|
||||
"Settings",
|
||||
|
@@ -72,6 +72,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Comments", "Orchard
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.ArchiveLater", "Orchard.Web\Modules\Orchard.ArchiveLater\Orchard.ArchiveLater.csproj", "{1C981BB3-26F7-494C-9005-CC27A5144233}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Indexing", "Orchard.Web\Modules\Orchard.Indexing\Orchard.Indexing.csproj", "{EA2B9121-EF54-40A6-A53E-6593C86EE696}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -371,6 +373,16 @@ Global
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -391,6 +403,7 @@ Global
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{14C049FD-B35B-415A-A824-87F26B26E7FD} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{EA2B9121-EF54-40A6-A53E-6593C86EE696} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
|
Reference in New Issue
Block a user