mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Projections: Moving QueryVersionScopeOptions to the Models folder, code styling
This commit is contained in:
parent
e19d835e5a
commit
91dfb8880b
@ -1,6 +1,6 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Projections {
|
||||
namespace Orchard.Projections.Models {
|
||||
public static class QueryVersionScopeOptionsExtensions {
|
||||
public static VersionOptions ToVersionOptions(this QueryVersionScopeOptions scope) {
|
||||
switch (scope) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Projections.Models;
|
||||
|
||||
namespace Orchard.Projections.FieldTypeEditors {
|
||||
/// <summary>
|
||||
|
@ -6,7 +6,7 @@ namespace Orchard.Projections.Models {
|
||||
public class QueryPart : ContentPart<QueryPartRecord> {
|
||||
|
||||
public string Name {
|
||||
get { return this.As<TitlePart>().Title; }
|
||||
get { return this.As<TitlePart>().Title; }
|
||||
set { this.As<TitlePart>().Title = value; }
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Orchard.Projections {
|
||||
namespace Orchard.Projections.Models {
|
||||
public enum QueryVersionScopeOptions {
|
||||
Published,
|
||||
Latest,
|
@ -185,7 +185,7 @@
|
||||
<Compile Include="Providers\Layouts\ShapeLayoutForms.cs" />
|
||||
<Compile Include="Providers\Properties\CustomValueProperties.cs" />
|
||||
<Compile Include="Navigation\NavigationQueryProvider.cs" />
|
||||
<Compile Include="QueryVersionScopeOptions.cs" />
|
||||
<Compile Include="Models\QueryVersionScopeOptions.cs" />
|
||||
<Compile Include="Services\DraftFieldIndexService.cs" />
|
||||
<Compile Include="Services\IDraftFieldIndexService.cs" />
|
||||
<Compile Include="Services\IProjectionManagerExtension.cs" />
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Orchard.Projections.Descriptors.Filter;
|
||||
using Orchard.Projections.Models;
|
||||
|
||||
namespace Orchard.Projections.ViewModels {
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Orchard.Projections.Models;
|
||||
|
||||
namespace Orchard.Projections.ViewModels {
|
||||
public class QueryViewModel {
|
||||
|
@ -1,8 +1,10 @@
|
||||
@model Orchard.Projections.ViewModels.QueryViewModel
|
||||
@using Orchard.Projections;
|
||||
@using Orchard.Projections.Models;
|
||||
@using Orchard.Projections.ViewModels;
|
||||
|
||||
@model QueryViewModel
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.VersionScope, T("Content's version"))
|
||||
@Html.DropDownListFor(m=>m.VersionScope, new SelectList(Enum.GetValues(typeof(QueryVersionScopeOptions)), Model.VersionScope))
|
||||
@Html.DropDownListFor(m => m.VersionScope, new SelectList(Enum.GetValues(typeof(QueryVersionScopeOptions)), Model.VersionScope))
|
||||
<span class="hint">@T("The content's version to query.")</span>
|
||||
</fieldset>
|
||||
|
Loading…
Reference in New Issue
Block a user