Projections: Moving QueryVersionScopeOptions to the Models folder, code styling

This commit is contained in:
Lombiq 2019-05-21 16:30:40 +02:00 committed by Benedek Farkas
parent e19d835e5a
commit 91dfb8880b
8 changed files with 12 additions and 11 deletions

View File

@ -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) {

View File

@ -1,6 +1,7 @@
using System;
using Orchard.ContentManagement;
using Orchard.Localization;
using Orchard.Projections.Models;
namespace Orchard.Projections.FieldTypeEditors {
/// <summary>

View File

@ -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; }
}

View File

@ -1,4 +1,4 @@
namespace Orchard.Projections {
namespace Orchard.Projections.Models {
public enum QueryVersionScopeOptions {
Published,
Latest,

View File

@ -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" />

View File

@ -1,4 +1,5 @@
using Orchard.Projections.Descriptors.Filter;
using Orchard.Projections.Models;
namespace Orchard.Projections.ViewModels {

View File

@ -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 {

View File

@ -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>