Merge branch '1.8.x' into 1.x

This commit is contained in:
Sebastien Ros
2014-04-28 13:23:27 -07:00
7 changed files with 14 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ namespace Orchard.Core.Containers.Settings {
} }
public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) { public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) {
if (builder.Name != "ContainerPart") if (builder.Name != "ContainablePart")
yield break; yield break;
var model = new ContainableTypePartSettings(); var model = new ContainableTypePartSettings();

View File

@@ -16,6 +16,7 @@
<fieldset> <fieldset>
@Html.LabelFor(m => m.Part.Record.OrderByProperty, T("Order by")) @Html.LabelFor(m => m.Part.Record.OrderByProperty, T("Order by"))
<select id="@Html.FieldIdFor(m => m.Part.Record.OrderByProperty)" name="@Html.FieldNameFor(m => m.Part.Record.OrderByProperty)"> <select id="@Html.FieldIdFor(m => m.Part.Record.OrderByProperty)" name="@Html.FieldNameFor(m => m.Part.Record.OrderByProperty)">
@Html.SelectOption(Model.Part.Record.OrderByProperty, "ContainablePart.Weight", T("Weight").Text)
@Html.SelectOption(Model.Part.Record.OrderByProperty, "CommonPart.CreatedUtc", T("Date Created").Text) @Html.SelectOption(Model.Part.Record.OrderByProperty, "CommonPart.CreatedUtc", T("Date Created").Text)
@Html.SelectOption(Model.Part.Record.OrderByProperty, "CommonPart.PublishedUtc", T("Date Published").Text) @Html.SelectOption(Model.Part.Record.OrderByProperty, "CommonPart.PublishedUtc", T("Date Published").Text)
@Html.SelectOption(Model.Part.Record.OrderByProperty, "TitlePart.Title", T("Title (Title Part)").Text) @Html.SelectOption(Model.Part.Record.OrderByProperty, "TitlePart.Title", T("Title (Title Part)").Text)

View File

@@ -17,7 +17,7 @@ namespace Orchard.Autoroute.Services {
public AutoroutePart GetPath(string path) { public AutoroutePart GetPath(string path) {
var autorouteRecord = _autorouteRepository.Table var autorouteRecord = _autorouteRepository.Table
.Where(part => part.DisplayAlias == path && part.ContentItemVersionRecord.Latest && part.ContentItemVersionRecord.Published) .Where(part => part.DisplayAlias == path && part.ContentItemVersionRecord.Published)
.FirstOrDefault(); .FirstOrDefault();
if (autorouteRecord == null) { if (autorouteRecord == null) {

View File

@@ -228,6 +228,11 @@ namespace Orchard.OutputCache.Filters {
} }
} }
// don't enable public caching for requests with query string
if (queryString.AllKeys.Any()) {
_maxAge = 0;
}
// compute the cache key // compute the cache key
_cacheKey = ComputeCacheKey(filterContext, parameters); _cacheKey = ComputeCacheKey(filterContext, parameters);

View File

@@ -132,6 +132,10 @@ position:absolute;
top:1px; top:1px;
width:20px; width:20px;
} }
.widgets-listed .widgets-zone-widgets h3,
.widgets-listed .widgets-zone-widgets .contentType {
display: inline;
}
.widgets-listed .widgets-move { .widgets-listed .widgets-move {
background:url(images/arrows.png) 7px -31px no-repeat; background:url(images/arrows.png) 7px -31px no-repeat;
border:0; border:0;

View File

@@ -1,4 +1,5 @@
@model Orchard.Widgets.Models.WidgetPart @model Orchard.Widgets.Models.WidgetPart
<h2>@Model.TypeDefinition.DisplayName</h2>
<fieldset> <fieldset>
@Html.LabelFor(widget => widget.Zone, T("Zone")) @Html.LabelFor(widget => widget.Zone, T("Zone"))
@Html.DropDownListFor(widget => widget.Zone, new SelectList(Model.AvailableZones)) @Html.DropDownListFor(widget => widget.Zone, new SelectList(Model.AvailableZones))

View File

@@ -22,7 +22,7 @@
foreach (WidgetPart widget in widgets.Where(w => w.Zone == zone).OrderBy(w => w.Position, new Orchard.UI.FlatPositionComparer())) { foreach (WidgetPart widget in widgets.Where(w => w.Zone == zone).OrderBy(w => w.Position, new Orchard.UI.FlatPositionComparer())) {
<li class="widgets-@(widget.LayerId == Model.CurrentLayer.Id ? "this" : "other")-layer widgets-layer-@widget.LayerId@(i == 0 ? " first" : (i == count ? " last" : ""))"> <li class="widgets-@(widget.LayerId == Model.CurrentLayer.Id ? "this" : "other")-layer widgets-layer-@widget.LayerId@(i == 0 ? " first" : (i == count ? " last" : ""))">
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
<h3>@Html.ActionLink(HasText(widget.Title) ? widget.Title : widget.TypeDefinition.DisplayName, "EditWidget", new { @widget.Id, returnUrl })</h3> <h3>@Html.ActionLink(HasText(widget.Title) ? widget.Title : widget.TypeDefinition.DisplayName, "EditWidget", new { @widget.Id, returnUrl })</h3><div class="contentType"> - @widget.TypeDefinition.DisplayName</div>
<div class="widgets-actions"> <div class="widgets-actions">
@if (widget.LayerId != Model.CurrentLayer.Id) { @if (widget.LayerId != Model.CurrentLayer.Id) {
<button name="moveHere" class="link" type="submit" value="1">@T("Move to current layer")</button> <button name="moveHere" class="link" type="submit" value="1">@T("Move to current layer")</button>