mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge 1.x
--HG-- branch : autoroute
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
b8e1bad4b04fdc562cdc50c0620e9dc8fc27baaf src/Orchard.Web/Modules/Orchard.Alias
|
||||
9c8a1d6527eb6cf50b5cca0f6fa39b15579eff3f src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
ec573e5476f7e8a5a61593d6393e9985e9484fcc src/Orchard.Web/Modules/Orchard.Forms
|
||||
67bf9897ee9dd9483369aece729ad7c6f042941c src/Orchard.Web/Modules/Orchard.Forms
|
||||
7c88e691cc47dbb6e628f6b288ce9b9d4cd8a5c7 src/Orchard.Web/Modules/Orchard.Projections
|
||||
bf1f2857f36786c66013e0dee3c37e94cd26465e src/Orchard.Web/Modules/Orchard.Routable
|
||||
3153ea8e0e869664ce841016b020dd5e67667bdf src/Orchard.Web/Modules/Orchard.Rules
|
||||
65057c6a5cd71f7994ba9bcbeece50dbb737620e src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
75b2107eb093154b35832e3ea6e8514d4a66426a src/Orchard.Web/Modules/Orchard.Rules
|
||||
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
ff19551decac9829f4f6cd94b61e69b22a796653 src/Orchard.Web/Modules/Orchard.Tokens
|
||||
|
@@ -132,6 +132,12 @@
|
||||
</Target>
|
||||
|
||||
<Target Name ="Spec">
|
||||
<!-- TeamCity support -->
|
||||
<ItemGroup>
|
||||
<NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.2.*" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(LibFolder)\nunit\addins" />
|
||||
|
||||
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
|
||||
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
|
||||
</CreateItem>
|
||||
|
@@ -28,6 +28,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
|
@@ -63,10 +63,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Integration.Web.Mvc, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll</HintPath>
|
||||
|
@@ -63,10 +63,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Integration.Web.Mvc, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=1.2.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll</HintPath>
|
||||
@@ -278,6 +274,7 @@
|
||||
<Compile Include="Stubs\StubVirtualPathMonitor.cs" />
|
||||
<Compile Include="Stubs\StubCacheManager.cs" />
|
||||
<Compile Include="Stubs\StubWebSiteFolder.cs" />
|
||||
<Compile Include="Time\TimeZoneSelectorTests.cs" />
|
||||
<Compile Include="UI\Resources\ResourceManagerTests.cs" />
|
||||
<Compile Include="UI\ShapeTests.cs" />
|
||||
<Compile Include="Utility\ContainerExtensions.cs" />
|
||||
|
@@ -77,6 +77,8 @@ namespace Orchard.Tests.Stubs {
|
||||
}
|
||||
|
||||
public string BaseUrl { get; set;}
|
||||
|
||||
public string SiteTimeZone { get; set; }
|
||||
}
|
||||
|
||||
public class StubUser : IUser {
|
||||
|
85
src/Orchard.Tests/Time/TimeZoneSelectorTests.cs
Normal file
85
src/Orchard.Tests/Time/TimeZoneSelectorTests.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using Autofac;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.Time;
|
||||
|
||||
namespace Orchard.Tests.Time {
|
||||
[TestFixture]
|
||||
public class TimeZoneProviderTests {
|
||||
private IContainer _container;
|
||||
private IWorkContextStateProvider _workContextStateProvider;
|
||||
private TestTimeZoneSelector _timeZoneSelector;
|
||||
|
||||
[SetUp]
|
||||
public void Init() {
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterInstance(_timeZoneSelector = new TestTimeZoneSelector()).As<ITimeZoneSelector>();
|
||||
builder.RegisterType<CurrentTimeZoneWorkContext>().As<IWorkContextStateProvider>();
|
||||
builder.RegisterType<FallbackTimeZoneSelector>().As<ITimeZoneSelector>();
|
||||
builder.RegisterType<SiteTimeZoneSelector>().As<ITimeZoneSelector>();
|
||||
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
|
||||
|
||||
_container = builder.Build();
|
||||
_workContextStateProvider = _container.Resolve<IWorkContextStateProvider>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldProvideCurrentTimeZoneOnly() {
|
||||
_timeZoneSelector.TimeZone = null;
|
||||
var timeZone = _workContextStateProvider.Get<TimeZoneInfo>("Foo");
|
||||
|
||||
Assert.That(timeZone, Is.Null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DefaultTimeZoneIsLocal() {
|
||||
_timeZoneSelector.Priority = -200;
|
||||
var timeZone = _workContextStateProvider.Get<TimeZoneInfo>("CurrentTimeZone");
|
||||
|
||||
Assert.That(timeZone(new StubWorkContext()), Is.EqualTo(TimeZoneInfo.Local));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TimeZoneProviderReturnsTimeZoneFromSelector() {
|
||||
_timeZoneSelector.Priority = 999;
|
||||
_timeZoneSelector.TimeZone = TimeZoneInfo.Utc;
|
||||
var timeZone = _workContextStateProvider.Get<TimeZoneInfo>("CurrentTimeZone");
|
||||
|
||||
Assert.That(timeZone(new StubWorkContext()), Is.EqualTo(TimeZoneInfo.Utc));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class TestTimeZoneSelector : ITimeZoneSelector {
|
||||
public TimeZoneInfo TimeZone { get; set; }
|
||||
public int Priority { get; set; }
|
||||
|
||||
public TimeZoneSelectorResult GetTimeZone(HttpContextBase context) {
|
||||
return new TimeZoneSelectorResult {
|
||||
Priority = Priority,
|
||||
TimeZone= TimeZone
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class StubWorkContext : WorkContext {
|
||||
public override T Resolve<T>() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool TryResolve<T>(out T service) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override T GetState<T>(string name) {
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public override void SetState<T>(string name, T value) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,23 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Common.Fields;
|
||||
using Orchard.Core.Common.Settings;
|
||||
using Orchard.Core.Common.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class TextFieldDriver : ContentFieldDriver<TextField> {
|
||||
public TextFieldDriver(IOrchardServices services) {
|
||||
private readonly IEnumerable<IHtmlFilter> _htmlFilters;
|
||||
|
||||
public TextFieldDriver(IOrchardServices services, IEnumerable<IHtmlFilter> htmlFilters) {
|
||||
_htmlFilters = htmlFilters;
|
||||
Services = services;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
@@ -26,16 +35,48 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
protected override DriverResult Display(ContentPart part, TextField field, string displayType, dynamic shapeHelper) {
|
||||
return ContentShape("Fields_Common_Text", GetDifferentiator(field, part),
|
||||
() => shapeHelper.Fields_Common_Text(Name: field.Name, Value: field.Value));
|
||||
() => {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
|
||||
object fieldValue = field.Value;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(settings.Flavor)) {
|
||||
fieldValue = new HtmlString(_htmlFilters.Aggregate(field.Value, (text, filter) => filter.ProcessContent(text, settings.Flavor)));
|
||||
}
|
||||
|
||||
return shapeHelper.Fields_Common_Text(Name: field.Name, Value: fieldValue);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, dynamic shapeHelper) {
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: field, Prefix: GetPrefix(field, part)));
|
||||
() => {
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>()
|
||||
};
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part));
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) {
|
||||
updater.TryUpdateModel(field, GetPrefix(field, part), null, null);
|
||||
var viewModel = new TextFieldDriverViewModel {
|
||||
Field = field,
|
||||
Text = field.Value,
|
||||
Settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>()
|
||||
};
|
||||
|
||||
if(updater.TryUpdateModel(viewModel, GetPrefix(field, part), null, null)) {
|
||||
if (viewModel.Settings.Required && string.IsNullOrWhiteSpace(viewModel.Text)) {
|
||||
updater.AddModelError("Text", T("The fields {0} is mandatory", field.DisplayName));
|
||||
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part)));
|
||||
}
|
||||
|
||||
field.Value = viewModel.Text;
|
||||
}
|
||||
|
||||
return Editor(part, field, shapeHelper);
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,7 @@
|
||||
</Match>
|
||||
<Match DisplayType="SummaryAdmin">
|
||||
<Place Parts_Common_Body_Summary="-"
|
||||
Parts_Common_Metadata_SummaryAdmin="Meta:5"/>
|
||||
Parts_Common_Metadata_SummaryAdmin="Meta:5"
|
||||
Fields_Common_Text="-"/>
|
||||
</Match>
|
||||
</Placement>
|
||||
|
@@ -0,0 +1,8 @@
|
||||
namespace Orchard.Core.Common.Settings {
|
||||
|
||||
public class TextFieldSettings {
|
||||
public string Flavor { get; set; }
|
||||
public bool Required { get; set; }
|
||||
public string Hint { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Builders;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.ViewModels;
|
||||
using Orchard.Core.Common.ViewModels;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Common.Settings {
|
||||
public class TextFieldSettingsEvents : ContentDefinitionEditorEventsBase {
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
private readonly Func<IShapeTableLocator> _shapeTableLocator;
|
||||
|
||||
public TextFieldSettingsEvents(IOrchardServices orchardServices, Func<IShapeTableLocator> shapeTableLocator) {
|
||||
_orchardServices = orchardServices;
|
||||
_shapeTableLocator = shapeTableLocator;
|
||||
}
|
||||
|
||||
public override IEnumerable<TemplateViewModel> PartFieldEditor(ContentPartFieldDefinition definition) {
|
||||
if (definition.FieldDefinition.Name == "TextField") {
|
||||
var shapeTable = _shapeTableLocator().Lookup(_orchardServices.WorkContext.CurrentTheme.Id);
|
||||
var flavors = shapeTable.Bindings.Keys
|
||||
.Where(x => x.StartsWith("Body_Editor__", StringComparison.OrdinalIgnoreCase))
|
||||
.Select(x => x.Substring("Body_Editor__".Length))
|
||||
.Where(x => !String.IsNullOrWhiteSpace(x))
|
||||
.Select(x => x[0].ToString(CultureInfo.InvariantCulture).ToUpper() + x.Substring(1) )
|
||||
.Select(x => x.CamelFriendly())
|
||||
;
|
||||
|
||||
|
||||
var model = new TextFieldSettingsEventsViewModel {
|
||||
Settings = definition.Settings.GetModel<TextFieldSettings>(),
|
||||
Flavors = flavors.ToArray()
|
||||
};
|
||||
|
||||
yield return DefinitionTemplate(model);
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel) {
|
||||
if (builder.FieldType != "TextField") {
|
||||
yield break;
|
||||
}
|
||||
|
||||
var model = new TextFieldSettingsEventsViewModel {
|
||||
Settings = new TextFieldSettings()
|
||||
};
|
||||
|
||||
if (updateModel.TryUpdateModel(model, "TextFieldSettingsEventsViewModel", null, null)) {
|
||||
builder.WithSetting("TextFieldSettings.Flavor", model.Settings.Flavor);
|
||||
builder.WithSetting("TextFieldSettings.Hint", model.Settings.Hint);
|
||||
builder.WithSetting("TextFieldSettings.Required", model.Settings.Required.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
yield return DefinitionTemplate(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,12 +23,12 @@ namespace Orchard.Core.Common {
|
||||
}
|
||||
|
||||
[Shape]
|
||||
public IHtmlString PublishedState(HtmlHelper html, DateTime createdDateTimeUtc, DateTime? publisheddateTimeUtc) {
|
||||
public IHtmlString PublishedState(dynamic Display, DateTime createdDateTimeUtc, DateTime? publisheddateTimeUtc) {
|
||||
if (!publisheddateTimeUtc.HasValue) {
|
||||
return T("Draft");
|
||||
}
|
||||
|
||||
return html.DateTime(createdDateTimeUtc);
|
||||
return Display.DateTime(DateTimeUtc: createdDateTimeUtc);
|
||||
}
|
||||
|
||||
[Shape]
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -0,0 +1,10 @@
|
||||
using Orchard.Core.Common.Fields;
|
||||
using Orchard.Core.Common.Settings;
|
||||
|
||||
namespace Orchard.Core.Common.ViewModels {
|
||||
public class TextFieldDriverViewModel {
|
||||
public TextField Field { get; set; }
|
||||
public string Text { get; set; }
|
||||
public TextFieldSettings Settings { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
using Orchard.Core.Common.Settings;
|
||||
|
||||
namespace Orchard.Core.Common.ViewModels {
|
||||
public class TextFieldSettingsEventsViewModel {
|
||||
public TextFieldSettings Settings { get; set; }
|
||||
public string[] Flavors { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
@Html.TextArea("Text", (string)Model.Text, 10, 80, new {})
|
@@ -0,0 +1,28 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldSettingsEventsViewModel
|
||||
|
||||
<fieldset>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Settings.Flavor)" class="forcheckbox">@T("Display options")</label>
|
||||
<select id="@Html.FieldIdFor(m => m.Settings.Flavor)" name="@Html.FieldNameFor(m => m.Settings.Flavor)">
|
||||
@Html.SelectOption("", String.IsNullOrWhiteSpace(Model.Settings.Flavor), T("Default flavor").ToString())
|
||||
@foreach(string flavor in Model.Flavors) {
|
||||
@Html.SelectOption(flavor, flavor.Equals(Model.Settings.Flavor, StringComparison.OrdinalIgnoreCase), flavor.CamelFriendly())
|
||||
}
|
||||
</select>
|
||||
|
||||
@Html.ValidationMessageFor(m => m.Settings.Flavor)
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<div>
|
||||
@Html.CheckBoxFor(m => m.Settings.Required) <label for="@Html.FieldIdFor(m => m.Settings.Required)" class="forcheckbox">@T("Required")</label>
|
||||
<span class="hint">@T("Check to ensure the user enters a value in this field.")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Settings.Hint)">@T("Help text")</label>
|
||||
@Html.TextAreaFor(m => m.Settings.Hint, new { @class = "textMedium", rows = "5" })
|
||||
<span class="hint">@T("The help text is written under the field when authors are editing the content item.")</span>
|
||||
@Html.ValidationMessageFor(m => m.Settings.Hint)
|
||||
</fieldset>
|
@@ -1,5 +1,13 @@
|
||||
@model Orchard.Core.Common.Fields.TextField
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m=>m.Value)">@Model.Name</label>
|
||||
@Html.EditorFor(m=>m.Value)@Html.ValidationMessageFor(m=>m.Value)
|
||||
</fieldset>
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldDriverViewModel
|
||||
|
||||
<label for="@Html.FieldIdFor(m => m.Text)">@Model.Field.DisplayName</label>
|
||||
<fieldset>
|
||||
@if (String.IsNullOrWhiteSpace(Model.Settings.Flavor)) {
|
||||
@Html.TextBoxFor(m => m.Text, new { @class = "text" })
|
||||
@Html.ValidationMessageFor(m => m.Text)
|
||||
}
|
||||
else {
|
||||
@Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor)
|
||||
}
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
</fieldset>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@{
|
||||
string name = Model.ContentField.DisplayName;
|
||||
string value = Model.Value;
|
||||
}
|
||||
@if (HasText(name) && HasText(value)) {
|
||||
<p class="text-field"><span class="name">@name:</span> <span class="value">@value</span></p>
|
||||
|
||||
@if (HasText(name) && HasText(Model.Value)) {
|
||||
<p class="text-field"><span class="name">@name:</span> <span class="value">@Model.Value</span></p>
|
||||
}
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -9,14 +9,14 @@
|
||||
@T(" | ")
|
||||
|
||||
if (contentPart.HasDraft()) {
|
||||
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "PublishUrl UnsafeUrl" })
|
||||
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
|
||||
@T(" | ")
|
||||
|
||||
@Html.ActionLink(T("Preview").Text, "Preview", "Item", new { area = "Contents", id = ((ContentItem)Model.ContentPart.ContentItem).Id }, new { })
|
||||
@T(" | ")
|
||||
}
|
||||
|
||||
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnpublishUrl UnsafeUrl" })
|
||||
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
|
||||
@T(" | ")
|
||||
} else {
|
||||
if ( contentPart.HasDraft() ) {
|
||||
@@ -24,6 +24,6 @@
|
||||
@T(" | ")
|
||||
}
|
||||
|
||||
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "PublishUrl UnsafeUrl" })
|
||||
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
|
||||
@T(" | ")
|
||||
}
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -78,6 +78,10 @@
|
||||
<Compile Include="Common\ResourceManifest.cs" />
|
||||
<Compile Include="Common\Services\XmlRpcHandler.cs" />
|
||||
<Compile Include="Common\DateEditor\DateEditorViewModel.cs" />
|
||||
<Compile Include="Common\Settings\TextFieldSettingsEvents.cs" />
|
||||
<Compile Include="Common\Settings\TextFieldSettings.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldDriverViewModel.cs" />
|
||||
<Compile Include="Common\ViewModels\TextFieldSettingsEventsViewModel.cs" />
|
||||
<Compile Include="Containers\Controllers\ItemController.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainablePartDriver.cs" />
|
||||
<Compile Include="Containers\Drivers\ContainerPartDriver.cs" />
|
||||
@@ -458,6 +462,12 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Containers\Views\Parts.Container.Contained.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\DefinitionTemplates\TextFieldSettingsEventsViewModel.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Body-Textarea.Editor.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
25
src/Orchard.Web/Core/Routable/Scripts/Web.config
Normal file
25
src/Orchard.Web/Core/Routable/Scripts/Web.config
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<!-- iis6 - for any request in this location, return via managed static file handler -->
|
||||
<add path="*" verb="*" type="System.Web.StaticFileHandler" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
@@ -1,4 +1,5 @@
|
||||
using System.Net;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
@@ -44,7 +45,8 @@ namespace Orchard.Core.Settings.Drivers {
|
||||
|
||||
var model = new SiteSettingsPartViewModel {
|
||||
Site = site,
|
||||
SiteCultures = _cultureManager.ListCultures()
|
||||
SiteCultures = _cultureManager.ListCultures(),
|
||||
TimeZones = TimeZoneInfo.GetSystemTimeZones()
|
||||
};
|
||||
|
||||
return ContentShape("Parts_Settings_SiteSettingsPart",
|
||||
@@ -55,7 +57,8 @@ namespace Orchard.Core.Settings.Drivers {
|
||||
var site = _siteService.GetSiteSettings().As<SiteSettingsPart>();
|
||||
var model = new SiteSettingsPartViewModel {
|
||||
Site = site,
|
||||
SiteCultures = _cultureManager.ListCultures()
|
||||
SiteCultures = _cultureManager.ListCultures(),
|
||||
TimeZones = TimeZoneInfo.GetSystemTimeZones()
|
||||
};
|
||||
|
||||
var previousBaseUrl = model.Site.BaseUrl;
|
||||
|
@@ -91,9 +91,16 @@ namespace Orchard.Core.Settings {
|
||||
.Column<string>("SiteCulture")
|
||||
.Column<string>("ResourceDebugMode", c => c.WithDefault("FromAppSetting"))
|
||||
.Column<int>("PageSize")
|
||||
.Column<string>("SiteTimeZone")
|
||||
);
|
||||
|
||||
return 1;
|
||||
SchemaBuilder.CreateTable("SiteSettings2PartRecord",
|
||||
table => table
|
||||
.ContentPartRecord()
|
||||
.Column<string>("BaseUrl", c => c.Unlimited())
|
||||
);
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -105,5 +112,14 @@ namespace Orchard.Core.Settings {
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
public int UpdateFrom2() {
|
||||
SchemaBuilder.AlterTable("SiteSettingsPartRecord",
|
||||
table => table
|
||||
.AddColumn<string>("SiteTimeZone")
|
||||
);
|
||||
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Data.Conventions;
|
||||
using Orchard.Settings;
|
||||
@@ -45,6 +46,11 @@ namespace Orchard.Core.Settings.Models {
|
||||
set { Record.PageSize = value; }
|
||||
}
|
||||
|
||||
public string SiteTimeZone {
|
||||
get { return Record.SiteTimeZone; }
|
||||
set { Record.SiteTimeZone = value; }
|
||||
}
|
||||
|
||||
[StringLengthMax]
|
||||
public string BaseUrl {
|
||||
get {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Orchard.ContentManagement.Records;
|
||||
using System;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Settings;
|
||||
|
||||
namespace Orchard.Core.Settings.Models {
|
||||
@@ -24,5 +25,7 @@ namespace Orchard.Core.Settings.Models {
|
||||
public virtual ResourceDebugMode ResourceDebugMode { get; set; }
|
||||
|
||||
public virtual int PageSize { get; set; }
|
||||
|
||||
public virtual string SiteTimeZone { get; set; }
|
||||
}
|
||||
}
|
@@ -36,6 +36,7 @@ namespace Orchard.Core.Settings.Services {
|
||||
item.Record.SiteSalt = Guid.NewGuid().ToString("N");
|
||||
item.Record.SiteName = "My Orchard Project Application";
|
||||
item.Record.PageTitleSeparator = " - ";
|
||||
item.Record.SiteTimeZone = TimeZoneInfo.Local.Id;
|
||||
}).ContentItem;
|
||||
}
|
||||
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Settings.Models;
|
||||
using Orchard.Settings;
|
||||
@@ -7,6 +8,7 @@ namespace Orchard.Core.Settings.ViewModels {
|
||||
public class SiteSettingsPartViewModel {
|
||||
public SiteSettingsPart Site { get; set; }
|
||||
public IEnumerable<string> SiteCultures { get; set; }
|
||||
public IEnumerable<TimeZoneInfo> TimeZones { get; set; }
|
||||
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id {
|
||||
@@ -47,5 +49,10 @@ namespace Orchard.Core.Settings.ViewModels {
|
||||
get { return Site.BaseUrl; }
|
||||
set { Site.BaseUrl = value; }
|
||||
}
|
||||
|
||||
public string TimeZone {
|
||||
get { return Site.SiteTimeZone; }
|
||||
set { Site.SiteTimeZone = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,12 @@
|
||||
@Html.ValidationMessage("SiteCulture", "*")
|
||||
<p>@Html.ActionLink(T("Add or remove supported cultures for the site.").ToString(), "Culture")</p>
|
||||
</div>
|
||||
<div>
|
||||
<label for="TimeZone">@T("Default Time Zone")</label>
|
||||
@Html.DropDownList("TimeZone", new[] { new SelectListItem { Text = T("Local to server").Text, Value = "" } }.Union(new SelectList(Model.TimeZones, "Id", "", Model.TimeZone)))
|
||||
@Html.ValidationMessage("TimeZone", "*")
|
||||
<span class="hint">@T("Determines the default time zone which will should be used to display date and times.")</span>
|
||||
</div>
|
||||
<div>
|
||||
<label for="PageTitleSeparator">@T("Page title separator")</label>
|
||||
@Html.EditorFor(x => x.PageTitleSeparator)
|
||||
|
@@ -313,8 +313,9 @@ namespace Orchard.Core.Shapes {
|
||||
}
|
||||
|
||||
[Shape]
|
||||
public void Style(TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary<string, string> TagAttributes) {
|
||||
ResourceManager.WriteResource(Output, Resource, Url, Condition, TagAttributes);
|
||||
public void Style(dynamic Display, HtmlHelper Html, TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary<string, string> TagAttributes) {
|
||||
// do not write to Output directly as Styles are rendered in Zones
|
||||
ResourceManager.WriteResource(Html.ViewContext.Writer, Resource, Url, Condition, TagAttributes);
|
||||
}
|
||||
|
||||
[Shape]
|
||||
|
@@ -7,22 +7,27 @@ using Orchard.Mvc.Html;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Shapes {
|
||||
public class DateTimeShapes : ISingletonDependency {
|
||||
public class DateTimeShapes : IDependency {
|
||||
private readonly IClock _clock;
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
|
||||
public DateTimeShapes(IClock clock) {
|
||||
public DateTimeShapes(
|
||||
IClock clock,
|
||||
IWorkContextAccessor workContextAccessor
|
||||
) {
|
||||
_clock = clock;
|
||||
_workContextAccessor = workContextAccessor;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
[Shape]
|
||||
public IHtmlString DateTimeRelative(HtmlHelper Html, DateTime dateTimeUtc) {
|
||||
public IHtmlString DateTimeRelative(dynamic Display, DateTime dateTimeUtc) {
|
||||
var time = _clock.UtcNow - dateTimeUtc;
|
||||
|
||||
if (time.TotalDays > 7)
|
||||
return Html.DateTime(dateTimeUtc.ToLocalTime(), T("'on' MMM d yyyy 'at' h:mm tt"));
|
||||
return Display.DateTime(DateTimeUtc: dateTimeUtc, CustomFormat: T("'on' MMM d yyyy 'at' h:mm tt"));
|
||||
if (time.TotalHours > 24)
|
||||
return T.Plural("1 day ago", "{0} days ago", time.Days);
|
||||
if (time.TotalMinutes > 60)
|
||||
@@ -34,5 +39,30 @@ namespace Orchard.Core.Shapes {
|
||||
|
||||
return T("a moment ago");
|
||||
}
|
||||
|
||||
[Shape]
|
||||
public IHtmlString DateTime(DateTime DateTimeUtc, LocalizedString CustomFormat) {
|
||||
//using a LocalizedString forces the caller to use a localizable format
|
||||
|
||||
if (CustomFormat == null || String.IsNullOrWhiteSpace(CustomFormat.Text)) {
|
||||
return DateTime(DateTimeUtc, T("MMM d yyyy h:mm tt"));
|
||||
}
|
||||
|
||||
return new MvcHtmlString(ConvertToDisplayTime(DateTimeUtc).ToString(CustomFormat.Text));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Coordinated Universal Time (UTC) to the time in the current time zone.
|
||||
/// </summary>
|
||||
/// <param name="dateTimeUtc">The Coordinated Universal Time (UTC).</param>
|
||||
/// <returns>The date and time in the selected time zone. Its System.DateTime.Kind property is System.DateTimeKind.Utc if the current zone is System.TimeZoneInfo.Utc; otherwise, its System.DateTime.Kind property is System.DateTimeKind.Unspecified.</returns>
|
||||
private DateTime ConvertToDisplayTime(DateTime dateTimeUtc) {
|
||||
|
||||
// get the time zone for the current request
|
||||
var timeZone = _workContextAccessor.GetContext().CurrentTimeZone;
|
||||
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(dateTimeUtc, timeZone);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -214,7 +214,9 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
form.submit();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<ul class="pageStatus">
|
||||
<li>
|
||||
<img class="icon" src="@Href("~/Modules/Orchard.ArchiveLater/Content/Admin/images/scheduled.gif")" alt="@T("Scheduled")" title="@T("The page is scheduled for archiving")" />@T("Unpublish on")
|
||||
@Html.DateTime((DateTime)Model.ScheduledArchiveUtc.ToLocalTime(), T("M/d/yyyy h:mm tt"))
|
||||
@Display.DateTime(DateTimeUtc: (DateTime)Model.ScheduledArchiveUtc.ToLocalTime(), CustomFormat: T("M/d/yyyy h:mm tt"))
|
||||
|
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -7,13 +7,13 @@ namespace Orchard.Comments.ViewModels {
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[RegularExpression(@"^[^@\s]+@[^@\s]+$")]
|
||||
[RegularExpression(@"^[^@\s]+@[^@\s]+$", ErrorMessage = "Invalid Email")]
|
||||
[StringLength(255)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[StringLength(245)]
|
||||
[DisplayName("Site")]
|
||||
[RegularExpression(@"^(http(s)?://)?([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}[\S]+$")]
|
||||
[RegularExpression(@"^(http(s)?://)?([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}[\S]+$", ErrorMessage = "Invalid url")]
|
||||
public string SiteName { get; set; }
|
||||
|
||||
[Required, DisplayName("Comment")]
|
||||
|
@@ -83,7 +83,7 @@
|
||||
@text
|
||||
}
|
||||
</td>
|
||||
<td>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</td>
|
||||
<td>@Display.DateTime(DateTimeUtc: commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</td>
|
||||
<td>
|
||||
<ul class="actions">
|
||||
<li class="construct">
|
||||
|
@@ -77,7 +77,7 @@
|
||||
</td>
|
||||
<td>
|
||||
@* would ideally have permalinks for individual comments *@
|
||||
<p><a href="@Url.ItemDisplayUrl(commentEntry.CommentedOn)#comments"><time>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</time></a></p>
|
||||
<p><a href="@Url.ItemDisplayUrl(commentEntry.CommentedOn)#comments"><time>@Display.DateTime(DateTimeUtc: commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</time></a></p>
|
||||
@if (commentEntry.Comment.CommentText != null) {
|
||||
var ellipsized = Html.Ellipsize(commentEntry.Comment.CommentText, 500);
|
||||
var paragraphed = new HtmlString(ellipsized.ToHtmlString().Replace("\r\n", "</p><p>"));
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<fieldset class="manage-field">
|
||||
<h3>@Model.DisplayName <span>(@Model.FieldDefinition.Name)</span></h3>
|
||||
<div class="manage">
|
||||
@Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) |
|
||||
@Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" }) @* <- some experimentation *@
|
||||
@Html.ActionLink(T("Edit").Text, "EditField", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }) |
|
||||
@Html.ActionLink(T("Remove").Text, "RemoveFieldFrom", new { area = "Orchard.ContentTypes", id = Model.Part.Name, Model.Name }, new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
</div>
|
||||
<div class="details">
|
||||
@{Html.RenderTemplates(Model.Templates);}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@using Orchard.Experimental.Models;
|
||||
|
||||
<div class="debug message">
|
||||
Experimental: displaying @Html.ActionLink(T("{0} #{1} v{2}", Model.ContentItem.ContentType, Model.ContentItem.Id, Model.ContentItem.Version).ToString(), "details", "content", new { area = "Orchard.Experimental", Model.ContentItem.Id, Model.ContentItem.Version }, new { }))
|
||||
Experimental: displaying @Html.ActionLink(T("{0} #{1} v{2}", Model.ContentItem.ContentType, Model.ContentItem.Id, Model.ContentItem.Version).ToString(), "details", "content", new { area = "Orchard.Experimental", (int)Model.ContentItem.Id, (int)Model.ContentItem.Version }, new { }))
|
||||
</div>
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
@model Orchard.ImportExport.ViewModels.ExportViewModel
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.ImportExport.ViewModels.ExportViewModel
|
||||
|
||||
@{ Layout.Title = T("Export").ToString(); }
|
||||
|
||||
@@ -12,7 +13,7 @@
|
||||
<li>
|
||||
<input type="hidden" value="@Model.ContentTypes[contentTypeIndex].ContentTypeName" name="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].ContentTypeName)"/>
|
||||
<input type="checkbox" value="true" name="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)" id="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)" />
|
||||
<label class="forcheckbox" for="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)">@Model.ContentTypes[contentTypeIndex].ContentTypeName</label>
|
||||
<label class="forcheckbox" for="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)">@Model.ContentTypes[contentTypeIndex].ContentTypeName.CamelFriendly()</label>
|
||||
</li>
|
||||
contentTypeIndex = contentTypeIndex + 1;
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
Layout.Title = T("Import").ToString();
|
||||
|
||||
using (Html.BeginFormAntiForgeryPost(Url.Action("Import", new { area = "Orchard.ImportExport" }), FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
Html.ValidationSummary();
|
||||
@Html.ValidationSummary();
|
||||
<p>@T("Choose a recipe file to import. Please consider {0} or backing up your data first.",
|
||||
@Html.Link(T("exporting").Text, Url.Action("Export", "Admin", new { area = "Orchard.ImportExport" })))</p>
|
||||
<fieldset>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -72,7 +72,7 @@ namespace Orchard.Modules.Services {
|
||||
/// <param name="force">Boolean parameter indicating if the feature should enable it's dependencies if required or fail otherwise.</param>
|
||||
public void EnableFeatures(IEnumerable<string> featureIds, bool force) {
|
||||
foreach (string featureId in _featureManager.EnableFeatures(featureIds, force)) {
|
||||
var featureName = _featureManager.GetAvailableFeatures().Where(f => f.Id == featureId).First().Name;
|
||||
var featureName = _featureManager.GetAvailableFeatures().First(f => f.Id.Equals(featureId, StringComparison.OrdinalIgnoreCase)).Name;
|
||||
Services.Notifier.Information(T("{0} was enabled", featureName));
|
||||
}
|
||||
}
|
||||
|
@@ -49,16 +49,17 @@
|
||||
}
|
||||
|
||||
var dependencies = (from d in feature.Descriptor.Dependencies
|
||||
select (from f in Model.Features where f.Descriptor.Id == d select f).SingleOrDefault()).Where(f => f != null).OrderBy(f => f.Descriptor.Name);
|
||||
select (from f in Model.Features where f.Descriptor.Id.Equals(d, StringComparison.OrdinalIgnoreCase) select f).SingleOrDefault()).Where(f => f != null).OrderBy(f => f.Descriptor.Name);
|
||||
var missingDependencies = feature.Descriptor.Dependencies
|
||||
.Where(d => !Model.Features.Any(f => f.Descriptor.Id == d));
|
||||
.Where(d => !Model.Features.Any(f => f.Descriptor.Id.Equals(d, StringComparison.OrdinalIgnoreCase)));
|
||||
showDisable = categoryName.ToString() != "Core";
|
||||
showEnable = missingDependencies.Count() == 0 && feature.Descriptor.Id != "Orchard.Setup";
|
||||
showEnable = !missingDependencies.Any() && feature.Descriptor.Id != "Orchard.Setup";
|
||||
<li class="@featureClassName" id="@featureId" title="@T("{0} is {1}", Html.AttributeEncode(featureName), featureState)">
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3>@featureName</h3>
|
||||
<p class="description">@feature.Descriptor.Description</p>@if (feature.Descriptor.Dependencies != null && feature.Descriptor.Dependencies.Any()) {
|
||||
<p class="description">@feature.Descriptor.Description</p>
|
||||
@if (feature.Descriptor.Dependencies != null && feature.Descriptor.Dependencies.Any()) {
|
||||
<div class="dependencies">
|
||||
<h4>@T("Depends on:")</h4>
|
||||
@Html.UnorderedList(dependencies,
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -48,7 +48,7 @@ namespace Orchard.MultiTenancy.Services {
|
||||
|
||||
ExtensionDescriptor theme = descriptor;
|
||||
|
||||
if (!theme.Tags.Contains("hidden")) {
|
||||
if (theme.Tags == null || !theme.Tags.Contains("hidden")) {
|
||||
themes.Add(theme);
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,10 @@
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user