Merge branch 'master' into dev

This commit is contained in:
Sebastien Ros
2016-03-17 10:05:46 -07:00
11 changed files with 15 additions and 17 deletions

View File

@@ -323,6 +323,7 @@
<ItemGroup> <ItemGroup>
<Zip-Exclude Include=" <Zip-Exclude Include="
$(MSBuildProjectDirectory)\src\**\packages\**\*;
$(MSBuildProjectDirectory)\src\**\bin\**\*; $(MSBuildProjectDirectory)\src\**\bin\**\*;
$(MSBuildProjectDirectory)\src\**\obj\**\*; $(MSBuildProjectDirectory)\src\**\obj\**\*;
$(MSBuildProjectDirectory)\**\App_Data\**\*; $(MSBuildProjectDirectory)\**\App_Data\**\*;
@@ -339,7 +340,7 @@
<Zip-Stage Include="$(StageFolder)\**\*" /> <Zip-Stage Include="$(StageFolder)\**\*" />
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" /> <Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude="$(MSBuildProjectDirectory)\**\bin\**\*.pdb;"/>
<Zip-Source Include=" <Zip-Source Include="
$(MSBuildProjectDirectory)\lib\**\*; $(MSBuildProjectDirectory)\lib\**\*;

View File

@@ -6,7 +6,7 @@ Orchard is a free, open source, community-focused Content Management System buil
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button. You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://ms.portal.azure.com/#create/OutercurveFoundation.OrchardCMS.0.5.9) [![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS.1.0.4)
## About The Orchard Project ## About The Orchard Project

View File

@@ -72,6 +72,7 @@ namespace Orchard.Core.Common.Drivers {
() => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part))); () => shapeHelper.EditorTemplate(TemplateName: "Fields.Common.Text.Edit", Model: viewModel, Prefix: GetPrefix(field, part)));
} }
field.Value = viewModel.Text;
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(); var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) { if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) {

View File

@@ -104,7 +104,7 @@ namespace Orchard.Autoroute.Handlers {
// Is this the current home page? // Is this the current home page?
if (part.ContentItem.Id == homePageId) { if (part.ContentItem.Id == homePageId) {
_orchardServices.Notifier.Warning(T("You removed the content item that served as the site\'s home page. \nMost possibly this means that instead of the home page a \"404 Not Found\" error page will be displayed without a link to log in or access the dashboard. \n\nTo prevent this you can e.g. publish a content item that has the \"Set as home page\" checkbox ticked.")); _orchardServices.Notifier.Warning(T("You removed the content item that served as the site's home page. \nMost possibly this means that instead of the home page a \"404 Not Found\" page will be displayed. \n\nTo prevent this you can e.g. publish a content item that has the \"Set as home page\" checkbox ticked."));
} }
_autorouteService.Value.RemoveAliases(part); _autorouteService.Value.RemoveAliases(part);
} }

View File

@@ -273,7 +273,7 @@ namespace Orchard.ContentTypes.Services {
} }
public IEnumerable<ContentFieldInfo> GetFields() { public IEnumerable<ContentFieldInfo> GetFields() {
return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()); return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()).GroupBy(x => x.FieldTypeName).Select(g => g.First());
} }
public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) { public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) {

View File

@@ -19,7 +19,7 @@ namespace Orchard.Fields.Drivers {
protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) { protected override DriverResult Editor(ContentPart part, TextField field, IUpdateModel updater, dynamic shapeHelper) {
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>(); var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
if (String.IsNullOrEmpty(field.Value) && !String.IsNullOrEmpty(settings.DefaultValue)) { if (!String.IsNullOrEmpty(settings.DefaultValue) && (String.IsNullOrEmpty(field.Value) || field.Value.Equals(settings.DefaultValue))) {
field.Value = _tokenizer.Replace(settings.DefaultValue, new Dictionary<string, object> { { "Content", part.ContentItem } }); field.Value = _tokenizer.Replace(settings.DefaultValue, new Dictionary<string, object> { { "Content", part.ContentItem } });
} }

View File

@@ -610,7 +610,5 @@ $(function () {
return false; return false;
}); });
// Select recent folder when the page is initialized.
viewModel.selectRecent();
})(window.mediaLibrarySettings); })(window.mediaLibrarySettings);
}) })

View File

@@ -139,10 +139,9 @@ namespace Orchard.MultiTenancy.Controllers {
return new HttpUnauthorizedResult(); return new HttpUnauthorizedResult();
var tenant = _tenantService.GetTenants().FirstOrDefault(ss => ss.Name == viewModel.Name); var tenant = _tenantService.GetTenants().FirstOrDefault(ss => ss.Name == viewModel.Name);
if (tenant == null) if (tenant == null)
return HttpNotFound(); return HttpNotFound();
else if (tenant.Name == _thisShellSettings.Name)
return new HttpUnauthorizedResult();
if (!ModelState.IsValid) { if (!ModelState.IsValid) {
return View(viewModel); return View(viewModel);

View File

@@ -41,7 +41,7 @@ namespace Orchard.Taxonomies.Controllers {
var taxonomy = _taxonomyService.GetTaxonomy(taxonomyId); var taxonomy = _taxonomyService.GetTaxonomy(taxonomyId);
var terms = _taxonomyService.GetTermsQuery(taxonomyId).Slice(pager.GetStartIndex(), pager.PageSize); var terms = TermPart.Sort(_taxonomyService.GetTermsQuery(taxonomyId).Slice(pager.GetStartIndex(), pager.PageSize));
var pagerShape = Shape.Pager(pager).TotalItemCount(_taxonomyService.GetTermsQuery(taxonomyId).Count()); var pagerShape = Shape.Pager(pager).TotalItemCount(_taxonomyService.GetTermsQuery(taxonomyId).Count());

View File

@@ -62,8 +62,7 @@ namespace Orchard.Taxonomies.Drivers {
protected override DriverResult Editor(ContentPart part, TaxonomyField field, IUpdateModel updater, dynamic shapeHelper) { protected override DriverResult Editor(ContentPart part, TaxonomyField field, IUpdateModel updater, dynamic shapeHelper) {
// Initializing viewmodel using the terms that are already selected to prevent loosing them when updating an editor group this field isn't displayed in. // Initializing viewmodel using the terms that are already selected to prevent loosing them when updating an editor group this field isn't displayed in.
// Get all the selected, published terms of all the TaxonomyFields of the content item. var appliedTerms = GetAppliedTerms(part, field, VersionOptions.Latest).ToList();
var appliedTerms = GetAppliedTerms(part).ToList();
var viewModel = new TaxonomyFieldViewModel { Terms = appliedTerms.Select(t => t.CreateTermEntry()).ToList() }; var viewModel = new TaxonomyFieldViewModel { Terms = appliedTerms.Select(t => t.CreateTermEntry()).ToList() };
foreach (var item in viewModel.Terms) item.IsChecked = true; foreach (var item in viewModel.Terms) item.IsChecked = true;

View File

@@ -2,6 +2,6 @@
Version: 1.10 Version: 1.10
Author: Jon Wall Author: Jon Wall
Tags: hidden, admin Tags: hidden, admin
Description: An admin theme not to be used for the site so don't click "Activate" (or "Uninstall"). In the near future admin themes won't be mixed in with site themes. Description: The Orchard admin theme.
Website: http://www.orchardproject.net Website: http://www.orchardproject.net
Zones: Header, Messages, BeforeContent, LocalNavigation, Content, AfterContent, Footer Zones: Header, Messages, BeforeContent, LocalNavigation, Content, AfterContent, Footer