Merge branch '1.9.x' into patch-1

Conflicts:
	src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml
This commit is contained in:
Matthew Harris
2015-10-20 00:09:16 +01:00
37 changed files with 268 additions and 130 deletions

View File

@@ -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">

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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>

View File

@@ -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();
}

View File

@@ -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));
}

View File

@@ -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' ">

View File

@@ -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" />

View File

@@ -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");
}
}
}

View File

@@ -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,

View File

@@ -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();
});
});

View File

@@ -20,3 +20,36 @@ body {
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;
}

View File

@@ -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>

View File

@@ -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)
}

View File

@@ -1,5 +1,4 @@
using Orchard.DynamicForms.Services.Models;
using Orchard.Localization;
using Orchard.Tokens;
namespace Orchard.DynamicForms.Services {

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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 {

View File

@@ -31,7 +31,7 @@ namespace Orchard.MediaLibrary {
},
new PermissionStereotype {
Name = "Author",
Permissions = new[] {ManageMediaContent}
Permissions = new[] {ManageOwnMedia}
},
new PermissionStereotype {
Name = "Contributor",

View File

@@ -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);

View File

@@ -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;

View File

@@ -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{

View File

@@ -14,5 +14,7 @@
$allCheckboxes.prop("checked", false);
}
});
$('input[name=DataProvider]:checked').click();
});
})(jQuery);

View File

@@ -4,6 +4,7 @@
Layout.Title = T("Add New 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();
}
@@ -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,7 +49,7 @@
<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>
@@ -82,7 +83,7 @@
</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>
@@ -94,15 +95,15 @@
</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>
@@ -111,4 +112,4 @@
<fieldset>
<button class="primaryAction" type="submit">@T("Save")</button>
</fieldset>
}
}

View File

@@ -5,6 +5,7 @@
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();
}
@@ -32,7 +33,7 @@
<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>
<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>
@@ -44,15 +45,17 @@
<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>
@@ -83,7 +86,7 @@
</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,15 +98,15 @@
</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>

View File

@@ -69,10 +69,6 @@ namespace Orchard.Search {
public int Create() {
_indexManager.GetSearchIndexProvider().CreateIndex("Admin");
ContentDefinitionManager.AlterTypeDefinition("Page", cfg => cfg.WithSetting("TypeIndexing.Indexes", "Page:latest"));
return 1;
}
}

View File

@@ -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)
}

View File

@@ -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"/>