mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -1 +0,0 @@
|
||||
57ebfff6441a6a246e81c1992996f06cd66c60ac Clay
|
||||
|
BIN
lib/claysharp/ClaySharp.dll
Normal file
BIN
lib/claysharp/ClaySharp.dll
Normal file
Binary file not shown.
@@ -75,6 +75,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
@@ -272,10 +276,6 @@
|
||||
<Compile Include="Utility\ReflectTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Clay\src\ClaySharp\ClaySharp.csproj">
|
||||
<Project>{76BCD43B-7BA5-4B63-B1E1-861641CA2686}</Project>
|
||||
<Name>ClaySharp</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
|
@@ -21,7 +21,7 @@ namespace Orchard.Core.Common.Drivers {
|
||||
|
||||
private const string TemplateName = "Parts/Common.Body";
|
||||
//todo: change back - or to something better
|
||||
private const string DefaultTextEditorTemplate = "PlainTextEditor"; //"TinyMceTextEditor";
|
||||
private const string DefaultTextEditorTemplate = "TinyMceTextEditor";
|
||||
private const string PlainTextEditorTemplate = "PlainTextEditor";
|
||||
|
||||
public BodyPartDriver(IOrchardServices services, IEnumerable<IHtmlFilter> htmlFilters) {
|
||||
|
@@ -39,6 +39,10 @@
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
@@ -343,10 +347,6 @@
|
||||
<None Include="XmlRpc\Views\Home\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Clay\src\ClaySharp\ClaySharp.csproj">
|
||||
<Project>{76BCD43B-7BA5-4B63-B1E1-861641CA2686}</Project>
|
||||
<Name>ClaySharp</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
|
@@ -77,11 +77,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Smtp.SiteSettings.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="Views\EditorTemplates\Parts\Smtp.SiteSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
|
@@ -1,43 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SmtpSettingsPart>" %>
|
||||
<%@ Import Namespace="Orchard.Email.Models"%>
|
||||
<%@ Import Namespace="System.Net.Mail" %>
|
||||
<fieldset>
|
||||
<legend><%: T("SMTP")%></legend>
|
||||
<div>
|
||||
<label for="<%: Html.FieldIdFor(m => m.Address)%>"><%: T("Sender email address")%></label>
|
||||
<%: Html.EditorFor(m => m.Address)%>
|
||||
<%: Html.ValidationMessage("Address", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<label for="<%: Html.FieldIdFor(m => m.Host)%>"><%: T("Host name")%></label>
|
||||
<%: Html.EditorFor(m => m.Host)%>
|
||||
<%: Html.ValidationMessage("Host", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<label for="<%: Html.FieldIdFor(m => m.Port)%>"><%: T("Port number")%></label>
|
||||
<%: Html.EditorFor(m => m.Port)%>
|
||||
<%: Html.ValidationMessage("Port", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<%: Html.EditorFor(m => m.EnableSsl)%>
|
||||
<label for="<%: Html.FieldIdFor(m => m.EnableSsl)%>" class="forcheckbox"><%: T("Enable SSL communications")%></label>
|
||||
<%: Html.ValidationMessage("EnableSsl", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<%: Html.EditorFor(m => m.RequireCredentials)%>
|
||||
<label for="<%: Html.FieldIdFor(m => m.RequireCredentials)%>" class="forcheckbox"><%: T("Require credentials")%></label>
|
||||
<%: Html.ValidationMessage("RequireCredentials", "*")%>
|
||||
</div>
|
||||
<div data-controllerid="<%: Html.FieldIdFor(m => m.RequireCredentials)%>">
|
||||
<div>
|
||||
<label for="<%: Html.FieldIdFor(m => m.UserName)%>"><%: T("User name")%></label>
|
||||
<%: Html.EditorFor(m => m.UserName)%>
|
||||
<%: Html.ValidationMessage("UserName", "*")%>
|
||||
</div>
|
||||
<div>
|
||||
<label for="<%: Html.FieldIdFor(m => m.Password)%>"><%: T("Password")%></label>
|
||||
<%: Html.PasswordFor(m => m.Password)%>
|
||||
<%: Html.ValidationMessage("Password", "*")%>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
@@ -0,0 +1,43 @@
|
||||
@model Orchard.Email.Models.SmtpSettingsPart
|
||||
@using System.Net.Mail
|
||||
|
||||
<fieldset>
|
||||
<legend>@T("SMTP")</legend>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Address)">@T("Sender email address")</label>
|
||||
@Html.EditorFor(m => m.Address)
|
||||
@Html.ValidationMessage("Address", "*")
|
||||
</div>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Host)">@T("Host name")</label>
|
||||
@Html.EditorFor(m => m.Host)
|
||||
@Html.ValidationMessage("Host", "*")
|
||||
</div>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Port)">@T("Port number")</label>
|
||||
@Html.EditorFor(m => m.Port)
|
||||
@Html.ValidationMessage("Port", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.EnableSsl)
|
||||
<label for="@Html.FieldIdFor(m => m.EnableSsl)" class="forcheckbox">@T("Enable SSL communications")</label>
|
||||
@Html.ValidationMessage("EnableSsl", "*")
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.RequireCredentials)
|
||||
<label for="@Html.FieldIdFor(m => m.RequireCredentials)" class="forcheckbox">@T("Require credentials")</label>
|
||||
@Html.ValidationMessage("RequireCredentials", "*")
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.RequireCredentials)">
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.UserName)">@T("User name")</label>
|
||||
@Html.EditorFor(m => m.UserName)
|
||||
@Html.ValidationMessage("UserName", "*")
|
||||
</div>
|
||||
<div>
|
||||
<label for="@Html.FieldIdFor(m => m.Password)">@T("Password")</label>
|
||||
@Html.PasswordFor(m => m.Password)
|
||||
@Html.ValidationMessage("Password", "*")
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
@@ -95,13 +95,6 @@
|
||||
<Content Include="Content\Admin\images\folder.gif" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Views\Admin\Add.aspx" />
|
||||
<Content Include="Views\Admin\Create.aspx" />
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\EditMedia.aspx" />
|
||||
<Content Include="Views\Admin\EditProperties.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Media.SiteSettings.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Views\Web.config" />
|
||||
@@ -116,6 +109,15 @@
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Views\Admin\Add.cshtml" />
|
||||
<None Include="Views\Admin\Create.cshtml" />
|
||||
<None Include="Views\Admin\Edit.cshtml" />
|
||||
<None Include="Views\Admin\EditMedia.cshtml" />
|
||||
<None Include="Views\Admin\EditProperties.cshtml" />
|
||||
<None Include="Views\Admin\Index.cshtml" />
|
||||
<None Include="Views\EditorTemplates\Parts\Media.SiteSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaFolderCreateViewModel : BaseViewModel {
|
||||
public class MediaFolderCreateViewModel {
|
||||
[Required, DisplayName("Folder Name:")]
|
||||
public string Name { get; set; }
|
||||
public string MediaPath { get; set; }
|
||||
|
@@ -1,7 +1,5 @@
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaFolderEditPropertiesViewModel : BaseViewModel {
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaFolderEditPropertiesViewModel {
|
||||
public string Name { get; set; }
|
||||
public string MediaPath { get; set; }
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Media.Models;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaFolderEditViewModel : BaseViewModel {
|
||||
public class MediaFolderEditViewModel {
|
||||
public string FolderName { get; set; }
|
||||
public string MediaPath { get; set; }
|
||||
public IEnumerable<MediaFolder> MediaFolders { get; set; }
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Media.Models;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaFolderIndexViewModel : BaseViewModel {
|
||||
public class MediaFolderIndexViewModel {
|
||||
public IEnumerable<MediaFolder> MediaFolders { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaItemAddViewModel : BaseViewModel {
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaItemAddViewModel {
|
||||
public string FolderName { get; set; }
|
||||
public string MediaPath { get; set; }
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Media.ViewModels {
|
||||
public class MediaItemEditViewModel : BaseViewModel {
|
||||
public class MediaItemEditViewModel {
|
||||
public string Name { get; set; }
|
||||
public string Caption { get; set; }
|
||||
public long Size { get; set; }
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaItemAddViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Helpers"%>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%>
|
||||
<%Html.RegisterStyle("admin.css"); %>
|
||||
|
||||
<h1><%: Html.TitleForPage(T("Add Media").ToString()) %></h1>
|
||||
<div class="breadCrumbs">
|
||||
<p><%: Html.ActionLink(T("Media Folders").ToString(), "Index") %> >
|
||||
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) { %>
|
||||
<%: Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> >
|
||||
|
||||
<% } %>
|
||||
<%: T("Add Media") %></p>
|
||||
</div>
|
||||
|
||||
<% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<label for="pageTitle"><%: T("File Path <span> - multiple files must be in a zipped folder</span>")%></label>
|
||||
<input id="MediaItemPath" name="MediaItemPath" type="file" value="<%: T("Browse") %>" size="64"/>
|
||||
<span class="hint"><%: T("After your files have been uploaded, you can edit the titles and descriptions.")%></span>
|
||||
<input type="hidden" id="FolderName" name="FolderName" value="<%: Model.FolderName %>" />
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="<%: Model.MediaPath %>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="<%: T("Upload") %>" />
|
||||
<%: Html.AntiForgeryTokenOrchard() %>
|
||||
</fieldset>
|
||||
<% } %>
|
30
src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml
Normal file
30
src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.cshtml
Normal file
@@ -0,0 +1,30 @@
|
||||
@model Orchard.Media.ViewModels.MediaItemAddViewModel
|
||||
|
||||
@using Orchard.Media.Helpers
|
||||
@using Orchard.Media.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Add Media").ToString())</h1>
|
||||
<div class="breadCrumbs">
|
||||
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") >
|
||||
@foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {
|
||||
@Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath}) >
|
||||
|
||||
}
|
||||
@T("Add Media")</p>
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<label for="pageTitle">@T("File Path <span> - multiple files must be in a zipped folder</span>")</label>
|
||||
<input id="MediaItemPath" name="MediaItemPath" type="file" value="@T("Browse")" size="64"/>
|
||||
<span class="hint">@T("After your files have been uploaded, you can edit the titles and descriptions.")</span>
|
||||
<input type="hidden" id="FolderName" name="FolderName" value="@Model.FolderName" />
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="@Model.MediaPath" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="@T("Upload")" />
|
||||
@Html.AntiForgeryTokenOrchard()
|
||||
</fieldset>
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaFolderCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Helpers"%>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%><%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%: Html.TitleForPage(T("Add a Folder").ToString()) %></h1>
|
||||
<div class="breadCrumbs">
|
||||
<p><%: Html.ActionLink(T("Media Folders").ToString(), "Index") %> >
|
||||
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) { %>
|
||||
<%: Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath}) %> >
|
||||
<% } %>
|
||||
<%: T("Add a Folder") %></p>
|
||||
</div>
|
||||
|
||||
<%using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<label for="Name"><%: T("Folder Name") %></label>
|
||||
<input id="Name" class="textMedium" name="Name" type="text" />
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="<%: Model.MediaPath %>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="<%: T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,26 @@
|
||||
@model Orchard.Media.ViewModels.MediaFolderCreateViewModel
|
||||
|
||||
@using Orchard.Media.Helpers
|
||||
@using Orchard.Media.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Add a Folder").ToString())</h1>
|
||||
<div class="breadCrumbs">
|
||||
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") >
|
||||
@foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {
|
||||
@Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})
|
||||
}
|
||||
@T("Add a Folder") </p>
|
||||
</div>
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<label for="Name">@T("Folder Name")</label>
|
||||
<input id="Name" class="textMedium" name="Name" type="text" />
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="@Model.MediaPath" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="@T("Save")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,97 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaFolderEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<%@ Import Namespace="Orchard.Media.Helpers"%>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%><%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%: Html.TitleForPage(T("Manage Folder").ToString())%></h1>
|
||||
|
||||
|
||||
<%--<div class="manage"><%: Html.ActionLink(T("Folder Properties").ToString(), "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button"})%></div>--%>
|
||||
|
||||
<div class="breadCrumbs">
|
||||
<p><%: Html.ActionLink(T("Media Folders").ToString(), "Index")%> >
|
||||
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
|
||||
<%: Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> >
|
||||
|
||||
<% } %>
|
||||
<%: T("Manage Folder")%></p>
|
||||
</div>
|
||||
<div class="folderProperties">
|
||||
<p><%: Html.ActionLink(T("Folder Properties").ToString(), "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath })%></p>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
|
||||
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions"><%: T("Actions:")%></label>
|
||||
<select id="Select1" name="publishActions">
|
||||
<option value="1"><%: T("Remove")%></option>
|
||||
</select>
|
||||
<input class="button" type="submit" value="<%: T("Apply") %>" />
|
||||
</fieldset>
|
||||
<div class="manage">
|
||||
<%: Html.ActionLink(T("Add media").ToString(), "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button primaryAction" })%>
|
||||
<%: Html.ActionLink(T("Add a folder").ToString(), "Create", new { Model.MediaPath }, new { @class = "button" })%>
|
||||
</div>
|
||||
<fieldset>
|
||||
<table class="items" summary="<%: T("This is a table of the pages currently available for use in your application.") %>">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
<col id="Col5" />
|
||||
<col id="Col6" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col"><%: T("Name") %></th>
|
||||
<th scope="col"><%: T("Author") %></th>
|
||||
<th scope="col"><%: T("Last Updated") %></th>
|
||||
<th scope="col"><%: T("Type") %></th>
|
||||
<th scope="col"><%: T("Size") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%foreach (var mediaFile in Model.MediaFiles) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" value="true" name="<%: T("Checkbox.File.{0}", mediaFile.Name) %>"/>
|
||||
<input type="hidden" value="<%: T(Model.MediaPath) %>" name="<%: T(mediaFile.Name) %>" />
|
||||
</td>
|
||||
<td>
|
||||
<%: Html.ActionLink(mediaFile.Name, "EditMedia", new { name = mediaFile.Name,
|
||||
lastUpdated = mediaFile.LastUpdated,
|
||||
size = mediaFile.Size,
|
||||
folderName = mediaFile.FolderName,
|
||||
mediaPath = Model.MediaPath })%>
|
||||
</td>
|
||||
<td><%: T("Orchard User")%></td>
|
||||
<td><%=mediaFile.LastUpdated %></td>
|
||||
<td><%: mediaFile.Type %></td>
|
||||
<td><%=mediaFile.Size %></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
<%foreach (var mediaFolder in Model.MediaFolders) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" value="true" name="<%: T("Checkbox.Folder.{0}", mediaFolder.Name) %>"/>
|
||||
<input type="hidden" value="<%: mediaFolder.MediaPath %>" name="<%: mediaFolder.Name %>" />
|
||||
</td>
|
||||
<td>
|
||||
<img src="<%=ResolveUrl("~/Modules/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16" width="16" class="mediaTypeIcon" alt="<%: T("Folder") %>" />
|
||||
<%: Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath})%>
|
||||
</td>
|
||||
<td><%: T("Orchard User")%></td>
|
||||
<td><%=mediaFolder.LastUpdated %></td>
|
||||
<td><%: T("Folder")%></td>
|
||||
<td><%=mediaFolder.Size %></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,92 @@
|
||||
@model Orchard.Media.ViewModels.MediaFolderEditViewModel
|
||||
|
||||
@using Orchard.Media.Helpers
|
||||
@using Orchard.Media.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Folder").ToString())</h1>
|
||||
|
||||
<div class="breadCrumbs">
|
||||
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") >
|
||||
@foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {
|
||||
@Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})
|
||||
|
||||
}
|
||||
@T("Manage Folder")</p>
|
||||
</div>
|
||||
<div class="folderProperties">
|
||||
<p>@Html.ActionLink(T("Folder Properties").ToString(), "EditProperties", new { folderName = Model.FolderName, mediaPath = Model.MediaPath })</p>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="Select1" name="publishActions">
|
||||
<option value="1">@T("Remove")</option>
|
||||
</select>
|
||||
<input class="button" type="submit" value="@T("Apply")" />
|
||||
</fieldset>
|
||||
<div class="manage">
|
||||
@Html.ActionLink(T("Add media").ToString(), "Add", new { folderName = Model.FolderName, mediaPath = Model.MediaPath }, new { @class = "button primaryAction" })
|
||||
@Html.ActionLink(T("Add a folder").ToString(), "Create", new { Model.MediaPath }, new { @class = "button" })
|
||||
</div>
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the pages currently available for use in your application.")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
<col id="Col5" />
|
||||
<col id="Col6" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Author")</th>
|
||||
<th scope="col">@T("Last Updated")</th>
|
||||
<th scope="col">@T("Type")</th>
|
||||
<th scope="col">@T("Size")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var mediaFile in Model.MediaFiles) {
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" value="true" name="@T("Checkbox.File.{0}", mediaFile.Name)"/>
|
||||
<input type="hidden" value="@T(Model.MediaPath)" name="@T(mediaFile.Name)" />
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink(mediaFile.Name, "EditMedia", new { name = mediaFile.Name,
|
||||
lastUpdated = mediaFile.LastUpdated,
|
||||
size = mediaFile.Size,
|
||||
folderName = mediaFile.FolderName,
|
||||
mediaPath = Model.MediaPath })
|
||||
</td>
|
||||
<td>@T("Orchard User")</td>
|
||||
<td>@mediaFile.LastUpdated</td>
|
||||
<td>@mediaFile.Type</td>
|
||||
<td>@mediaFile.Size</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var mediaFolder in Model.MediaFolders) {
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" value="true" name="@T("Checkbox.Folder.{0}", mediaFolder.Name)"/>
|
||||
<input type="hidden" value="@mediaFolder.MediaPath" name="@mediaFolder.Name" />
|
||||
</td>
|
||||
<td>
|
||||
<img src="<%=ResolveUrl("~/Modules/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16" width="16" class="mediaTypeIcon" alt="@T("Folder")" />
|
||||
@Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath})
|
||||
</td>
|
||||
<td>@T("Orchard User")</td>
|
||||
<td>@mediaFolder.LastUpdated</td>
|
||||
<td>@T("Folder")</td>
|
||||
<td>@mediaFolder.Size</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaItemEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<%@ Import Namespace="Orchard.Media.Helpers"%>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%><%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%: Html.TitleForPage(T("Edit Media - {0}", Model.Name).ToString())%></h1>
|
||||
|
||||
<div class="breadCrumbs">
|
||||
<p><%: Html.ActionLink(T("Media Folders").ToString(), "Index")%> >
|
||||
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
|
||||
<%: Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> >
|
||||
<% } %>
|
||||
<%: T("Edit Media")%></p>
|
||||
</div>
|
||||
|
||||
<div class="sections clearBoth">
|
||||
<%using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<div class="primary">
|
||||
<div>
|
||||
<img src="<%=Model.PublicUrl%>" class="previewImage" alt="<%: Model.Caption %>" />
|
||||
</div>
|
||||
<fieldset>
|
||||
<%-- todo: make these real (including markup) --%>
|
||||
<div>
|
||||
<label><%: T("Dimensions: <span>500 x 375 pixels</span>")%></label>
|
||||
|
||||
<label><%: T("Size: <span>{0}</span>", Model.Size)%></label>
|
||||
|
||||
<label><%: T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="embedPath"><%: T("Embed:")%></label>
|
||||
<input id="embedPath" class="textMedium" name="embedPath" type="text" readonly="readonly" value="<%: string.Format("<img src=\"{0}\" width=\"{1}\" height=\"{2}\" alt=\"{3}\" />", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption)%>" />
|
||||
<span class="hint"><%: T("Copy this html to add this image to your site.") %></span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="Name"><%: T("Name")%></label>
|
||||
<input id="Name" name="Name" type="hidden" value="<%: Model.Name %>"/>
|
||||
<input id="NewName" class="textMedium" name="NewName" type="text" value="<%: Model.Name %>"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="Caption"><%: T("Caption")%></label>
|
||||
<input id="Caption" class="textMedium" name="Caption" type="text" value="<%= Model.Caption %>"/>
|
||||
<span class="hint"><%: T("This will be used for the image alt tag.")%></span>
|
||||
<input type="hidden" id="LastUpdated" name="LastUpdated" value="<%= Model.LastUpdated %>"/>
|
||||
<input type="hidden" id="Size" name="Size" value="<%= Model.Size %>"/>
|
||||
<input type="hidden" id="FolderName" name="FolderName" value="<%= Model.FolderName %>"/>
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="<%= Model.MediaPath %>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" name="submit.Save" value="<%: T("Save") %>" />
|
||||
<%--<input type="submit" class="button" name="submit.Delete" value="<%: T("Remove") %>" />--%>
|
||||
</fieldset>
|
||||
</div>
|
||||
<%--<div class="secondary" style="border:1px solid #ff0000;">
|
||||
<h2><%: T("Preview")%></h2>
|
||||
<div><img src="<%=ResolveUrl("~/Media/" + Html.Encode(Model.RelativePath + "/" + Model.Name))%>" class="previewImage" alt="<%: Model.Caption %>" /></div>
|
||||
<ul>
|
||||
<%-- todo: make these real (including markup)
|
||||
<li><label><%: T("Dimensions: <span>500 x 375 pixels</span>")%></label></li>
|
||||
<li><label><%: T("Size: <span>{0}</span>", Model.Size)%></label></li>
|
||||
<li><label><%: T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)%></label></li>
|
||||
<li>
|
||||
<label for="embedPath"><%: T("Embed:")%></label>
|
||||
<input id="embedPath" class="text" name="embedPath" type="text" readonly="readonly" value="<%: T("<img src=\"{0}\" width=\"{1}\" height=\"{2}\" alt=\"{3}\" />", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption) %>" />
|
||||
<span class="hint"><%: T("Copy this html to add this image to your site.") %></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>--%>
|
||||
<% } %>
|
||||
</div>
|
@@ -0,0 +1,74 @@
|
||||
@model Orchard.Media.ViewModels.MediaItemEditViewModel
|
||||
|
||||
@using Orchard.Media.Helpers
|
||||
@using Orchard.Media.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Edit Media - {0}", Model.Name).ToString())</h1>
|
||||
|
||||
<div class="breadCrumbs">
|
||||
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") >
|
||||
@foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {
|
||||
@Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})
|
||||
}
|
||||
@T("Edit Media")</p>
|
||||
</div>
|
||||
|
||||
<div class="sections clearBoth">
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<div class="primary">
|
||||
<div>
|
||||
<img src="@Model.PublicUrl" class="previewImage" alt="@Model.Caption" />
|
||||
</div>
|
||||
<fieldset>
|
||||
<%-- todo: make these real (including markup) --%>
|
||||
<div>
|
||||
<label>@T("Dimensions: <span>500 x 375 pixels</span>")</label>
|
||||
|
||||
<label>@T("Size: <span>{0}</span>", Model.Size)</label>
|
||||
|
||||
<label>@T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="embedPath">@T("Embed:")</label>
|
||||
<input id="embedPath" class="textMedium" name="embedPath" type="text" readonly="readonly" value="<%: string.Format("<img src=\"{0}\" width=\"{1}\" height=\"{2}\" alt=\"{3}\" />", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption)%>" />
|
||||
<span class="hint">@T("Copy this html to add this image to your site.")</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="Name">@T("Name")</label>
|
||||
<input id="Name" name="Name" type="hidden" value="@Model.Name"/>
|
||||
<input id="NewName" class="textMedium" name="NewName" type="text" value="@Model.Name"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="Caption">@T("Caption")</label>
|
||||
<input id="Caption" class="textMedium" name="Caption" type="text" value="@Model.Caption"/>
|
||||
<span class="hint">@T("This will be used for the image alt tag.")</span>
|
||||
<input type="hidden" id="LastUpdated" name="LastUpdated" value="@Model.LastUpdated"/>
|
||||
<input type="hidden" id="Size" name="Size" value="@Model.Size"/>
|
||||
<input type="hidden" id="FolderName" name="FolderName" value="@Model.FolderName"/>
|
||||
<input type="hidden" id="MediaPath" name="MediaPath" value="@Model.MediaPath" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" name="submit.Save" value="@T("Save")" />
|
||||
</fieldset>
|
||||
</div>
|
||||
<%--<div class="secondary" style="border:1px solid #ff0000;">
|
||||
<h2>@T("Preview")</h2>
|
||||
<div><img src="<%=ResolveUrl("~/Media/" + Html.Encode(Model.RelativePath + "/" + Model.Name))%>" class="previewImage" alt="@Model.Caption" /></div>
|
||||
<ul>
|
||||
<%-- todo: make these real (including markup)
|
||||
<li><label>@T("Dimensions: <span>500 x 375 pixels</span>")</label></li>
|
||||
<li><label>@T("Size: <span>{0}</span>", Model.Size)</label></li>
|
||||
<li><label>@T("Added on: <span>{0} by Orchard User</span>", Model.LastUpdated)</label></li>
|
||||
<li>
|
||||
<label for="embedPath">@T("Embed:")</label>
|
||||
<input id="embedPath" class="text" name="embedPath" type="text" readonly="readonly" value="@T("<img src=\"{0}\" width=\"{1}\" height=\"{2}\" alt=\"{3}\" />", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption)" />
|
||||
<span class="hint">@T("Copy this html to add this image to your site.")</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>--%>
|
||||
}
|
||||
</div>
|
@@ -1,28 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaFolderEditPropertiesViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Helpers"%>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%><%
|
||||
Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%: Html.TitleForPage(T("Folder Properties").ToString())%></h1>
|
||||
<div class="breadCrumbs">
|
||||
<p><%: Html.ActionLink(T("Media Folders").ToString(), "Index")%> >
|
||||
<%foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {%>
|
||||
<%: Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})%> >
|
||||
|
||||
<% } %>
|
||||
<%: T("Folder Properties")%></p>
|
||||
</div>
|
||||
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<label for="Name"><%: T("Folder Name:") %></label>
|
||||
<input id="MediaPath" name="MediaPath" type="hidden" value="<%: Model.MediaPath %>" />
|
||||
<input id="Name" class="textMedium" name="Name" type="text" value="<%: Model.Name %>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" name="submit.Save" value="<%: T("Save") %>" />
|
||||
<%--<input type="submit" class="button buttonFocus roundCorners" name="submit.Delete" value="<%: T("Remove") %>" />--%>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,28 @@
|
||||
@model Orchard.Media.ViewModels.MediaFolderEditPropertiesViewModel
|
||||
|
||||
@using Orchard.Media.Helpers
|
||||
@using Orchard.Media.Models
|
||||
|
||||
<h1>@Html.TitleForPage(T("Folder Properties").ToString())</h1>
|
||||
<div class="breadCrumbs">
|
||||
<p>@Html.ActionLink(T("Media Folders").ToString(), "Index") >
|
||||
@foreach (FolderNavigation navigation in MediaHelpers.GetFolderNavigationHierarchy(Model.MediaPath)) {
|
||||
@Html.ActionLink(navigation.FolderName, "Edit",
|
||||
new {name = navigation.FolderName, mediaPath = navigation.FolderPath})
|
||||
|
||||
}
|
||||
@T("Folder Properties")</p>
|
||||
</div>
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<label for="Name">@T("Folder Name:")</label>
|
||||
<input id="MediaPath" name="MediaPath" type="hidden" value="@Model.MediaPath" />
|
||||
<input id="Name" class="textMedium" name="Name" type="text" value="@Model.Name" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" name="submit.Save" value="@T("Save")" />
|
||||
<%--<input type="submit" class="button buttonFocus roundCorners" name="submit.Delete" value="@T("Remove")" />--%>
|
||||
</fieldset>
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<MediaFolderIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Media.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Manage Media Folders").ToString()) %></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions"><%: T("Actions:") %></label>
|
||||
<select id="Select1" name="publishActions">
|
||||
<option value="1"><%: T("Remove")%></option>
|
||||
</select>
|
||||
<input class="button roundCorners" type="submit" value="<%: T("Apply") %>" />
|
||||
</fieldset>
|
||||
<div class="manage"><%: Html.ActionLink(T("Add a folder").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
|
||||
<fieldset>
|
||||
<table class="items" summary="<%: T("This is a table of the media folders currently available for use in your application.") %>">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
<col id="Col5" />
|
||||
<col id="Col6" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col"><%: T("Name")%></th>
|
||||
<th scope="col"><%: T("Author") %></th>
|
||||
<th scope="col"><%: T("Last Updated") %></th>
|
||||
<th scope="col"><%: T("Type") %></th>
|
||||
<th scope="col"><%: T("Size") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%foreach (var mediaFolder in Model.MediaFolders) {
|
||||
%>
|
||||
<tr>
|
||||
<td><input type="checkbox" value="true" name="<%: T("Checkbox.{0}", mediaFolder.Name) %>"/></td>
|
||||
<%-- todo: (heskew) this URL needs to be determined from current module location --%>
|
||||
<td>
|
||||
<img src="<%=ResolveUrl("~/Modules/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16" width="16" class="mediaTypeIcon" alt="<%: T("Folder") %>" />
|
||||
<%: Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath })%>
|
||||
</td>
|
||||
<td><%: T("Orchard User")%></td>
|
||||
<td><%=mediaFolder.LastUpdated %></td>
|
||||
<td><%: T("Folder")%></td>
|
||||
<td><%=mediaFolder.Size %></td>
|
||||
</tr>
|
||||
<%}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,48 @@
|
||||
@model Orchard.Media.ViewModels.MediaFolderIndexViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Media Folders").ToString())</h1>
|
||||
@Html.ValidationSummary()
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="Select1" name="publishActions">
|
||||
<option value="1">@T("Remove")</option>
|
||||
</select>
|
||||
<input class="button roundCorners" type="submit" value="@T("Apply")" />
|
||||
</fieldset>
|
||||
<div class="manage">@Html.ActionLink(T("Add a folder").ToString(), "Create", new { }, new { @class = "button primaryAction" })</div>
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the media folders currently available for use in your application.")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
<col id="Col5" />
|
||||
<col id="Col6" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Author")</th>
|
||||
<th scope="col">@T("Last Updated")</th>
|
||||
<th scope="col">@T("Type")</th>
|
||||
<th scope="col">@T("Size")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var mediaFolder in Model.MediaFolders) {
|
||||
<tr>
|
||||
<td><input type="checkbox" value="true" name="@T("Checkbox.{0}", mediaFolder.Name)"/></td>
|
||||
<%-- todo: (heskew) this URL needs to be determined from current module location --%>
|
||||
<td>
|
||||
<img src="<%=ResolveUrl("~/Modules/Orchard.Media/Content/Admin/images/folder.gif")%>" height="16" width="16" class="mediaTypeIcon" alt="@T("Folder")" />
|
||||
@Html.ActionLink(mediaFolder.Name, "Edit", new { name = mediaFolder.Name, mediaPath = mediaFolder.MediaPath })
|
||||
</td>
|
||||
<td>@T("Orchard User")</td>
|
||||
<td>@mediaFolder.LastUpdated</td>
|
||||
<td>@T("Folder")</td>
|
||||
<td>@mediaFolder.Size</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
@@ -1,10 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<MediaSettingsPartRecord>" %>
|
||||
<%@ Import Namespace="Orchard.Media.Models"%>
|
||||
<fieldset>
|
||||
<legend><%: T("Media")%></legend>
|
||||
<div>
|
||||
<label for="MediaSettings_RootMediaFolder">Media folder</label>
|
||||
<%: Html.EditorFor(x=>x.RootMediaFolder) %>
|
||||
<%: Html.ValidationMessage("RootMediaFolder", "*")%>
|
||||
</div>
|
||||
</fieldset>
|
@@ -0,0 +1,10 @@
|
||||
@model Orchard.Media.Models.MediaSettingsPartRecord
|
||||
|
||||
<fieldset>
|
||||
<legend>@T("Media")</legend>
|
||||
<div>
|
||||
<label for="MediaSettings_RootMediaFolder">Media folder</label>
|
||||
@Html.EditorFor(x=>x.RootMediaFolder)
|
||||
@Html.ValidationMessage("RootMediaFolder", "*")
|
||||
</div>
|
||||
</fieldset>
|
11
src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt
Normal file
11
src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
name: MultiTenancy
|
||||
antiforgery: enabled
|
||||
author: The Orchard Team
|
||||
website: http://orchardproject.net
|
||||
version: 0.5.0
|
||||
orchardversion: 0.5.0
|
||||
description: The multi-tenancy module enables multiple Orchard sites to run in isolation inside of a single web application, improving site density on a single server or hosted account.
|
||||
features:
|
||||
Orchard.MultiTenancy:
|
||||
Description: Configure multiple site tenants.
|
||||
Category: Hosting
|
@@ -83,13 +83,13 @@
|
||||
<Content Include="Content\Admin\images\enabled.gif" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Views\Admin\Add.ascx" />
|
||||
<Content Include="Views\Admin\Edit.ascx" />
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForUninitialized.ascx" />
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForDisabled.ascx" />
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForInvalid.ascx" />
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForRunning.ascx" />
|
||||
<Content Include="Views\Admin\Index.ascx" />
|
||||
<None Include="Views\Admin\Add.cshtml" />
|
||||
<None Include="Views\Admin\Edit.cshtml" />
|
||||
<None Include="Views\Admin\DisplayTemplates\ActionsForUninitialized.cshtml" />
|
||||
<None Include="Views\Admin\DisplayTemplates\ActionsForDisabled.cshtml" />
|
||||
<None Include="Views\Admin\DisplayTemplates\ActionsForInvalid.cshtml" />
|
||||
<None Include="Views\Admin\DisplayTemplates\ActionsForRunning.cshtml" />
|
||||
<None Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.MultiTenancy.Annotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.MultiTenancy.ViewModels {
|
||||
public class TenantAddViewModel : BaseViewModel {
|
||||
public class TenantAddViewModel {
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public string RequestUrlHost { get; set; }
|
||||
|
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.MultiTenancy.Annotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.MultiTenancy.ViewModels {
|
||||
public class TenantEditViewModel : BaseViewModel {
|
||||
public class TenantEditViewModel {
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public string RequestUrlHost { get; set; }
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.MultiTenancy.ViewModels {
|
||||
public class TenantsIndexViewModel : BaseViewModel {
|
||||
public class TenantsIndexViewModel {
|
||||
public IEnumerable<ShellSettings> TenantSettings { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,47 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TenantAddViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.MultiTenancy.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Add New Tenant").ToString()) %></h1>
|
||||
<%using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<div>
|
||||
<label for="Name"><%: T("Name") %></label>
|
||||
<input id="Name" class="textMedium" name="Name" type="text" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="RequestUrlHost"><%: T("Host") %></label>
|
||||
<input id="RequestUrlHost" class="textMedium" name="RequestUrlHost" type="text" />
|
||||
<span class="hint"><%: T("Example: If host is 'orchardproject.net', the tenant site URL is 'http://orchardproject.net/'") %></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><%: T("Database Setup") %></legend>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<div class="options">
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString"><%: T("Connection string") %></label>
|
||||
<%: Html.EditorFor(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>
|
||||
<input type="submit" class="button primaryAction" value="<%: T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,46 @@
|
||||
@model Orchard.MultiTenancy.ViewModels.TenantAddViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Add New Tenant").ToString())</h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<div>
|
||||
<label for="Name">@T("Name")</label>
|
||||
<input id="Name" class="textMedium" name="Name" type="text" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="RequestUrlHost">@T("Host")</label>
|
||||
<input id="RequestUrlHost" class="textMedium" name="RequestUrlHost" type="text" />
|
||||
<span class="hint">@T("Example: If host is 'orchardproject.net', the tenant site URL is 'http://orchardproject.net/'")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>@T("Database Setup")</legend>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<div class="options">
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||
@Html.EditorFor(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>
|
||||
<input type="submit" class="button primaryAction" value="@T("Save")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ShellSettings>" %>
|
||||
<%@ Import Namespace="Orchard.Environment.Configuration" %>
|
||||
<% using(Html.BeginFormAntiForgeryPost(Url.Action("enable", new {area = "Orchard.MultiTenancy"}), FormMethod.Post, new {@class = "inline link"})) { %>
|
||||
<%: Html.HiddenFor(ss => ss.Name) %>
|
||||
<button type="submit"><%: T("Resume")%></button><%
|
||||
} %>
|
@@ -0,0 +1,7 @@
|
||||
@model Orchard.Environment.Configuration.ShellSettings
|
||||
@using Orchard.MultiTenancy.Extensions
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost(Url.Action("enable", new {area = "Orchard.MultiTenancy"}), FormMethod.Post, new {@class = "inline link"})) {
|
||||
@Html.HiddenFor(ss => ss.Name)
|
||||
<button type="submit">@T("Resume")</button>
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ShellSettings>" %>
|
||||
<%@ Import Namespace="Orchard.Environment.Configuration" %>
|
||||
<%: Html.ActionLink(T("Make Valid*").ToString(), "_setup", new {tenantName = Model.Name, area = "Orchard.MultiTenancy"}) %>
|
@@ -0,0 +1,4 @@
|
||||
@model Orchard.Environment.Configuration.ShellSettings
|
||||
@using Orchard.MultiTenancy.Extensions
|
||||
|
||||
@Html.ActionLink(T("Make Valid*").ToString(), "_setup", new {tenantName = Model.Name, area = "Orchard.MultiTenancy"})
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ShellSettings>" %>
|
||||
<%@ Import Namespace="Orchard.Environment.Configuration" %>
|
||||
<% using(Html.BeginFormAntiForgeryPost(Url.Action("disable", new {area = "Orchard.MultiTenancy"}), FormMethod.Post, new {@class = "inline link"})) { %>
|
||||
<%: Html.HiddenFor(ss => ss.Name) %>
|
||||
<button type="submit"><%: T("Suspend") %></button><%
|
||||
} %>
|
@@ -0,0 +1,7 @@
|
||||
@model Orchard.Environment.Configuration.ShellSettings
|
||||
@using Orchard.MultiTenancy.Extensions
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost(Url.Action("disable", new {area = "Orchard.MultiTenancy"}), FormMethod.Post, new {@class = "inline link"})) {
|
||||
@Html.HiddenFor(ss => ss.Name)
|
||||
<button type="submit">@T("Suspend")</button>
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ShellSettings>" %>
|
||||
<%@ Import Namespace="Orchard.MultiTenancy.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Environment.Configuration" %>
|
||||
<%: Html.Link(T("Set Up").ToString(), Url.Tenant(Model))%>
|
@@ -0,0 +1,4 @@
|
||||
@model Orchard.Environment.Configuration.ShellSettings
|
||||
@using Orchard.MultiTenancy.Extensions
|
||||
|
||||
@Html.Link(T("Set Up").ToString(), Url.Tenant(Model))
|
@@ -1,49 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TenantEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Environment.Configuration" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.MultiTenancy.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Edit Tenant").ToString()) %></h1>
|
||||
<%using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<div>
|
||||
<h2><%: Model.Name %></h2>
|
||||
</div>
|
||||
<div>
|
||||
<label for="RequestUrlHost"><%: T("Host") %></label>
|
||||
<%: Html.TextBoxFor(m => m.RequestUrlHost, new {@class = "textMedium"}) %>
|
||||
<span class="hint"><%: T("Example: If host is \"orchardproject.net\", the tenant site URL is \"http://orchardproject.net/\"") %></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><%: T("Database Setup") %></legend><%
|
||||
if (Model.State.CurrentState != TenantState.State.Uninitialized) { %>
|
||||
<div class="warning message"><%: 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>
|
||||
<%: 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>
|
||||
</div>
|
||||
<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 = "large text"})%>
|
||||
<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>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="<%: T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,48 @@
|
||||
@model Orchard.MultiTenancy.ViewModels.TenantEditViewModel
|
||||
@using Orchard.Environment.Configuration
|
||||
|
||||
<h1>@Html.TitleForPage(T("Edit Tenant").ToString())</h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<div>
|
||||
<h2>@Model.Name</h2>
|
||||
</div>
|
||||
<div>
|
||||
<label for="RequestUrlHost">@T("Host")</label>
|
||||
@Html.TextBoxFor(m => m.RequestUrlHost, new {@class = "textMedium"})
|
||||
<span class="hint">@T("Example: If host is \"orchardproject.net\", the tenant site URL is \"http://orchardproject.net/\"")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>@T("Database Setup")</legend>
|
||||
@if (Model.State.CurrentState != TenantState.State.Uninitialized) {
|
||||
<div class="warning message">@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>
|
||||
@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>
|
||||
</div>
|
||||
<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 = "large text"})
|
||||
<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>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="submit" class="button primaryAction" value="@T("Save")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TenantsIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.MultiTenancy.Extensions" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.MultiTenancy.ViewModels"%>
|
||||
<%Html.RegisterStyle("admin.css"); %>
|
||||
<h1><%: Html.TitleForPage(T("List of Site's Tenants").ToString())%></h1>
|
||||
<div class="manage"><%: Html.ActionLink(T("Add a Tenant").ToString(), "Add", new {area = "Orchard.MultiTenancy"}, new { @class = "button primaryAction" })%></div>
|
||||
<ul class="contentItems tenants"><%
|
||||
foreach (var tenant in Model.TenantSettings) { %>
|
||||
<li class="tenant <%=tenant.State.CurrentState %>">
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3><%: tenant.Name %><%
|
||||
if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
||||
%><span class="tenantHost"> - <%: Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))%></span><%
|
||||
} %></h3>
|
||||
</div>
|
||||
<div class="related"><%
|
||||
if (!string.Equals(tenant.Name, "default", StringComparison.OrdinalIgnoreCase)) { //todo: (heskew) base this off the view model so logic on what can be removed and have its state changed stays in the controller
|
||||
var t = tenant; %>
|
||||
<%: Html.DisplayFor(m => t, string.Format("ActionsFor{0}", tenant.State.CurrentState), "") %><%: T(" | ")%><%
|
||||
} %>
|
||||
<%: Html.ActionLink(T("Edit").ToString(), "Edit", new {name = tenant.Name, area = "Orchard.MultiTenancy"}) %><%
|
||||
if (!string.Equals(tenant.Name, "default", StringComparison.OrdinalIgnoreCase)) { //todo: (heskew) base this off the view model so logic on what can be removed and have its state changed stays in the controller
|
||||
%><%--
|
||||
delete not implemented! <%: T(" | ")%>
|
||||
<%: Html.ActionLink(T("Remove").ToString(), "delete", new {tenantName = tenant.Name, area = "Orchard.MultiTenancy"}) %>--%><%
|
||||
} %>
|
||||
</div>
|
||||
</div>
|
||||
</li><%
|
||||
} %>
|
||||
</ul>
|
@@ -0,0 +1,30 @@
|
||||
@model Orchard.MultiTenancy.ViewModels.TenantsIndexViewModel
|
||||
@using Orchard.MultiTenancy.Extensions
|
||||
|
||||
@{
|
||||
Html.RegisterStyle("admin.css");
|
||||
}
|
||||
|
||||
<h1>@Html.TitleForPage(T("List of Site's Tenants").ToString())</h1>
|
||||
<div class="manage">@Html.ActionLink(T("Add a Tenant").ToString(), "Add", new {area = "Orchard.MultiTenancy"}, new { @class = "button primaryAction" })</div>
|
||||
<ul class="contentItems tenants">
|
||||
@foreach (var tenant in Model.TenantSettings) {
|
||||
<li class="tenant @tenant.State.CurrentState">
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3>@tenant.Name
|
||||
@if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
||||
<span class="tenantHost"> - @Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))</span>
|
||||
}</h3>
|
||||
</div>
|
||||
<div class="related">
|
||||
@if (!string.Equals(tenant.Name, "default", StringComparison.OrdinalIgnoreCase)) { //todo: (heskew) base this off the view model so logic on what can be removed and have its state changed stays in the controller
|
||||
var t = tenant;
|
||||
@Html.DisplayFor(m => t, string.Format("ActionsFor{0}", tenant.State.CurrentState), "") @T(" | ")
|
||||
}
|
||||
@Html.ActionLink(T("Edit").ToString(), "Edit", new {name = tenant.Name, area = "Orchard.MultiTenancy"})
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
@@ -82,14 +82,14 @@ namespace Orchard.Setup.Services {
|
||||
"Messaging",
|
||||
"Orchard.Users",
|
||||
"Orchard.Roles",
|
||||
//"TinyMce",
|
||||
"TinyMce",
|
||||
"PackagingServices",
|
||||
"Orchard.Modules",
|
||||
"Orchard.Themes",
|
||||
//"Orchard.Blogs",
|
||||
//"Orchard.Comments",
|
||||
//"Orchard.Tags",
|
||||
//"Orchard.Media",
|
||||
"Orchard.Tags",
|
||||
"Orchard.Media",
|
||||
//"Futures.Widgets"
|
||||
|
||||
"Orchard.DevTools"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
@@ -45,7 +46,7 @@ namespace Orchard.Tags.Controllers {
|
||||
|
||||
var viewModel = new TagsSearchViewModel {
|
||||
TagName = tag.TagName,
|
||||
Items = items.ToList()
|
||||
Items = (IList<IContent>) items.ToList<object>()
|
||||
};
|
||||
|
||||
return View(viewModel);
|
||||
|
@@ -90,16 +90,16 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Admin\Create.aspx" />
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\Admin\Search.aspx" />
|
||||
<Content Include="Views\Home\Index.ascx" />
|
||||
<Content Include="Views\Home\Search.ascx" />
|
||||
<Content Include="Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Tags.EditTags.ascx" />
|
||||
<None Include="Views\Admin\Create.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
<None Include="Views\Admin\Edit.cshtml" />
|
||||
<None Include="Views\Admin\Index.cshtml" />
|
||||
<None Include="Views\Admin\Search.cshtml" />
|
||||
<None Include="Views\DisplayTemplates\Parts\Tags.ShowTags.cshtml" />
|
||||
<None Include="Views\EditorTemplates\Parts\Tags.EditTags.cshtml" />
|
||||
<None Include="Views\Home\Index.cshtml" />
|
||||
<None Include="Views\Home\Search.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminCreateViewModel : BaseViewModel {
|
||||
public class TagsAdminCreateViewModel {
|
||||
[Required, DisplayName("Name")]
|
||||
public string TagName { get; set; }
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminEditViewModel : BaseViewModel {
|
||||
public class TagsAdminEditViewModel {
|
||||
public int Id { get; set; }
|
||||
[Required, DisplayName("Name")]
|
||||
public string TagName { get; set; }
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Tags.Models;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminIndexViewModel : BaseViewModel {
|
||||
public class TagsAdminIndexViewModel {
|
||||
public IList<TagEntry> Tags { get; set; }
|
||||
public TagAdminIndexBulkAction BulkAction { get; set; }
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsAdminSearchViewModel : BaseViewModel {
|
||||
public class TagsAdminSearchViewModel {
|
||||
public string TagName { get; set; }
|
||||
public IEnumerable<IContent> Contents { get; set; }
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
using Orchard.Tags.Models;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsIndexViewModel : BaseViewModel {
|
||||
public class TagsIndexViewModel {
|
||||
public IList<Tag> Tags { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Tags.ViewModels {
|
||||
public class TagsSearchViewModel : BaseViewModel {
|
||||
public class TagsSearchViewModel {
|
||||
public string TagName { get; set; }
|
||||
public IEnumerable<ContentItemViewModel<IContent>> Items { get; set; }
|
||||
public IEnumerable<IContent> Items { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<TagsAdminCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Add a Tag").ToString()) %></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<%: Html.LabelFor(m => m.TagName) %>
|
||||
<%: Html.TextBoxFor(m => m.TagName, new { @class = "text" })%>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="<%:T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,15 @@
|
||||
@model Orchard.Tags.ViewModels.TagsAdminCreateViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Add a Tag").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.TagName)
|
||||
@Html.TextBoxFor(m=>m.TagName, new { @class = "text" })
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Save")" />
|
||||
</fieldset>
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<TagsAdminEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Edit a Tag").ToString()) %></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<%: Html.HiddenFor(m => m.Id) %>
|
||||
<%: Html.LabelFor(m => m.TagName) %>
|
||||
<%: Html.TextBoxFor(m => m.TagName, new { @class = "text" })%>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="<%:T("Save") %>" />
|
||||
</fieldset>
|
||||
<% } %>
|
15
src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Edit.cshtml
Normal file
15
src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Edit.cshtml
Normal file
@@ -0,0 +1,15 @@
|
||||
@model Orchard.Tags.ViewModels.TagsAdminEditViewModel
|
||||
|
||||
<h1>@Html.TitleForPage(T("Edit a Tag").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
@Html.HiddenFor(m=>m.Id)
|
||||
@Html.LabelFor(m=>m.TagName)
|
||||
@Html.TextBoxFor(m=>m.TagName, new { @class = "text" })
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Save") " />
|
||||
</fieldset>
|
||||
}
|
@@ -1,49 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<TagsAdminIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Manage Tags").ToString())%></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions"><%: T("Actions:") %></label>
|
||||
<select id="publishActions" name="<%: Html.NameOf(m => m.BulkAction)%>">
|
||||
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, T("Choose action...").ToString())%>
|
||||
<%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, T("Remove").ToString())%>
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
|
||||
</fieldset>
|
||||
<div class="manage"><%: Html.ActionLink(T("Add a tag").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
|
||||
<fieldset>
|
||||
<table class="items" summary="<%: T("This is a table of the tags in your application") %>">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col"><%: T("Name")%></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
int tagIndex = 0;
|
||||
foreach (var tagEntry in Model.Tags) {
|
||||
var ti = tagIndex;
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" value="<%=Model.Tags[tagIndex].Tag.Id%>" name="<%: Html.NameOf(m => m.Tags[ti].Tag.Id)%>"/>
|
||||
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.Tags[ti].IsChecked)%>"/>
|
||||
</td>
|
||||
<td>
|
||||
<%: Html.ActionLink(Html.Encode(tagEntry.Tag.TagName), "Search", new {id = tagEntry.Tag.Id}) %>
|
||||
</td>
|
||||
<td>
|
||||
<%: Html.ActionLink(T("Edit").ToString(), "Edit", new {id = tagEntry.Tag.Id}) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% tagIndex++; } %>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,48 @@
|
||||
@model Orchard.Tags.ViewModels.TagsAdminIndexViewModel
|
||||
|
||||
@using Orchard.Tags.ViewModels
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Tags").ToString()) </h1>
|
||||
|
||||
@Html.ValidationSummary()
|
||||
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="@Html.NameOf(m => m.BulkAction)">
|
||||
@Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, T("Choose action...").ToString())
|
||||
@Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, T("Remove").ToString())
|
||||
</select>
|
||||
<input class="button" type="submit" name="submit.BulkEdit" value="@T("Apply")" />
|
||||
</fieldset>
|
||||
|
||||
<div class="manage">@Html.ActionLink(T("Add a tag").ToString(), "Create", new { }, new { @class = "button primaryAction" })</div>
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the tags in your application")" >
|
||||
<colgroup>
|
||||
<col id="Name" />
|
||||
<col id="Email" />
|
||||
<col id="Edit" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<th scope="col"> ↓<%-- todo: (heskew) something more appropriate for "this applies to the bulk actions --%></th>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col"></th>
|
||||
</thead>
|
||||
@{var tagIndex = 0;}
|
||||
@foreach (var tagEntry in Model.Tags) {
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" value="@Model.Tags[tagIndex].Tag.Id" name="@Html.NameOf(m => m.Tags[tagIndex].Tag.Id)"/>
|
||||
<input type="checkbox" value="true" name="@Html.NameOf(m => m.Tags[tagIndex].IsChecked)"/>
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink(Html.Encode(tagEntry.Tag.TagName), "Search", new {id = tagEntry.Tag.Id})
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink(T("Edit").ToString(), "Edit", new {id = tagEntry.Tag.Id})
|
||||
</td>
|
||||
</tr>
|
||||
tagIndex = tagIndex + 1;
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
@@ -1,22 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<TagsAdminSearchViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.ContentManagement"%>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("List of contents tagged with {0}", Model.TagName).ToString()) %></h1>
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%: T("Name")%></th>
|
||||
<th scope="col"><%: T("Link to the content item")%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<% foreach (var contentItem in Model.Contents) { %>
|
||||
<tr>
|
||||
<td><%: Html.ItemDisplayText(contentItem) %></td>
|
||||
<td><%: Html.ItemDisplayLink(contentItem) %></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</table>
|
@@ -0,0 +1,22 @@
|
||||
@model Orchard.Tags.ViewModels.TagsAdminSearchViewModel
|
||||
@using Orchard.ContentManagement
|
||||
|
||||
<h1>@Html.TitleForPage(T("List of contents tagged with {0}", Model.TagName).ToString())</h1>
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Link to the content item")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var contentItem in Model.Contents) {
|
||||
<tr>
|
||||
<td>@Html.ItemDisplayText(contentItem)</td>
|
||||
<td>@Html.ItemDisplayLink(contentItem)</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
@@ -1,8 +1,8 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TagsPart>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.Models" %>
|
||||
<% if (Model.CurrentTags.Count > 0) { %>
|
||||
@model Orchard.Tags.Models.TagsPart
|
||||
|
||||
@if (Model.CurrentTags.Count > 0) {
|
||||
<p class="tags">
|
||||
<span><%: T("Tags:") %></span>
|
||||
<span>@T("Tags:")</span>
|
||||
<%=string.Join(", ", Model.CurrentTags.Select(t => Html.ActionLink(Html.Encode(t.TagName), "Search", "Home", new { area = "Orchard.Tags", tagName = t.TagName }, new { }).ToHtmlString()).ToArray())%>
|
||||
</p><%
|
||||
} %>
|
||||
</p>
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<EditTagsViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<fieldset>
|
||||
<%: Html.LabelFor(m => m.Tags) %>
|
||||
<%: Html.TextBoxFor(m => m.Tags, new { @class = "large text" })%>
|
||||
</fieldset>
|
@@ -0,0 +1,6 @@
|
||||
@model Orchard.Tags.ViewModels.EditTagsViewModel
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.Tags)
|
||||
@Html.TextBoxFor(m => m.Tags, new { @class = "large text" })
|
||||
</fieldset>
|
@@ -1,13 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TagsIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h1 class="page-title"><%: Html.TitleForPage(T("Tags").ToString())%></h1>
|
||||
<%: Html.UnorderedList(
|
||||
Model.Tags,
|
||||
(t, i) => Html.ActionLink(
|
||||
Html.Encode(t.TagName),
|
||||
"Search",
|
||||
new { tagName = t.TagName },
|
||||
new { @class = "" /* todo: (heskew) classify according to tag use */ }
|
||||
),
|
||||
"tagCloud")
|
||||
%>
|
12
src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.cshtml
Normal file
12
src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,12 @@
|
||||
@model Orchard.Tags.ViewModels.TagsIndexViewModel
|
||||
|
||||
<h1 class="page-title">@Html.TitleForPage(T("Tags").ToString())</h1>
|
||||
@Html.UnorderedList(
|
||||
Model.Tags,
|
||||
(t, i) => Html.ActionLink(
|
||||
Html.Encode(t.TagName),
|
||||
"Search",
|
||||
new { tagName = t.TagName },
|
||||
new { @class = "" /* todo: (heskew) classify according to tag use */ }
|
||||
),
|
||||
"tagCloud")
|
@@ -1,5 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TagsSearchViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<% Html.AddTitleParts(T("Tags").ToString(), T("Contents tagged with {0}", Model.TagName).ToString()); %>
|
||||
<h1 class="page-title"><%: T("Contents tagged with <span>{0}</span>", Html.Encode(Model.TagName)) %></h1>
|
||||
<%: Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c), "taggedPosts contentItems") %>
|
@@ -0,0 +1,5 @@
|
||||
@model Orchard.Tags.ViewModels.TagsSearchViewModel
|
||||
|
||||
@Html.AddTitleParts(T("Tags").ToString(), T("Contents tagged with {0}", Model.TagName).ToString());
|
||||
<h1 class="page-title">@T("Contents tagged with <span>{0}</span>", Html.Encode(Model.TagName))</h1>
|
||||
@Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c), "taggedPosts contentItems")
|
@@ -129,7 +129,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\TinyMceTextEditor.ascx" />
|
||||
<None Include="Views\EditorTemplates\TinyMceTextEditor.cshtml" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,23 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<% Html.RegisterScript("tiny_mce.js"); %>
|
||||
<%: Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><%
|
||||
using (this.Capture("end-of-page-scripts")) {%>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme: "advanced",
|
||||
mode: "specific_textareas",
|
||||
editor_selector: "html",
|
||||
plugins: "fullscreen,autoresize,searchreplace,addmedia",
|
||||
theme_advanced_toolbar_location: "top",
|
||||
theme_advanced_toolbar_align: "left",
|
||||
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,addmedia,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
|
||||
theme_advanced_buttons2: "",
|
||||
theme_advanced_buttons3: "",
|
||||
convert_urls: false,
|
||||
addmedia_action: "<%: Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"}) %>",
|
||||
addmedia_path: "<%: Model.AddMediaPath %>",
|
||||
request_verification_token: "<%: Html.AntiForgeryTokenValueOrchard() %>"
|
||||
});
|
||||
</script><%
|
||||
}%>
|
@@ -0,0 +1,27 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyEditorViewModel
|
||||
@{
|
||||
using(Capture(script => WorkContext.Page.Head.Add(script))) {
|
||||
<script type="text/javascript" src="@Href("~/Modules/TinyMce/Scripts/tiny_mce.js")"></script>
|
||||
}
|
||||
using(Capture(script => WorkContext.Page.Tail.Add(script))) {
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme: "advanced",
|
||||
mode: "specific_textareas",
|
||||
editor_selector: "html",
|
||||
plugins: "fullscreen,autoresize,searchreplace,addmedia",
|
||||
theme_advanced_toolbar_location: "top",
|
||||
theme_advanced_toolbar_align: "left",
|
||||
theme_advanced_buttons1: "search,replace,|,cut,copy,paste,|,undo,redo,|,image,addmedia,|,link,unlink,charmap,emoticon,codeblock,|,bold,italic,|,numlist,bullist,formatselect,|,code,fullscreen",
|
||||
theme_advanced_buttons2: "",
|
||||
theme_advanced_buttons3: "",
|
||||
convert_urls: false,
|
||||
addmedia_action: "@Url.Action("AddFromClient", "Admin", new {area = "Orchard.Media"})",
|
||||
addmedia_path: "@Model.AddMediaPath",
|
||||
request_verification_token: "@Html.AntiForgeryTokenValueOrchard()"
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" })
|
@@ -47,12 +47,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageIndexReferenceImplem
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tests", "Tools\Orchard.Tests\Orchard.Tests.csproj", "{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nested", "Nested", "{704716AC-45CC-4421-AD1B-73BA833C6825}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClaySharp", "..\Clay\src\ClaySharp\ClaySharp.csproj", "{76BCD43B-7BA5-4B63-B1E1-861641CA2686}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClaySharp.Tests", "..\Clay\src\ClaySharp.Tests\ClaySharp.Tests.csproj", "{10369238-A590-48BF-8D3E-E83EB6F0C931}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{8A49DB66-40B2-4B6A-BFF0-D4839A240D00}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Shapes.txt = Shapes.txt
|
||||
@@ -64,6 +58,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Packaging", "Orchar
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.ContentTypes", "Orchard.Web\Modules\Orchard.ContentTypes\Orchard.ContentTypes.csproj", "{0E7646E8-FE8F-43C1-8799-D97860925EC4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tags", "Orchard.Web\Modules\Orchard.Tags\Orchard.Tags.csproj", "{5D0F00F0-26C9-4785-AD61-B85710C60EB0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyMce", "Orchard.Web\Modules\TinyMce\TinyMce.csproj", "{954CA994-D204-468B-9D69-51F6AD3E1C29}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.MultiTenancy", "Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj", "{72457126-E118-4171-A08F-9A709EE4B7FC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Media", "Orchard.Web\Modules\Orchard.Media\Orchard.Media.csproj", "{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Email", "Orchard.Web\Modules\Orchard.Email\Orchard.Email.csproj", "{05660F47-D649-48BD-9DED-DF4E01E7CFF9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -263,26 +267,6 @@ Global
|
||||
{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -313,6 +297,56 @@ Global
|
||||
{0E7646E8-FE8F-43C1-8799-D97860925EC4}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{0E7646E8-FE8F-43C1-8799-D97860925EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E7646E8-FE8F-43C1-8799-D97860925EC4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -326,6 +360,11 @@ Global
|
||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{0E7646E8-FE8F-43C1-8799-D97860925EC4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{72457126-E118-4171-A08F-9A709EE4B7FC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
@@ -337,7 +376,5 @@ Global
|
||||
{33B1BC8D-E292-4972-A363-22056B207156} = {383DBA32-4A3E-48D1-AAC3-75377A694452}
|
||||
{8A4E42CE-79F8-4BE2-8B1E-A6B83432123B} = {383DBA32-4A3E-48D1-AAC3-75377A694452}
|
||||
{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE} = {383DBA32-4A3E-48D1-AAC3-75377A694452}
|
||||
{76BCD43B-7BA5-4B63-B1E1-861641CA2686} = {704716AC-45CC-4421-AD1B-73BA833C6825}
|
||||
{10369238-A590-48BF-8D3E-E83EB6F0C931} = {704716AC-45CC-4421-AD1B-73BA833C6825}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@@ -77,6 +77,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
@@ -820,12 +824,6 @@
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Clay\src\ClaySharp\ClaySharp.csproj">
|
||||
<Project>{76BCD43B-7BA5-4B63-B1E1-861641CA2686}</Project>
|
||||
<Name>ClaySharp</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@@ -3,18 +3,20 @@ using System.Web;
|
||||
using System.Web.Security;
|
||||
using Orchard.Logging;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Security.Providers {
|
||||
public class FormsAuthenticationService : IAuthenticationService {
|
||||
private readonly IClock _clock;
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly HttpContextBase _httpContext;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
public FormsAuthenticationService(IClock clock, IContentManager contentManager, HttpContextBase httpContext) {
|
||||
public FormsAuthenticationService(IClock clock, IContentManager contentManager, IHttpContextAccessor httpContextAccessor) {
|
||||
_clock = clock;
|
||||
_contentManager = contentManager;
|
||||
_httpContext = httpContext;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
|
||||
Logger = NullLogger.Instance;
|
||||
|
||||
// TEMP: who can say...
|
||||
@@ -47,8 +49,9 @@ namespace Orchard.Security.Providers {
|
||||
if (FormsAuthentication.CookieDomain != null) {
|
||||
cookie.Domain = FormsAuthentication.CookieDomain;
|
||||
}
|
||||
|
||||
_httpContext.Response.Cookies.Add(cookie);
|
||||
|
||||
var httpContext = _httpContextAccessor.Current();
|
||||
httpContext.Response.Cookies.Add(cookie);
|
||||
}
|
||||
|
||||
public void SignOut() {
|
||||
@@ -56,11 +59,12 @@ namespace Orchard.Security.Providers {
|
||||
}
|
||||
|
||||
public IUser GetAuthenticatedUser() {
|
||||
if (!_httpContext.Request.IsAuthenticated || !(_httpContext.User.Identity is FormsIdentity)) {
|
||||
var httpContext = _httpContextAccessor.Current();
|
||||
if (!httpContext.Request.IsAuthenticated || !(httpContext.User.Identity is FormsIdentity)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var formsIdentity = (FormsIdentity)_httpContext.User.Identity;
|
||||
var formsIdentity = (FormsIdentity)httpContext.User.Identity;
|
||||
var userData = formsIdentity.Ticket.UserData;
|
||||
int userId;
|
||||
if (!int.TryParse(userData, out userId)) {
|
||||
|
Reference in New Issue
Block a user