mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge 1.x -> default
This commit is contained in:
@@ -23,15 +23,15 @@ namespace Orchard.Specs.Hosting {
|
|||||||
|
|
||||||
var details = new RequestDetails {
|
var details = new RequestDetails {
|
||||||
HostName = webHost.HostName,
|
HostName = webHost.HostName,
|
||||||
UrlPath = urlPath,
|
UrlPath = urlPath.Replace('\\', '/'),
|
||||||
};
|
};
|
||||||
|
|
||||||
int queryIndex = urlPath.IndexOf('?');
|
int queryIndex = urlPath.IndexOf('?');
|
||||||
if (queryIndex >= 0) {
|
if (queryIndex >= 0) {
|
||||||
details.UrlPath = urlPath.Substring(0, queryIndex);
|
details.UrlPath = urlPath.Substring(0, queryIndex).Replace('\\', '/');
|
||||||
details.Query = urlPath.Substring(queryIndex + 1);
|
details.Query = urlPath.Substring(queryIndex + 1);
|
||||||
}
|
}
|
||||||
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString());
|
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString()).Replace('\\','/');
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(webHost.Cookies)) {
|
if (!string.IsNullOrEmpty(webHost.Cookies)) {
|
||||||
details.RequestHeaders.Add("Cookie", webHost.Cookies);
|
details.RequestHeaders.Add("Cookie", webHost.Cookies);
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ background-position:0 -30px !important;
|
|||||||
background-image:url(images/menu.content.png);
|
background-image:url(images/menu.content.png);
|
||||||
}
|
}
|
||||||
/* subnav */
|
/* subnav */
|
||||||
#menu .menu-admin .selected .menuItems a {
|
#menu .menu-admin .section-new .menuItems a {
|
||||||
background-position:0 4px;
|
background-position:0 4px;
|
||||||
}
|
}
|
||||||
#menu .menu-admin .selected .menuItems a:hover, #menu .menu-admin .selected .menuItems .selected a {
|
#menu .menu-admin .section-new .menuItems a:hover, #menu .menu-admin .section-new .menuItems .selected a {
|
||||||
background-position:0 -28px;
|
background-position:0 -28px;
|
||||||
}
|
}
|
||||||
@@ -197,6 +197,8 @@
|
|||||||
<Compile Include="Scheduling\Services\ScheduledTaskManager.cs" />
|
<Compile Include="Scheduling\Services\ScheduledTaskManager.cs" />
|
||||||
<Compile Include="Scheduling\Services\ScheduledTaskExecutor.cs" />
|
<Compile Include="Scheduling\Services\ScheduledTaskExecutor.cs" />
|
||||||
<Compile Include="Scheduling\Models\Task.cs" />
|
<Compile Include="Scheduling\Models\Task.cs" />
|
||||||
|
<Compile Include="Settings\Models\SiteSettings2Part.cs" />
|
||||||
|
<Compile Include="Settings\Models\SiteSettings2PartRecord.cs" />
|
||||||
<Compile Include="Settings\ResourceManifest.cs" />
|
<Compile Include="Settings\ResourceManifest.cs" />
|
||||||
<Compile Include="Settings\Migrations.cs" />
|
<Compile Include="Settings\Migrations.cs" />
|
||||||
<Compile Include="Settings\Drivers\SiteSettingsPartDriver.cs" />
|
<Compile Include="Settings\Drivers\SiteSettingsPartDriver.cs" />
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ using Orchard.ContentManagement.Handlers;
|
|||||||
namespace Orchard.Core.Settings.Handlers {
|
namespace Orchard.Core.Settings.Handlers {
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public class SiteSettingsPartHandler : ContentHandler {
|
public class SiteSettingsPartHandler : ContentHandler {
|
||||||
public SiteSettingsPartHandler(IRepository<SiteSettingsPartRecord> repository){
|
public SiteSettingsPartHandler(IRepository<SiteSettingsPartRecord> repository, IRepository<SiteSettings2PartRecord> repository2) {
|
||||||
Filters.Add(new ActivatingFilter<SiteSettingsPart>("Site"));
|
Filters.Add(new ActivatingFilter<SiteSettingsPart>("Site"));
|
||||||
|
Filters.Add(new ActivatingFilter<SiteSettings2Part>("Site"));
|
||||||
Filters.Add(StorageFilter.For(repository));
|
Filters.Add(StorageFilter.For(repository));
|
||||||
|
Filters.Add(StorageFilter.For(repository2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,9 +97,10 @@ namespace Orchard.Core.Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom1() {
|
public int UpdateFrom1() {
|
||||||
SchemaBuilder.AlterTable("SiteSettingsPartRecord",
|
SchemaBuilder.CreateTable("SiteSettings2PartRecord",
|
||||||
table => table
|
table => table
|
||||||
.AddColumn<string>("BaseUrl", c => c.WithLength(255))
|
.ContentPartRecord()
|
||||||
|
.Column<string>("BaseUrl", c => c.Unlimited())
|
||||||
);
|
);
|
||||||
|
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Orchard.ContentManagement;
|
||||||
|
using Orchard.Data.Conventions;
|
||||||
|
|
||||||
|
namespace Orchard.Core.Settings.Models {
|
||||||
|
public sealed class SiteSettings2Part : ContentPart<SiteSettings2PartRecord> {
|
||||||
|
[StringLengthMax]
|
||||||
|
public string BaseUrl {
|
||||||
|
get { return Record.BaseUrl; }
|
||||||
|
set { Record.BaseUrl = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Orchard.ContentManagement.Records;
|
||||||
|
using Orchard.Data.Conventions;
|
||||||
|
|
||||||
|
namespace Orchard.Core.Settings.Models {
|
||||||
|
public class SiteSettings2PartRecord : ContentPartRecord {
|
||||||
|
[StringLengthMax]
|
||||||
|
public virtual string BaseUrl { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
|
using Orchard.Data.Conventions;
|
||||||
using Orchard.Settings;
|
using Orchard.Settings;
|
||||||
|
|
||||||
namespace Orchard.Core.Settings.Models {
|
namespace Orchard.Core.Settings.Models {
|
||||||
@@ -44,10 +45,14 @@ namespace Orchard.Core.Settings.Models {
|
|||||||
set { Record.PageSize = value; }
|
set { Record.PageSize = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[StringLength(255)]
|
[StringLengthMax]
|
||||||
public string BaseUrl {
|
public string BaseUrl {
|
||||||
get { return Record.BaseUrl; }
|
get {
|
||||||
set { Record.BaseUrl = value; }
|
return this.As<SiteSettings2Part>().BaseUrl;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.As<SiteSettings2Part>().BaseUrl = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using Orchard.ContentManagement.Records;
|
||||||
using Orchard.ContentManagement.Records;
|
|
||||||
using Orchard.Settings;
|
using Orchard.Settings;
|
||||||
|
|
||||||
namespace Orchard.Core.Settings.Models {
|
namespace Orchard.Core.Settings.Models {
|
||||||
@@ -25,8 +24,5 @@ namespace Orchard.Core.Settings.Models {
|
|||||||
public virtual ResourceDebugMode ResourceDebugMode { get; set; }
|
public virtual ResourceDebugMode ResourceDebugMode { get; set; }
|
||||||
|
|
||||||
public virtual int PageSize { get; set; }
|
public virtual int PageSize { get; set; }
|
||||||
|
|
||||||
[StringLength(255)]
|
|
||||||
public virtual string BaseUrl { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
Script.Require("Switchable");
|
Script.Require("Switchable");
|
||||||
Style.Require("Switchable");
|
Style.Require("Switchable");
|
||||||
IEnumerable<LayerPart> layers = Model.Layers;
|
IEnumerable<LayerPart> layers = Model.Layers;
|
||||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
var returnUrl = Request.RawUrl;
|
||||||
}
|
}
|
||||||
<div id="widgets-layers-control" class="widgets-container">
|
<div id="widgets-layers-control" class="widgets-container">
|
||||||
@if (layers.Count() > 0) {
|
@if (layers.Count() > 0) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@{
|
@{
|
||||||
Style.Require("WidgetsAdmin");
|
Style.Require("WidgetsAdmin");
|
||||||
IEnumerable<WidgetPart> widgets = Model.OrphanWidgets;
|
IEnumerable<WidgetPart> widgets = Model.OrphanWidgets;
|
||||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
var returnUrl = Request.RawUrl;
|
||||||
}
|
}
|
||||||
@if (widgets.Count() > 0) {
|
@if (widgets.Count() > 0) {
|
||||||
<div id="widgets-orphans" class="widgets-container widgets-listed message-Warning">
|
<div id="widgets-orphans" class="widgets-container widgets-listed message-Warning">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Style.Require("WidgetsAdmin");
|
Style.Require("WidgetsAdmin");
|
||||||
IEnumerable<WidgetPart> widgets = Model.Widgets;
|
IEnumerable<WidgetPart> widgets = Model.Widgets;
|
||||||
IEnumerable<string> zones = Model.Zones;
|
IEnumerable<string> zones = Model.Zones;
|
||||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
var returnUrl = Request.RawUrl;
|
||||||
}
|
}
|
||||||
<ol>
|
<ol>
|
||||||
@foreach (string zone in zones) {
|
@foreach (string zone in zones) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
IEnumerable<WidgetPart> widgets = Model.Widgets;
|
IEnumerable<WidgetPart> widgets = Model.Widgets;
|
||||||
IEnumerable<string> zones = Model.Zones;
|
IEnumerable<string> zones = Model.Zones;
|
||||||
IEnumerable<string> orphanZones = Model.OrphanZones;
|
IEnumerable<string> orphanZones = Model.OrphanZones;
|
||||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
var returnUrl = Request.RawUrl;
|
||||||
}
|
}
|
||||||
<div id="widgets-placement">
|
<div id="widgets-placement">
|
||||||
<div id="widgets-layers" class="widgets-container detail-view switchable">
|
<div id="widgets-layers" class="widgets-container detail-view switchable">
|
||||||
|
|||||||
Reference in New Issue
Block a user