mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge branch '1.9.x' into patch-1
Conflicts: src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -561,6 +561,23 @@
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
<Target Name="DeleteDebugFiles" AfterTargets="AfterBuild">
|
||||
<RemoveDir Directories="Themes;Core;Modules" />
|
||||
</Target>
|
||||
<Target Name="CopyDebugFiles" AfterTargets="DeleteDebugFiles" Condition="'$(Configuration)' == 'Debug'">
|
||||
<PropertyGroup>
|
||||
<SrcFolder>..\..</SrcFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.user;$(SrcFolder)\**\*.cs;$(SrcFolder)\**\*.csproj;$(SrcFolder)\**\.hg\**\*" />
|
||||
<Src-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
|
||||
<Src-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
|
||||
<Src-Modules Include="$(SrcFolder)\Orchard.Web\Modules\**\*" Exclude="@(Excluded)" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(Src-Themes)" DestinationFolder="Themes\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(Src-Core)" DestinationFolder="Core\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(Src-Modules)" DestinationFolder="Modules\%(RecursiveDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
@@ -580,6 +597,11 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>del "$(TargetDir)\Modules"
|
||||
del "$(TargetDir)\Themes"
|
||||
del "$(TargetDir)\Media"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@@ -192,7 +192,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
@@ -203,7 +203,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
@@ -199,7 +199,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
@@ -73,7 +73,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
+ <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
@@ -63,7 +63,7 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
_publicHostName = publicHostName;
|
||||
}
|
||||
|
||||
private void EnsureInitialized() {
|
||||
protected void EnsureInitialized() {
|
||||
if (_storageAccount != null) {
|
||||
return;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
// as opposed to the File System implementation, if nothing is done on the stream
|
||||
// the file will be emptied, because Azure doesn't implement FileMode.Truncate
|
||||
_blob.DeleteIfExists();
|
||||
_blob = _blob.Container.GetBlockBlobReference(_blob.Uri.ToString());
|
||||
_blob = _blob.Container.GetBlockBlobReference(_blob.Name);
|
||||
_blob.UploadFromStream(new MemoryStream(new byte[0]));
|
||||
return OpenWrite();
|
||||
}
|
||||
|
@@ -60,6 +60,7 @@ namespace Orchard.Azure.Services.FileSystems.Media {
|
||||
/// <param name="url">The public URL of the media.</param>
|
||||
/// <returns>The corresponding local path.</returns>
|
||||
public string GetStoragePath(string url) {
|
||||
EnsureInitialized();
|
||||
if (url.StartsWith(_absoluteRoot)) {
|
||||
return HttpUtility.UrlDecode(url.Substring(Combine(_absoluteRoot, "/").Length));
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>$$ProjectName$$</RootNamespace>
|
||||
<AssemblyName>$$ProjectName$$</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
@@ -72,6 +72,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ViewModels\NavigationPartViewModel.cs" />
|
||||
<Content Include="Scripts\ContentPicker.js" />
|
||||
<Content Include="Scripts\SelectableContentTab.js" />
|
||||
<Content Include="Styles\content-picker-admin.css" />
|
||||
<Content Include="Styles\ContentPicker.css" />
|
||||
<Content Include="Styles\Images\move.gif" />
|
||||
|
@@ -5,6 +5,7 @@ namespace Orchard.ContentPicker {
|
||||
public void BuildManifests(ResourceManifestBuilder builder) {
|
||||
var manifest = builder.Add();
|
||||
manifest.DefineScript("ContentPicker").SetUrl("ContentPicker.js", "ContentPicker.js").SetDependencies("jQuery");
|
||||
manifest.DefineScript("SelectableContentTab").SetUrl("SelectableContentTab.js", "SelectableContentTab.js").SetDependencies("jQuery");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -80,14 +80,26 @@
|
||||
addButton.click(function() {
|
||||
addButton.trigger("orchard-admin-contentpicker-open", {
|
||||
callback: function(data) {
|
||||
var tmpl = template.replace( /\{contentItemId\}/g , data.id)
|
||||
.replace( /\{edit-link\}/g , data.editLink)
|
||||
.replace( /\{status-text}/g , data.published? "" : " - " + notPublishedText);
|
||||
var content = $(tmpl);
|
||||
$(self).find('table.content-picker tbody').append(content);
|
||||
if (Array.isArray && Array.isArray(data)) {
|
||||
data.forEach(function (d) {
|
||||
var tmpl = template.replace(/\{contentItemId\}/g, d.id)
|
||||
.replace(/\{edit-link\}/g, d.editLink)
|
||||
.replace(/\{status-text}/g, d.published ? "" : " - " + notPublishedText);
|
||||
var content = $(tmpl);
|
||||
$(self).find('table.content-picker tbody').append(content);
|
||||
});
|
||||
refreshIds();
|
||||
$(self).find('.content-picker-message').show();
|
||||
} else {
|
||||
var tmpl = template.replace(/\{contentItemId\}/g, data.id)
|
||||
.replace(/\{edit-link\}/g, data.editLink)
|
||||
.replace(/\{status-text}/g, data.published ? "" : " - " + notPublishedText);
|
||||
var content = $(tmpl);
|
||||
$(self).find('table.content-picker tbody').append(content);
|
||||
|
||||
refreshIds();
|
||||
$(self).find('.content-picker-message').show();
|
||||
refreshIds();
|
||||
$(self).find('.content-picker-message').show();
|
||||
}
|
||||
},
|
||||
baseUrl: baseUrl,
|
||||
part: partName,
|
||||
|
@@ -0,0 +1,32 @@
|
||||
jQuery(function ($) {
|
||||
|
||||
Initialize = function () {
|
||||
|
||||
$('.button.addSelected').on('click', function () {
|
||||
var selectedItems = $('.content-picker-itemCheck:checked');
|
||||
var itemsToAdd = new Array();
|
||||
$.each(selectedItems, function (index, item) {
|
||||
var related = $(item).siblings('.content-picker-item').children('.related');
|
||||
var data = {
|
||||
id: related.data("id"),
|
||||
displayText: related.data("display-text"),
|
||||
editLink: related.data("edit-link"),
|
||||
editUrl: related.data("edit-url"),
|
||||
adminUrl: related.data("admin-url"),
|
||||
displayLink: related.data("display-link"),
|
||||
published: related.data("published")
|
||||
};
|
||||
return itemsToAdd.push(data);
|
||||
});
|
||||
window.opener.jQuery[query("callback")](itemsToAdd);
|
||||
window.close();
|
||||
});
|
||||
$('.content-picker-SelectAll').on('click', function () {
|
||||
$('.content-picker-itemCheck').prop('checked', $(this).prop("checked"));
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
return Initialize();
|
||||
});
|
||||
});
|
@@ -19,4 +19,37 @@ body {
|
||||
padding: 18px;
|
||||
background: white;
|
||||
border: 1px solid #E4E5E6;
|
||||
}
|
||||
|
||||
.content-picker-item
|
||||
{
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.content-picker-itemCheck
|
||||
{
|
||||
position:absolute;
|
||||
|
||||
}
|
||||
|
||||
label[for="selectAll"]:before
|
||||
{
|
||||
content:'';
|
||||
display:block;
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
label[for="selectAll"]
|
||||
{
|
||||
display:inline;
|
||||
}
|
||||
|
||||
.addSelected
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-size-options > div:first-child
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
@@ -3,27 +3,30 @@
|
||||
ContentItem contentItem = Model.ContentItem;
|
||||
}
|
||||
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
|
||||
<div class="properties">
|
||||
@*<input type="checkbox" value="@contentItem.Id" name="itemIds"/>*@
|
||||
<h3>@Html.ItemDisplayText(contentItem)</h3> - <div class="contentType">@contentItem.TypeDefinition.DisplayName</div>
|
||||
@if (Model.Header != null) {
|
||||
<div class="header">@Display(Model.Header)</div>
|
||||
}
|
||||
@if (Model.Meta != null) {
|
||||
<div class="metadata">@Display(Model.Meta)</div>
|
||||
<input type="checkbox" class="content-picker-itemCheck" />
|
||||
<div class="content-picker-item">
|
||||
<div class="properties">
|
||||
@*<input type="checkbox" value="@contentItem.Id" name="itemIds"/>*@
|
||||
<h3>@Html.ItemDisplayText(contentItem)</h3> - <div class="contentType">@contentItem.TypeDefinition.DisplayName</div>
|
||||
@if (Model.Header != null) {
|
||||
<div class="header">@Display(Model.Header)</div>
|
||||
}
|
||||
@if (Model.Meta != null) {
|
||||
<div class="metadata">@Display(Model.Meta)</div>
|
||||
}
|
||||
</div>
|
||||
<div class="related"
|
||||
data-display-text="@Html.ItemDisplayText(contentItem)"
|
||||
data-id="@contentItem.Id"
|
||||
data-edit-link="@Html.Encode(Html.ItemEditLink(contentItem))"
|
||||
data-edit-url="@Html.Encode(Url.ItemEditUrl(contentItem))"
|
||||
data-admin-url="@Html.Encode(Url.ItemAdminUrl(contentItem))"
|
||||
data-display-link="@Html.Encode(Html.ItemDisplayLink(contentItem))"
|
||||
data-published="@contentItem.VersionRecord.Published.ToString().ToLower()" >
|
||||
@Html.Link(T("Select").Text, "#", new { @class = "button select"})
|
||||
</div>
|
||||
@if (Model.Content != null) {
|
||||
<div class="primary">@Display(Model.Content)</div>
|
||||
}
|
||||
</div>
|
||||
<div class="related"
|
||||
data-display-text="@Html.ItemDisplayText(contentItem)"
|
||||
data-id="@contentItem.Id"
|
||||
data-edit-link="@Html.Encode(Html.ItemEditLink(contentItem))"
|
||||
data-edit-url="@Html.Encode(Url.ItemEditUrl(contentItem))"
|
||||
data-admin-url="@Html.Encode(Url.ItemAdminUrl(contentItem))"
|
||||
data-display-link="@Html.Encode(Html.ItemDisplayLink(contentItem))"
|
||||
data-published="@contentItem.VersionRecord.Published.ToString().ToLower()" >
|
||||
@Html.Link(T("Select").Text, "#", new { @class = "button select"})
|
||||
</div>
|
||||
@if (Model.Content != null) {
|
||||
<div class="primary">@Display(Model.Content)</div>
|
||||
}
|
||||
</div>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
@using Orchard.Core.Contents.ViewModels;
|
||||
@{
|
||||
Script.Require("SelectableContentTab");
|
||||
|
||||
var typeDisplayName = Model.TypeDisplayName;
|
||||
var pageTitle = T("Recent Content");
|
||||
|
||||
@@ -8,6 +10,7 @@
|
||||
}
|
||||
|
||||
Layout.Title = pageTitle;
|
||||
|
||||
}
|
||||
|
||||
<div class="manage">
|
||||
@@ -33,6 +36,7 @@
|
||||
<fieldset class="contentItems bulk-items">
|
||||
@Display(Model.ContentItems)
|
||||
</fieldset>
|
||||
@Html.Link(T("Add Selected").Text, "#", new { @class = "button addSelected"})
|
||||
@Display(Model.Pager)
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Tokens;
|
||||
|
||||
namespace Orchard.DynamicForms.Services {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
@@ -22,7 +21,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} must match the value of {1}.", context.FieldName, TargetName)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} must match the value of {1}.", context.FieldName, TargetName)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -28,7 +28,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} is not a valid email address.", context.FieldName)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} is not a valid email address.", context.FieldName)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
@@ -18,7 +17,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} is a mandatory field.", context.FieldName)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} is a mandatory field.", context.FieldName)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
@@ -18,7 +17,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("An option is required for {0}.", context.FieldName)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("An option is required for {0}.", context.FieldName)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
@@ -27,7 +26,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} must match the following pattern: {1}.", context.FieldName, Pattern)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} must match the following pattern: {1}.", context.FieldName, Pattern)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Localization;
|
||||
@@ -18,7 +17,9 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
return T(Tokenize(ErrorMessage.WithDefault(String.Format("{0} is a required field.", context.FieldName)), context));
|
||||
return String.IsNullOrWhiteSpace(ErrorMessage)
|
||||
? T("{0} is a required field.", context.FieldName)
|
||||
: new LocalizedString(Tokenize(ErrorMessage, context));
|
||||
}
|
||||
}
|
||||
}
|
@@ -40,12 +40,13 @@ namespace Orchard.DynamicForms.ValidationRules {
|
||||
}
|
||||
|
||||
private LocalizedString GetValidationMessage(ValidationContext context) {
|
||||
if (!String.IsNullOrWhiteSpace(ErrorMessage))
|
||||
return T(Tokenize(String.Format(ErrorMessage, context.FieldName, Minimum, Maximum), context));
|
||||
if(!String.IsNullOrWhiteSpace(ErrorMessage))
|
||||
return new LocalizedString(Tokenize(String.Format(ErrorMessage, context.FieldName, Minimum, Maximum), context));
|
||||
|
||||
if(Minimum != null && Maximum != null)
|
||||
if (Minimum != null && Maximum != null)
|
||||
return T("{0} must be between {1} and {2} characters long.", context.FieldName, Minimum, Maximum);
|
||||
else if (Minimum != null)
|
||||
|
||||
if (Minimum != null)
|
||||
return T("{0} must be at least {1} characters long.", context.FieldName, Minimum);
|
||||
|
||||
return T("{0} must be at most {1} characters long.", context.FieldName, Maximum);
|
||||
|
@@ -237,7 +237,10 @@ namespace Orchard.Indexing.Services {
|
||||
// skip items from types which are not indexed
|
||||
var settings = GetTypeIndexingSettings(item.ContentItem);
|
||||
if (settings.List.Contains(indexName)) {
|
||||
documentIndex = ExtractDocumentIndex(item.ContentItem);
|
||||
if (item.ContentItem.HasPublished()) {
|
||||
var published = _contentManager.Get(item.Id, VersionOptions.Published);
|
||||
documentIndex = ExtractDocumentIndex(published);
|
||||
}
|
||||
}
|
||||
else if (settings.List.Contains(indexName + ":latest")) {
|
||||
var latest = _contentManager.Get(item.Id, VersionOptions.Latest);
|
||||
|
@@ -156,10 +156,10 @@ namespace Orchard.MediaLibrary.Controllers {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageOwnMedia, T("Cannot view media")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder().MediaPath;
|
||||
|
||||
var mediaParts = _mediaLibraryService.GetMediaContentItems(rootMediaFolder, skip, count, order, mediaType);
|
||||
var mediaPartsCount = _mediaLibraryService.GetMediaContentItemsCount(rootMediaFolder, mediaType);
|
||||
var rootMediaFolder = _mediaLibraryService.GetRootMediaFolder();
|
||||
var rootMediaFolderPath = rootMediaFolder == null ? null : rootMediaFolder.MediaPath;
|
||||
var mediaParts = _mediaLibraryService.GetMediaContentItems(rootMediaFolderPath, skip, count, order, mediaType);
|
||||
var mediaPartsCount = _mediaLibraryService.GetMediaContentItemsCount(rootMediaFolderPath, mediaType);
|
||||
|
||||
|
||||
var mediaItems = mediaParts.Select(x => new MediaManagerMediaItemViewModel {
|
||||
@@ -256,4 +256,4 @@ namespace Orchard.MediaLibrary.Controllers {
|
||||
return new FolderHierarchy(root) {Children = _mediaLibraryService.GetMediaFolders(root.MediaPath).Select(GetFolderHierarchy)};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ namespace Orchard.MediaLibrary {
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Author",
|
||||
Permissions = new[] {ManageMediaContent}
|
||||
Permissions = new[] {ManageOwnMedia}
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Contributor",
|
||||
|
@@ -71,8 +71,11 @@ $(function () {
|
||||
|
||||
var listWidth = $('#media-library-main-list').width();
|
||||
var listHeight = $('#media-library-main-list').height();
|
||||
var itemWidth = $('.thumbnail').first().width();
|
||||
var itemHeight = $('.thumbnail').first().height();
|
||||
var itemWidth = $('#media-library-main-list li').first().width();
|
||||
var itemHeight = $('#media-library-main-list li').first().height();
|
||||
var defaultDimension = $(window).width() < 1420 ? 120 : 200;
|
||||
if (itemHeight == 0 || itemHeight == null) itemHeight = defaultDimension;
|
||||
if (itemWidth == 0 || itemWidth == null) itemWidth = defaultDimension;
|
||||
var draftText = $("#media-library").data("draft-text");
|
||||
|
||||
var itemsPerRow = Math.floor(listWidth / itemWidth);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.zone-content, #content, #main, #layout-content, #layout-main {
|
||||
.zone-content, #content, #main, #layout-content, #layout-main {
|
||||
height: 100%;
|
||||
display: block;
|
||||
min-height: 400px;
|
||||
@@ -155,6 +155,10 @@
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
#media-library-main-list.pending li {
|
||||
opacity:.3;
|
||||
}
|
||||
|
||||
/* Remove the space for the editor, and the scrollbar in the import page */
|
||||
#media-library-import #media-library-main-list {
|
||||
overflow-y: hidden;
|
||||
@@ -499,4 +503,4 @@ padding-right: 16px;
|
||||
.dir-rtl .media-library-main-list-overlay p {
|
||||
padding-right:inherit;
|
||||
padding-left:5px;
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ html.dyn #main ul.features button { display:none; }
|
||||
height:6em;
|
||||
margin:0 .5% 1% .5%;
|
||||
position:relative;
|
||||
width:32.2%;
|
||||
width:32%;
|
||||
}
|
||||
|
||||
.features.summary-view .missingDependencies{
|
||||
@@ -223,4 +223,4 @@ h2.recentlyInstalledModule {padding:0 0 0 40px;}
|
||||
|
||||
.dir-rtl .manage {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
@@ -14,5 +14,7 @@
|
||||
$allCheckboxes.prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=DataProvider]:checked').click();
|
||||
});
|
||||
})(jQuery);
|
@@ -4,18 +4,19 @@
|
||||
Layout.Title = T("Add New Tenant").ToString();
|
||||
|
||||
Script.Require("jQuery").AtFoot();
|
||||
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
||||
Script.Require("ShapesBase").AtFoot();
|
||||
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
||||
Script.Include("multi-tenancy.admin.js").AtFoot();
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Name)">@T("Name")</label>
|
||||
@Html.TextBoxFor(m => m.Name, new { @class = "text" })
|
||||
<span class="hint">@T("The name of the tenant as it will be displayed in the admin.")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.RequestUrlHost)">@T("Host")</label>
|
||||
@Html.TextBoxFor(m => m.RequestUrlHost, new { @class = "text medium" })
|
||||
@@ -30,7 +31,7 @@
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>@T("Database Setup")</legend>
|
||||
<div>
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||
</div>
|
||||
@@ -48,18 +49,18 @@
|
||||
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||
</span>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
||||
<label for="DatabaseTablePrefix">@T("Database table prefix")</label>
|
||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
|
||||
<div>
|
||||
<span class="hint">@T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<input type="checkbox" class="select-all" id="select-all-themes" />
|
||||
@@ -79,11 +80,11 @@
|
||||
}
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||
<div>
|
||||
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||
|
||||
@@ -94,21 +95,21 @@
|
||||
</li>
|
||||
|
||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||
<li>
|
||||
@{
|
||||
var theme = Model.Modules[i];
|
||||
@Html.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||
}
|
||||
</li>
|
||||
<li>
|
||||
@{
|
||||
var theme = Model.Modules[i];
|
||||
@Html.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<button class="primaryAction" type="submit">@T("Save")</button>
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
|
@@ -5,11 +5,12 @@
|
||||
Layout.Title = T("Edit Tenant").ToString();
|
||||
|
||||
Script.Require("jQuery").AtFoot();
|
||||
Script.Require("ShapesBase").AtFoot();
|
||||
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
||||
Script.Include("multi-tenancy.admin.js").AtFoot();
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<div>
|
||||
@@ -24,19 +25,19 @@
|
||||
<label for="@Html.FieldIdFor(m => m.RequestUrlPrefix)">@T("URL prefix")</label>
|
||||
@Html.TextBoxFor(m => m.RequestUrlPrefix, new { @class = "text medium" })
|
||||
<span class="hint">@T("(Optional) Example: If prefix is \"site1\", the tenant URL prefix is \"http://orchardproject.net/site1\"")</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>@T("Database Setup")</legend>
|
||||
@if (Model.State != TenantState.Uninitialized) {
|
||||
@if (Model.State != TenantState.Uninitialized) {
|
||||
<div class="message message-Warning">@T("Warning: If you don't know what you're doing you *will* (likely) send this tenant into a downward spiral of irrecoverable disrepair. Have a nice day.")</div>
|
||||
}
|
||||
else {
|
||||
<div>
|
||||
else {
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlCe", new { id = "builtinDatabaseOption" })
|
||||
<label for="builtinDatabaseOption" class="forcheckbox">@T("Use built-in data storage (SQL Server Compact)")</label>
|
||||
@@ -44,23 +45,25 @@
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlServer", new { id = "sqlDatabaseOption" })
|
||||
<label for="sqlDatabaseOption" class="forcheckbox">@T("Use an existing SQL Server (or SQL Express) database")</label>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||
@Html.TextBoxFor(svm => svm.DatabaseConnectionString, new { @class = "text large" })
|
||||
<span class="hint">@T("Example:")<br />@T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||
</span>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||
</span>
|
||||
<div class="options">
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||
@Html.TextBoxFor(svm => svm.DatabaseConnectionString)
|
||||
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||
</span>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseTablePrefix">@T("Database table prefix")</label>
|
||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
|
||||
<div>
|
||||
<span class="hint">@T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<input type="checkbox" class="select-all" id="select-all-themes" />
|
||||
@@ -80,10 +83,10 @@
|
||||
}
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||
<div>
|
||||
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||
@@ -95,20 +98,20 @@
|
||||
</li>
|
||||
|
||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||
<li>
|
||||
@{
|
||||
var theme = Model.Modules[i];
|
||||
@Html.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||
}
|
||||
</li>
|
||||
<li>
|
||||
@{
|
||||
var theme = Model.Modules[i];
|
||||
@Html.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<button class="primaryAction" type="submit">@T("Save")</button>
|
||||
</fieldset>
|
||||
|
@@ -68,11 +68,7 @@ namespace Orchard.Search {
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
|
||||
_indexManager.GetSearchIndexProvider().CreateIndex("Admin");
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.WithSetting("TypeIndexing.Indexes", "Page:latest"));
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
@{
|
||||
Script.Require("SelectableContentTab");
|
||||
|
||||
var pageTitle = T("Search Content");
|
||||
Layout.Title = pageTitle;
|
||||
}
|
||||
@@ -11,10 +13,18 @@
|
||||
<button type="submit">@T("Search")</button>
|
||||
</fieldset>
|
||||
|
||||
if (Model.ContentItems.Items.Count > 0)
|
||||
{
|
||||
<label for="selectAll">@T("Select All")</label>
|
||||
<input name="selectAll" type="checkbox" class="content-picker-SelectAll" />
|
||||
}
|
||||
<fieldset class="contentItems bulk-items">
|
||||
@Display(Model.ContentItems)
|
||||
@Display(Model.ContentItems)
|
||||
</fieldset>
|
||||
|
||||
if (Model.ContentItems.Items.Count > 0)
|
||||
{
|
||||
@Html.Link(T("Add Selected").Text, "#", new { @class = "button addSelected"})
|
||||
}
|
||||
@Display(Model.Pager)
|
||||
}
|
||||
|
||||
|
@@ -185,7 +185,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
|
Reference in New Issue
Block a user