mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -248,6 +248,15 @@ namespace Orchard.Tests.ContentManagement {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void CountReturnsNumber() {
|
||||||
|
AddSampleData();
|
||||||
|
|
||||||
|
var count = _manager.Query()
|
||||||
|
.Count();
|
||||||
|
|
||||||
|
Assert.That(count, Is.EqualTo(4));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void QueryShouldJoinVersionedRecords() {
|
public void QueryShouldJoinVersionedRecords() {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace Orchard.Tests.DataMigration {
|
|||||||
private string _tempFolder;
|
private string _tempFolder;
|
||||||
private SchemaBuilder _schemaBuilder;
|
private SchemaBuilder _schemaBuilder;
|
||||||
private DefaultDataMigrationInterpreter _interpreter;
|
private DefaultDataMigrationInterpreter _interpreter;
|
||||||
|
private ISession _session;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() {
|
public void Setup() {
|
||||||
@@ -38,7 +39,7 @@ namespace Orchard.Tests.DataMigration {
|
|||||||
|
|
||||||
var builder = new ContainerBuilder();
|
var builder = new ContainerBuilder();
|
||||||
|
|
||||||
var session = _sessionFactory.OpenSession();
|
_session = _sessionFactory.OpenSession();
|
||||||
builder.RegisterInstance(appDataFolder).As<IAppDataFolder>();
|
builder.RegisterInstance(appDataFolder).As<IAppDataFolder>();
|
||||||
builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>();
|
builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>();
|
||||||
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>();
|
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>();
|
||||||
@@ -46,7 +47,7 @@ namespace Orchard.Tests.DataMigration {
|
|||||||
builder.RegisterType<DefaultDataMigrationInterpreter>().As<IDataMigrationInterpreter>();
|
builder.RegisterType<DefaultDataMigrationInterpreter>().As<IDataMigrationInterpreter>();
|
||||||
builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>();
|
builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>();
|
||||||
builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>();
|
builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>();
|
||||||
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(session)).As<ISessionLocator>();
|
builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>();
|
||||||
builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty<RecordBlueprint>() }).As<ShellBlueprint>();
|
builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty<RecordBlueprint>() }).As<ShellBlueprint>();
|
||||||
builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>();
|
builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>();
|
||||||
builder.RegisterModule(new DataModule());
|
builder.RegisterModule(new DataModule());
|
||||||
@@ -133,10 +134,24 @@ namespace Orchard.Tests.DataMigration {
|
|||||||
.AlterTable("User", table => table
|
.AlterTable("User", table => table
|
||||||
.AddColumn("Age", DbType.Int32))
|
.AddColumn("Age", DbType.Int32))
|
||||||
.AlterTable("User", table => table
|
.AlterTable("User", table => table
|
||||||
.AlterColumn("Lastname", column => column.WithDefault("John")))
|
.AlterColumn("Lastname", column => column.WithDefault("Doe")))
|
||||||
.AlterTable("User", table => table
|
.AlterTable("User", table => table
|
||||||
.DropColumn("Firstname")
|
.DropColumn("Firstname")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// creating a new row should assign a default value to Firstname and Age
|
||||||
|
_schemaBuilder
|
||||||
|
.ExecuteSql("insert into TEST_User VALUES (DEFAULT, DEFAULT)");
|
||||||
|
|
||||||
|
// ensure wehave one record woth the default value
|
||||||
|
var command = _session.Connection.CreateCommand();
|
||||||
|
command.CommandText = "SELECT count(*) FROM TEST_User WHERE Lastname = 'Doe'";
|
||||||
|
Assert.That(command.ExecuteScalar(), Is.EqualTo(1));
|
||||||
|
|
||||||
|
// ensure this is not a false positive
|
||||||
|
command = _session.Connection.CreateCommand();
|
||||||
|
command.CommandText = "SELECT count(*) FROM TEST_User WHERE Lastname = 'Foo'";
|
||||||
|
Assert.That(command.ExecuteScalar(), Is.EqualTo(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.UI.Navigation;
|
using Orchard.UI;
|
||||||
|
|
||||||
namespace Orchard.Tests.UI.Navigation {
|
namespace Orchard.Tests.UI.Navigation {
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
@@ -10,7 +10,7 @@ namespace Orchard.Tests.UI.Navigation {
|
|||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Init() {
|
public void Init() {
|
||||||
_comparer = new PositionComparer();
|
_comparer = new FlatPositionComparer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -47,6 +47,22 @@ namespace Orchard.Tests.UI.Navigation {
|
|||||||
AssertSame("007", "7");
|
AssertSame("007", "7");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void NegativeNumericValuesAreLessThanPositive() {
|
||||||
|
AssertLess("-5", "5");
|
||||||
|
AssertSame("-5", "-5");
|
||||||
|
AssertMore("42", "-42");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void NegativeNumericValuesShouldCompareNumerically() {
|
||||||
|
AssertMore("-3", "-5");
|
||||||
|
AssertLess("-8", "-5");
|
||||||
|
AssertSame("-5", "-5");
|
||||||
|
AssertLess("-100", "-5");
|
||||||
|
AssertSame("-007", "-7");
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void DotsSplitParts() {
|
public void DotsSplitParts() {
|
||||||
AssertLess("0500.3", "0500.5");
|
AssertLess("0500.3", "0500.5");
|
||||||
|
|||||||
@@ -21,14 +21,18 @@ namespace Orchard.Core.Contents {
|
|||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
|
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
|
||||||
|
|
||||||
builder.Add(T("Content"), "2", menu => {
|
builder.Add(T("Content"), "2",
|
||||||
menu.Add(T("Manage Content"), "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" }));
|
menu => menu.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new {area = "Contents", id = ""})));
|
||||||
foreach (var contentTypeDefinition in contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable)) {
|
|
||||||
|
builder.Add(T("New"), "-1", menu => {
|
||||||
|
menu.Add(T("Content Item"), "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" }));
|
||||||
|
foreach (var contentTypeDefinition in contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable).OrderBy(ctd => ctd.DisplayName)) {
|
||||||
var ci = _contentManager.New(contentTypeDefinition.Name);
|
var ci = _contentManager.New(contentTypeDefinition.Name);
|
||||||
var cim = _contentManager.GetItemMetadata(ci);
|
var cim = _contentManager.GetItemMetadata(ci);
|
||||||
var createRouteValues = cim.CreateRouteValues;
|
var createRouteValues = cim.CreateRouteValues;
|
||||||
|
// review: the display name should be a LocalizedString
|
||||||
if (createRouteValues.Any())
|
if (createRouteValues.Any())
|
||||||
menu.Add(T("Create {0}", contentTypeDefinition.DisplayName), "1.3", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues));
|
menu.Add(T(contentTypeDefinition.DisplayName), "5", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,20 +77,17 @@ namespace Orchard.Core.Contents.Controllers {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pageOfContentItems = query.Slice(pager.GetStartIndex(), pager.PageSize).ToList();
|
|
||||||
|
|
||||||
model.Options.SelectedFilter = model.TypeName;
|
model.Options.SelectedFilter = model.TypeName;
|
||||||
model.Options.FilterOptions = GetCreatableTypes()
|
model.Options.FilterOptions = GetCreatableTypes()
|
||||||
.Select(ctd => new KeyValuePair<string, string>(ctd.Name, ctd.DisplayName))
|
.Select(ctd => new KeyValuePair<string, string>(ctd.Name, ctd.DisplayName))
|
||||||
.ToList().OrderBy(kvp => kvp.Key);
|
.ToList().OrderBy(kvp => kvp.Key);
|
||||||
|
|
||||||
|
var pagerShape = Shape.Pager(pager).TotalItemCount(query.Count());
|
||||||
|
var pageOfContentItems = query.Slice(pager.GetStartIndex(), pager.PageSize).ToList();
|
||||||
|
|
||||||
var list = Shape.List();
|
var list = Shape.List();
|
||||||
list.AddRange(pageOfContentItems.Select(ci => _contentManager.BuildDisplay(ci, "SummaryAdmin")));
|
list.AddRange(pageOfContentItems.Select(ci => _contentManager.BuildDisplay(ci, "SummaryAdmin")));
|
||||||
|
|
||||||
var hasNextPage = query.Slice(pager.GetStartIndex(pager.Page + 1), 1).Any();
|
|
||||||
var pagerShape = Shape.Pager(pager).HasNextPage(hasNextPage);
|
|
||||||
|
|
||||||
var viewModel = Shape.ViewModel()
|
var viewModel = Shape.ViewModel()
|
||||||
.ContentItems(list)
|
.ContentItems(list)
|
||||||
.Pager(pagerShape)
|
.Pager(pagerShape)
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ namespace Orchard.Core.Contents.Extensions {
|
|||||||
public static ContentTypeDefinitionBuilder Creatable(this ContentTypeDefinitionBuilder builder, bool creatable = true) {
|
public static ContentTypeDefinitionBuilder Creatable(this ContentTypeDefinitionBuilder builder, bool creatable = true) {
|
||||||
return builder.WithSetting("ContentTypeSettings.Creatable", creatable.ToString());
|
return builder.WithSetting("ContentTypeSettings.Creatable", creatable.ToString());
|
||||||
}
|
}
|
||||||
|
public static ContentTypeDefinitionBuilder Draftable(this ContentTypeDefinitionBuilder builder, bool draftable = true) {
|
||||||
|
return builder.WithSetting("ContentTypeSettings.Draftable", draftable.ToString());
|
||||||
|
}
|
||||||
public static ContentPartDefinitionBuilder Attachable(this ContentPartDefinitionBuilder builder, bool attachable = true) {
|
public static ContentPartDefinitionBuilder Attachable(this ContentPartDefinitionBuilder builder, bool attachable = true) {
|
||||||
return builder.WithSetting("ContentPartSettings.Attachable", attachable.ToString());
|
return builder.WithSetting("ContentPartSettings.Attachable", attachable.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
namespace Orchard.Core.Contents.Settings {
|
namespace Orchard.Core.Contents.Settings {
|
||||||
public class ContentTypeSettings {
|
public class ContentTypeSettings {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This setting is used to display a Content Type in Content Management menu like
|
/// Used to determine if an instance of this content type can be created through the UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Creatable { get; set; }
|
public bool Creatable { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Used to determine if this content type supports draft versions
|
||||||
|
/// </summary>
|
||||||
|
public bool Draftable { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,8 +8,9 @@ namespace Orchard.Core.Dashboard {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Orchard"), "0",
|
builder.Add(T("Dashboard"), "0",
|
||||||
menu => menu.Add(T("Dashboard"), "0", item => item.Action("Index", "Admin", new { area = "Dashboard" }).Permission(StandardPermissions.AccessAdminPanel)));
|
menu => menu.Add(T("Orchard"), "0", item => item.Action("Index", "Admin", new { area = "Dashboard" })
|
||||||
|
.Permission(StandardPermissions.AccessAdminPanel)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,8 @@ namespace Orchard.Core.Navigation {
|
|||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
//todo: - add new menu? and list menus? ...and remove hard-coded menu name here
|
//todo: - add new menu? and list menus? ...and remove hard-coded menu name here
|
||||||
builder.Add(T("Navigation"), "8",
|
builder.Add(T("Navigation"), "8",
|
||||||
menu => menu
|
menu => menu.Add(T("Main Menu"), "0", item => item.Action("Index", "Admin", new { area = "Navigation" })
|
||||||
.Add(T("Main Menu"), "6.0", item => item.Action("Index", "Admin", new { area = "Navigation" }).Permission(Permissions.ManageMainMenu)));
|
.Permission(Permissions.ManageMainMenu)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Orchard.Core.Navigation.ViewModels;
|
|||||||
using Orchard.DisplayManagement;
|
using Orchard.DisplayManagement;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
using Orchard.Mvc.AntiForgery;
|
using Orchard.Mvc.AntiForgery;
|
||||||
|
using Orchard.UI;
|
||||||
using Orchard.UI.Navigation;
|
using Orchard.UI.Navigation;
|
||||||
using Orchard.Utility;
|
using Orchard.Utility;
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
model = new NavigationManagementViewModel();
|
model = new NavigationManagementViewModel();
|
||||||
|
|
||||||
if (model.MenuItemEntries == null || model.MenuItemEntries.Count() < 1)
|
if (model.MenuItemEntries == null || model.MenuItemEntries.Count() < 1)
|
||||||
model.MenuItemEntries = _menuService.Get().Select(CreateMenuItemEntries).OrderBy(menuPartEntry => menuPartEntry.MenuItem.Position, new PositionComparer()).ToList();
|
model.MenuItemEntries = _menuService.Get().Select(CreateMenuItemEntries).OrderBy(menuPartEntry => menuPartEntry.MenuItem.Position, new FlatPositionComparer()).ToList();
|
||||||
|
|
||||||
// need action name as this action is referenced from another action
|
// need action name as this action is referenced from another action
|
||||||
return View("Index", model);
|
return View("Index", model);
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ namespace Orchard.Core.Reports {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Site Configuration"), "11",
|
builder.Add(T("Configuration"), "50",
|
||||||
menu => menu.Add(T("Reports"), "15", item => item.Action("Index", "Admin", new { area = "Reports" }).Permission(StandardPermissions.AccessAdminPanel)));
|
menu => menu.Add(T("Reports"), "20", item => item.Action("Index", "Admin", new { area = "Reports" })
|
||||||
|
.Permission(StandardPermissions.AccessAdminPanel)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,9 +7,9 @@ namespace Orchard.Core.Settings {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Site Configuration"), "11",
|
builder.Add(T("Configuration"), "50",
|
||||||
menu => menu
|
menu => menu.Add(T("Settings"), "10", item => item.Action("Index", "Admin", new { area = "Settings" })
|
||||||
.Add(T("Settings"), "10", item => item.Action("Index", "Admin", new { area = "Settings" }).Permission(Permissions.ManageSettings)));
|
.Permission(Permissions.ManageSettings)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
var queryString = ViewContext.HttpContext.Request.QueryString;
|
var queryString = ViewContext.HttpContext.Request.QueryString;
|
||||||
if (queryString != null) {
|
if (queryString != null) {
|
||||||
foreach (string key in queryString.Keys) {
|
foreach (string key in queryString.Keys) {
|
||||||
if (!routeData.ContainsKey(key)) {
|
if (key != null && !routeData.ContainsKey(key)) {
|
||||||
var value = queryString[key];
|
var value = queryString[key];
|
||||||
routeData[key] = queryString[key];
|
routeData[key] = queryString[key];
|
||||||
}
|
}
|
||||||
@@ -17,21 +17,23 @@
|
|||||||
routeData.Remove("id");
|
routeData.Remove("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hasNextPage = (Model.Page * Model.PageSize) < Model.TotalItemCount;
|
||||||
|
|
||||||
Model.Classes.Add("pager");
|
Model.Classes.Add("pager");
|
||||||
Model.Classes.Add("group");
|
Model.Classes.Add("group");
|
||||||
var tag = Tag(Model, "ul");
|
var tag = Tag(Model, "ul");
|
||||||
}
|
}
|
||||||
@if (Model.HasNextPage || Model.Page > 1) {
|
@if (hasNextPage || Model.Page > 1) {
|
||||||
@tag.StartElement
|
@tag.StartElement
|
||||||
if(Model.HasNextPage) {
|
if(hasNextPage) {
|
||||||
routeData["page"] = Model.Page + 1;
|
routeData["page"] = Model.Page + 1;
|
||||||
<li class="older">
|
<li class="page-next">
|
||||||
@Html.ActionLink((string)nextText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
|
@Html.ActionLink((string)nextText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
if(Model.Page > 1) {
|
if(Model.Page > 1) {
|
||||||
routeData["page"] = Model.Page - 1;
|
routeData["page"] = Model.Page - 1;
|
||||||
<li class="newer">
|
<li class="page-previous">
|
||||||
@Html.ActionLink((string)previousText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
|
@Html.ActionLink((string)previousText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,9 +80,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Orchard.Blogs {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Blogs"), "1", BuildMenu);
|
builder.Add(T("Blogs"), "2.5", BuildMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BuildMenu(NavigationItemBuilder menu) {
|
private void BuildMenu(NavigationItemBuilder menu) {
|
||||||
@@ -24,16 +24,15 @@ namespace Orchard.Blogs {
|
|||||||
var blogCount = blogs.Count();
|
var blogCount = blogs.Count();
|
||||||
var singleBlog = blogCount == 1 ? blogs.ElementAt(0) : null;
|
var singleBlog = blogCount == 1 ? blogs.ElementAt(0) : null;
|
||||||
|
|
||||||
if (blogCount > 0 && singleBlog == null)
|
if (blogCount > 0 && singleBlog == null) {
|
||||||
menu.Add(T("Manage Blogs"), "1.0",
|
menu.Add(T("List"), "3",
|
||||||
item =>
|
item => item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListBlogs));
|
||||||
item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListBlogs));
|
}
|
||||||
else if (singleBlog != null)
|
else if (singleBlog != null)
|
||||||
menu.Add(T("Manage Blog"), "1.0",
|
menu.Add(T("Manage Blog"), "1.0",
|
||||||
item =>
|
item => item.Action("Item", "BlogAdmin", new { area = "Orchard.Blogs", blogSlug = singleBlog.Slug }).Permission(Permissions.MetaListBlogs));
|
||||||
item.Action("Item", "BlogAdmin", new {area = "Orchard.Blogs", blogSlug = singleBlog.Slug}).Permission(Permissions.MetaListBlogs));
|
|
||||||
|
|
||||||
if ( singleBlog != null )
|
if (singleBlog != null)
|
||||||
menu.Add(T("Create New Post"), "1.1",
|
menu.Add(T("Create New Post"), "1.1",
|
||||||
item =>
|
item =>
|
||||||
item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogSlug = singleBlog.Slug }).Permission(Permissions.PublishBlogPost));
|
item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogSlug = singleBlog.Slug }).Permission(Permissions.PublishBlogPost));
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using Orchard.Data;
|
|||||||
using Orchard.DisplayManagement;
|
using Orchard.DisplayManagement;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
using Orchard.UI.Admin;
|
using Orchard.UI.Admin;
|
||||||
|
using Orchard.UI.Navigation;
|
||||||
using Orchard.UI.Notify;
|
using Orchard.UI.Notify;
|
||||||
|
|
||||||
namespace Orchard.Blogs.Controllers {
|
namespace Orchard.Blogs.Controllers {
|
||||||
@@ -27,7 +28,8 @@ namespace Orchard.Blogs.Controllers {
|
|||||||
IBlogPostService blogPostService,
|
IBlogPostService blogPostService,
|
||||||
IContentManager contentManager,
|
IContentManager contentManager,
|
||||||
ITransactionManager transactionManager,
|
ITransactionManager transactionManager,
|
||||||
IBlogSlugConstraint blogSlugConstraint) {
|
IBlogSlugConstraint blogSlugConstraint,
|
||||||
|
IShapeFactory shapeFactory) {
|
||||||
Services = services;
|
Services = services;
|
||||||
_blogService = blogService;
|
_blogService = blogService;
|
||||||
_blogPostService = blogPostService;
|
_blogPostService = blogPostService;
|
||||||
@@ -35,8 +37,10 @@ namespace Orchard.Blogs.Controllers {
|
|||||||
_transactionManager = transactionManager;
|
_transactionManager = transactionManager;
|
||||||
_blogSlugConstraint = blogSlugConstraint;
|
_blogSlugConstraint = blogSlugConstraint;
|
||||||
T = NullLocalizer.Instance;
|
T = NullLocalizer.Instance;
|
||||||
|
Shape = shapeFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynamic Shape { get; set; }
|
||||||
public Localizer T { get; set; }
|
public Localizer T { get; set; }
|
||||||
public IOrchardServices Services { get; set; }
|
public IOrchardServices Services { get; set; }
|
||||||
|
|
||||||
@@ -135,20 +139,25 @@ namespace Orchard.Blogs.Controllers {
|
|||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult Item(string blogSlug) {
|
public ActionResult Item(string blogSlug, Pager pager) {
|
||||||
BlogPart blogPart = _blogService.Get(blogSlug);
|
BlogPart blogPart = _blogService.Get(blogSlug);
|
||||||
|
|
||||||
if (blogPart == null)
|
if (blogPart == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
//() => {
|
|
||||||
// var list = shapeHelper.List();
|
|
||||||
// list.AddRange(_blogPostService.Get(part, VersionOptions.Latest)
|
|
||||||
// .Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin")));
|
|
||||||
// return shapeHelper.Parts_Blogs_BlogPost_List_Admin(ContentPart: part, ContentItems: list);
|
|
||||||
//})
|
|
||||||
|
|
||||||
var model = Services.ContentManager.BuildDisplay(blogPart, "DetailAdmin");
|
var blogPosts = _blogPostService.Get(blogPart, pager.GetStartIndex(), pager.PageSize, VersionOptions.Latest)
|
||||||
return View(model);
|
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin"));
|
||||||
|
|
||||||
|
var blog = Services.ContentManager.BuildDisplay(blogPart, "DetailAdmin");
|
||||||
|
|
||||||
|
var list = Shape.List();
|
||||||
|
list.AddRange(blogPosts);
|
||||||
|
blog.Content.Add(Shape.Parts_Blogs_BlogPost_ListAdmin(ContentItems: list), "5");
|
||||||
|
|
||||||
|
var totalItemCount = _blogPostService.PostCount(blogPart, VersionOptions.Latest);
|
||||||
|
blog.Content.Add(Shape.Pager(pager).TotalItemCount(totalItemCount), "Content:after");
|
||||||
|
|
||||||
|
return View(blog);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ namespace Orchard.Blogs.Controllers {
|
|||||||
list.AddRange(blogPosts);
|
list.AddRange(blogPosts);
|
||||||
blog.Content.Add(Shape.Parts_Blogs_BlogPost_List(ContentItems: list), "5");
|
blog.Content.Add(Shape.Parts_Blogs_BlogPost_List(ContentItems: list), "5");
|
||||||
|
|
||||||
var hasNextPage = _blogPostService.Get(blogPart, pager.GetStartIndex(pager.Page + 1), 1).Any();
|
var totalItemCount = _blogPostService.PostCount(blogPart);
|
||||||
blog.Content.Add(Shape.Pager(pager).HasNextPage(hasNextPage), "Content:after");
|
blog.Content.Add(Shape.Pager(pager).TotalItemCount(totalItemCount), "Content:after");
|
||||||
|
|
||||||
return View(blog);
|
return View(blog);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,11 +131,10 @@
|
|||||||
<Content Include="Views\Parts\Blogs.Blog.Manage.cshtml" />
|
<Content Include="Views\Parts\Blogs.Blog.Manage.cshtml" />
|
||||||
<Content Include="Views\Parts\Blogs.Blog.Description.cshtml" />
|
<Content Include="Views\Parts\Blogs.Blog.Description.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Blogs.Blog.Fields.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Blogs.Blog.Fields.cshtml" />
|
||||||
<Content Include="Views\Parts\Blogs.BlogPost.List.Admin.cshtml">
|
<Content Include="Views\Parts\Blogs.BlogPost.ListAdmin.cshtml">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Views\Items\Content-Blog.SummaryAdmin.cshtml" />
|
<Content Include="Views\Items\Content-Blog.SummaryAdmin.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -49,9 +49,20 @@ namespace Orchard.Blogs.Services {
|
|||||||
return GetBlogQuery(blogPart, versionOptions).List().Select(ci => ci.As<BlogPostPart>());
|
return GetBlogQuery(blogPart, versionOptions).List().Select(ci => ci.As<BlogPostPart>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count) {
|
public IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count) {
|
||||||
return GetBlogQuery(blogPart, VersionOptions.Published).Slice(skip, count).ToList().Select(ci => ci.As<BlogPostPart>());
|
return Get(blogPart, skip, count, VersionOptions.Published);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count, VersionOptions versionOptions) {
|
||||||
|
return GetBlogQuery(blogPart, versionOptions).Slice(skip, count).ToList().Select(ci => ci.As<BlogPostPart>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int PostCount(BlogPart blogPart) {
|
||||||
|
return PostCount(blogPart, VersionOptions.Published);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int PostCount(BlogPart blogPart, VersionOptions versionOptions) {
|
||||||
|
return GetBlogQuery(blogPart, versionOptions).Count();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<BlogPostPart> Get(BlogPart blogPart, ArchiveData archiveData) {
|
public IEnumerable<BlogPostPart> Get(BlogPart blogPart, ArchiveData archiveData) {
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ namespace Orchard.Blogs.Services {
|
|||||||
IEnumerable<BlogPostPart> Get(BlogPart blogPart, VersionOptions versionOptions);
|
IEnumerable<BlogPostPart> Get(BlogPart blogPart, VersionOptions versionOptions);
|
||||||
IEnumerable<BlogPostPart> Get(BlogPart blogPart, ArchiveData archiveData);
|
IEnumerable<BlogPostPart> Get(BlogPart blogPart, ArchiveData archiveData);
|
||||||
IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count);
|
IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count);
|
||||||
|
IEnumerable<BlogPostPart> Get(BlogPart blogPart, int skip, int count, VersionOptions versionOptions);
|
||||||
|
int PostCount(BlogPart blogPart);
|
||||||
|
int PostCount(BlogPart blogPart, VersionOptions versionOptions);
|
||||||
IEnumerable<KeyValuePair<ArchiveData, int>> GetArchives(BlogPart blogPart);
|
IEnumerable<KeyValuePair<ArchiveData, int>> GetArchives(BlogPart blogPart);
|
||||||
void Delete(BlogPostPart blogPostPart);
|
void Delete(BlogPostPart blogPostPart);
|
||||||
void Publish(BlogPostPart blogPostPart);
|
void Publish(BlogPostPart blogPostPart);
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -85,7 +85,6 @@
|
|||||||
<Content Include="CodeGenerationTemplates\ModuleManifest.txt" />
|
<Content Include="CodeGenerationTemplates\ModuleManifest.txt" />
|
||||||
<Content Include="CodeGenerationTemplates\ModuleWebConfig.txt" />
|
<Content Include="CodeGenerationTemplates\ModuleWebConfig.txt" />
|
||||||
<Content Include="CodeGenerationTemplates\ViewsWebConfig.txt" />
|
<Content Include="CodeGenerationTemplates\ViewsWebConfig.txt" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -8,10 +8,9 @@ namespace Orchard.Comments {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Comments"), "3",
|
builder.Add(T("Comments"), "10",
|
||||||
menu => menu
|
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Comments" })
|
||||||
.Add(T("Manage Comments"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Comments" }).Permission(Permissions.ManageComments))
|
.Permission(Permissions.ManageComments)));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System.Reflection;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Orchard.Comments.Models;
|
using Orchard.Comments.Models;
|
||||||
|
using Orchard.ContentManagement;
|
||||||
using Orchard.DisplayManagement;
|
using Orchard.DisplayManagement;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
@@ -42,7 +43,7 @@ namespace Orchard.Comments.Controllers {
|
|||||||
options = new CommentIndexOptions();
|
options = new CommentIndexOptions();
|
||||||
|
|
||||||
// Filtering
|
// Filtering
|
||||||
IEnumerable<CommentPart> comments;
|
IContentQuery<CommentPart, CommentPartRecord> comments;
|
||||||
try {
|
try {
|
||||||
switch (options.Filter) {
|
switch (options.Filter) {
|
||||||
case CommentIndexFilter.All:
|
case CommentIndexFilter.All:
|
||||||
@@ -60,13 +61,16 @@ namespace Orchard.Comments.Controllers {
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
var entries = comments.Skip(pager.GetStartIndex()).Take(pager.PageSize).Select(comment => CreateCommentEntry(comment.Record)).ToList();
|
|
||||||
|
|
||||||
var hasNextPage = comments.Skip(pager.GetStartIndex(pager.Page + 1)).Any();
|
var pagerShape = Shape.Pager(pager).TotalItemCount(comments.Count());
|
||||||
var pagerShape = Shape.Pager(pager).HasNextPage(hasNextPage);
|
var entries = comments
|
||||||
|
.OrderByDescending<CommentPartRecord, DateTime?>(cpr => cpr.CommentDateUtc)
|
||||||
|
.Slice(pager.GetStartIndex(), pager.PageSize)
|
||||||
|
.ToList()
|
||||||
|
.Select(comment => CreateCommentEntry(comment.Record));
|
||||||
|
|
||||||
var model = new CommentsIndexViewModel {
|
var model = new CommentsIndexViewModel {
|
||||||
Comments = entries,
|
Comments = entries.ToList(),
|
||||||
Options = options,
|
Options = options,
|
||||||
Pager = pagerShape
|
Pager = pagerShape
|
||||||
};
|
};
|
||||||
@@ -97,12 +101,12 @@ namespace Orchard.Comments.Controllers {
|
|||||||
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CommentIndexBulkAction.Pend:
|
case CommentIndexBulkAction.Unapprove:
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
//TODO: Transaction
|
//TODO: Transaction
|
||||||
foreach (CommentEntry entry in checkedEntries) {
|
foreach (CommentEntry entry in checkedEntries) {
|
||||||
_commentService.PendComment(entry.Comment.Id);
|
_commentService.UnapproveComment(entry.Comment.Id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CommentIndexBulkAction.Approve:
|
case CommentIndexBulkAction.Approve:
|
||||||
@@ -140,7 +144,7 @@ namespace Orchard.Comments.Controllers {
|
|||||||
options = new CommentDetailsOptions();
|
options = new CommentDetailsOptions();
|
||||||
|
|
||||||
// Filtering
|
// Filtering
|
||||||
IEnumerable<CommentPart> comments;
|
IContentQuery<CommentPart, CommentPartRecord> comments;
|
||||||
try {
|
try {
|
||||||
switch (options.Filter) {
|
switch (options.Filter) {
|
||||||
case CommentDetailsFilter.All:
|
case CommentDetailsFilter.All:
|
||||||
@@ -158,7 +162,7 @@ namespace Orchard.Comments.Controllers {
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
var entries = comments.Select(comment => CreateCommentEntry(comment.Record)).ToList();
|
var entries = comments.List().Select(comment => CreateCommentEntry(comment.Record)).ToList();
|
||||||
var model = new CommentsDetailsViewModel {
|
var model = new CommentsDetailsViewModel {
|
||||||
Comments = entries,
|
Comments = entries,
|
||||||
Options = options,
|
Options = options,
|
||||||
@@ -193,12 +197,12 @@ namespace Orchard.Comments.Controllers {
|
|||||||
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CommentDetailsBulkAction.Pend:
|
case CommentDetailsBulkAction.Unapprove:
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
foreach (CommentEntry entry in checkedEntries) {
|
foreach (CommentEntry entry in checkedEntries) {
|
||||||
_commentService.PendComment(entry.Comment.Id);
|
_commentService.UnapproveComment(entry.Comment.Id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CommentDetailsBulkAction.Approve:
|
case CommentDetailsBulkAction.Approve:
|
||||||
@@ -307,6 +311,75 @@ namespace Orchard.Comments.Controllers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Approve(int id, string returnUrl) {
|
||||||
|
try {
|
||||||
|
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't approve comment")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
int commentedOn = _commentService.GetComment(id).Record.CommentedOn;
|
||||||
|
_commentService.ApproveComment(id);
|
||||||
|
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Details", new { id = commentedOn });
|
||||||
|
}
|
||||||
|
catch (Exception exception) {
|
||||||
|
Services.Notifier.Error(T("Approving comment failed: " + exception.Message));
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Unapprove(int id, string returnUrl) {
|
||||||
|
try {
|
||||||
|
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't unapprove comment")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
int commentedOn = _commentService.GetComment(id).Record.CommentedOn;
|
||||||
|
_commentService.UnapproveComment(id);
|
||||||
|
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Details", new { id = commentedOn });
|
||||||
|
}
|
||||||
|
catch (Exception exception) {
|
||||||
|
Services.Notifier.Error(T("Unapproving comment failed: " + exception.Message));
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult MarkAsSpam(int id, string returnUrl) {
|
||||||
|
try {
|
||||||
|
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't mark comment as spam")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
int commentedOn = _commentService.GetComment(id).Record.CommentedOn;
|
||||||
|
_commentService.MarkCommentAsSpam(id);
|
||||||
|
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Details", new { id = commentedOn });
|
||||||
|
}
|
||||||
|
catch (Exception exception) {
|
||||||
|
Services.Notifier.Error(T("Marking comment as spam failed: " + exception.Message));
|
||||||
|
if (!String.IsNullOrEmpty(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
}
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult Delete(int id, string returnUrl) {
|
public ActionResult Delete(int id, string returnUrl) {
|
||||||
try {
|
try {
|
||||||
@@ -333,7 +406,7 @@ namespace Orchard.Comments.Controllers {
|
|||||||
private CommentEntry CreateCommentEntry(CommentPartRecord commentPart) {
|
private CommentEntry CreateCommentEntry(CommentPartRecord commentPart) {
|
||||||
return new CommentEntry {
|
return new CommentEntry {
|
||||||
Comment = commentPart,
|
Comment = commentPart,
|
||||||
CommentedOn = _commentService.GetDisplayForCommentedContent(commentPart.CommentedOn).DisplayText,
|
CommentedOn = _commentService.GetCommentedContent(commentPart.CommentedOn),
|
||||||
IsChecked = false,
|
IsChecked = false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ namespace Orchard.Comments.Handlers {
|
|||||||
|
|
||||||
OnRemoved<CommentsPart>(
|
OnRemoved<CommentsPart>(
|
||||||
(context, c) => {
|
(context, c) => {
|
||||||
foreach (var comment in commentService.GetCommentsForCommentedContent(context.ContentItem.Id)) {
|
var comments = commentService.GetCommentsForCommentedContent(context.ContentItem.Id).List();
|
||||||
|
foreach (var comment in comments) {
|
||||||
contentManager.Remove(comment.ContentItem);
|
contentManager.Remove(comment.ContentItem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -110,8 +110,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
|
<Content Include="Styles\admin.css" />
|
||||||
<Content Include="Views\Admin\Details.cshtml" />
|
<Content Include="Views\Admin\Details.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -139,6 +139,7 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.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.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Orchard.Comments.Drivers;
|
|
||||||
using Orchard.Comments.Models;
|
using Orchard.Comments.Models;
|
||||||
using Orchard.ContentManagement.Aspects;
|
using Orchard.ContentManagement.Aspects;
|
||||||
using Orchard.Data;
|
using Orchard.Data;
|
||||||
@@ -32,32 +30,28 @@ namespace Orchard.Comments.Services {
|
|||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
protected virtual IUser CurrentUser { get; [UsedImplicitly] private set; }
|
protected virtual IUser CurrentUser { get; [UsedImplicitly] private set; }
|
||||||
|
|
||||||
public IEnumerable<CommentPart> GetComments() {
|
public IContentQuery<CommentPart, CommentPartRecord> GetComments() {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<CommentPart, CommentPartRecord>()
|
.Query<CommentPart, CommentPartRecord>();
|
||||||
.List();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<CommentPart> GetComments(CommentStatus status) {
|
public IContentQuery<CommentPart, CommentPartRecord> GetComments(CommentStatus status) {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<CommentPart, CommentPartRecord>()
|
.Query<CommentPart, CommentPartRecord>()
|
||||||
.Where(c => c.Status == status)
|
.Where(c => c.Status == status);
|
||||||
.List();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<CommentPart> GetCommentsForCommentedContent(int id) {
|
public IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id) {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<CommentPart, CommentPartRecord>()
|
.Query<CommentPart, CommentPartRecord>()
|
||||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id);
|
||||||
.List();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<CommentPart> GetCommentsForCommentedContent(int id, CommentStatus status) {
|
public IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id, CommentStatus status) {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<CommentPart, CommentPartRecord>()
|
.Query<CommentPart, CommentPartRecord>()
|
||||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
||||||
.Where(ctx => ctx.Status == status)
|
.Where(ctx => ctx.Status == status);
|
||||||
.List();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CommentPart GetComment(int id) {
|
public CommentPart GetComment(int id) {
|
||||||
@@ -71,6 +65,10 @@ namespace Orchard.Comments.Services {
|
|||||||
return _contentManager.GetItemMetadata(content);
|
return _contentManager.GetItemMetadata(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ContentItem GetCommentedContent(int id) {
|
||||||
|
return _contentManager.Get(id);
|
||||||
|
}
|
||||||
|
|
||||||
public CommentPart CreateComment(CreateCommentContext context, bool moderateComments) {
|
public CommentPart CreateComment(CreateCommentContext context, bool moderateComments) {
|
||||||
var comment = _contentManager.Create<CommentPart>("Comment");
|
var comment = _contentManager.Create<CommentPart>("Comment");
|
||||||
|
|
||||||
@@ -110,7 +108,7 @@ namespace Orchard.Comments.Services {
|
|||||||
commentPart.Record.Status = CommentStatus.Approved;
|
commentPart.Record.Status = CommentStatus.Approved;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PendComment(int commentId) {
|
public void UnapproveComment(int commentId) {
|
||||||
CommentPart commentPart = GetComment(commentId);
|
CommentPart commentPart = GetComment(commentId);
|
||||||
commentPart.Record.Status = CommentStatus.Pending;
|
commentPart.Record.Status = CommentStatus.Pending;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Orchard.Comments.Models;
|
using Orchard.Comments.Models;
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
|
|
||||||
namespace Orchard.Comments.Services {
|
namespace Orchard.Comments.Services {
|
||||||
public interface ICommentService : IDependency {
|
public interface ICommentService : IDependency {
|
||||||
IEnumerable<CommentPart> GetComments();
|
IContentQuery<CommentPart, CommentPartRecord> GetComments();
|
||||||
IEnumerable<CommentPart> GetComments(CommentStatus status);
|
IContentQuery<CommentPart, CommentPartRecord> GetComments(CommentStatus status);
|
||||||
IEnumerable<CommentPart> GetCommentsForCommentedContent(int id);
|
IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id);
|
||||||
IEnumerable<CommentPart> GetCommentsForCommentedContent(int id, CommentStatus status);
|
IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id, CommentStatus status);
|
||||||
CommentPart GetComment(int id);
|
CommentPart GetComment(int id);
|
||||||
ContentItemMetadata GetDisplayForCommentedContent(int id);
|
ContentItemMetadata GetDisplayForCommentedContent(int id);
|
||||||
|
ContentItem GetCommentedContent(int id);
|
||||||
CommentPart CreateComment(CreateCommentContext commentRecord, bool moderateComments);
|
CommentPart CreateComment(CreateCommentContext commentRecord, bool moderateComments);
|
||||||
void UpdateComment(int id, string name, string email, string siteName, string commentText, CommentStatus status);
|
void UpdateComment(int id, string name, string email, string siteName, string commentText, CommentStatus status);
|
||||||
void ApproveComment(int commentId);
|
void ApproveComment(int commentId);
|
||||||
void PendComment(int commentId);
|
void UnapproveComment(int commentId);
|
||||||
void MarkCommentAsSpam(int commentId);
|
void MarkCommentAsSpam(int commentId);
|
||||||
void DeleteComment(int commentId);
|
void DeleteComment(int commentId);
|
||||||
bool CommentsClosedForCommentedContent(int id);
|
bool CommentsClosedForCommentedContent(int id);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
table.items .actions {
|
||||||
|
white-space:nowrap;
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ namespace Orchard.Comments.ViewModels {
|
|||||||
|
|
||||||
public enum CommentDetailsBulkAction {
|
public enum CommentDetailsBulkAction {
|
||||||
None,
|
None,
|
||||||
Pend,
|
Unapprove,
|
||||||
Approve,
|
Approve,
|
||||||
MarkAsSpam,
|
MarkAsSpam,
|
||||||
Delete,
|
Delete,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Orchard.Comments.Models;
|
using Orchard.Comments.Models;
|
||||||
|
using Orchard.ContentManagement;
|
||||||
|
|
||||||
namespace Orchard.Comments.ViewModels {
|
namespace Orchard.Comments.ViewModels {
|
||||||
public class CommentsIndexViewModel {
|
public class CommentsIndexViewModel {
|
||||||
@@ -10,7 +11,7 @@ namespace Orchard.Comments.ViewModels {
|
|||||||
|
|
||||||
public class CommentEntry {
|
public class CommentEntry {
|
||||||
public CommentPartRecord Comment { get; set; }
|
public CommentPartRecord Comment { get; set; }
|
||||||
public string CommentedOn { get; set; }
|
public ContentItem CommentedOn { get; set; }
|
||||||
public bool IsChecked { get; set; }
|
public bool IsChecked { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ namespace Orchard.Comments.ViewModels {
|
|||||||
|
|
||||||
public enum CommentIndexBulkAction {
|
public enum CommentIndexBulkAction {
|
||||||
None,
|
None,
|
||||||
Pend,
|
Unapprove,
|
||||||
Approve,
|
Approve,
|
||||||
MarkAsSpam,
|
MarkAsSpam,
|
||||||
Delete
|
Delete
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
@model Orchard.Comments.ViewModels.CommentsIndexViewModel
|
@model Orchard.Comments.ViewModels.CommentsIndexViewModel
|
||||||
@using Orchard.Comments.Models;
|
@using Orchard.Comments.Models;
|
||||||
@using Orchard.Comments.ViewModels;
|
@using Orchard.Comments.ViewModels;
|
||||||
|
@using Orchard.Mvc.Html;
|
||||||
|
@using Orchard.Utility.Extensions;
|
||||||
|
@{
|
||||||
|
Style.Include("admin.css");
|
||||||
|
Script.Require("ShapesBase");
|
||||||
|
}
|
||||||
<h1>@Html.TitleForPage(T("Manage Comments").ToString())</h1>
|
<h1>@Html.TitleForPage(T("Manage Comments").ToString())</h1>
|
||||||
@using(Html.BeginFormAntiForgeryPost()) {
|
@using(Html.BeginFormAntiForgeryPost()) {
|
||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
@@ -10,7 +15,7 @@
|
|||||||
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
||||||
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, T("Choose action...").ToString())
|
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, T("Choose action...").ToString())
|
||||||
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Approve, T("Approve").ToString())
|
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Approve, T("Approve").ToString())
|
||||||
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Pend, T("Pend").ToString())
|
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Unapprove, T("Unapprove").ToString())
|
||||||
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, T("Mark as Spam").ToString())
|
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, T("Mark as Spam").ToString())
|
||||||
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, T("Remove").ToString())
|
@Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, T("Remove").ToString())
|
||||||
</select>
|
</select>
|
||||||
@@ -35,7 +40,6 @@
|
|||||||
<col id="Col4" />
|
<col id="Col4" />
|
||||||
<col id="Col5" />
|
<col id="Col5" />
|
||||||
<col id="Col6" />
|
<col id="Col6" />
|
||||||
<col id="Col7" />
|
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -43,39 +47,38 @@
|
|||||||
<th scope="col">@T("Status")</th>
|
<th scope="col">@T("Status")</th>
|
||||||
<th scope="col">@T("Author")</th>
|
<th scope="col">@T("Author")</th>
|
||||||
<th scope="col">@T("Comment")</th>
|
<th scope="col">@T("Comment")</th>
|
||||||
<th scope="col">@T("Date")</th>
|
|
||||||
<th scope="col">@T("Commented On")</th>
|
<th scope="col">@T("Commented On")</th>
|
||||||
<th scope="col"></th>
|
<th scope="col">@T("Actions")</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@{var commentIndex = 0;}
|
@{var commentIndex = 0;}
|
||||||
@foreach (var commentEntry in Model.Comments) {
|
@foreach (var commentEntry in Model.Comments) {
|
||||||
<tr>
|
<tr itemscope="itemscope" itemid="@Model.Comments[commentIndex].Comment.Id" itemtype="http://orchardproject.net/data/Comment">
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" value="@Model.Comments[commentIndex].Comment.Id" name="@Html.NameOf(m => m.Comments[commentIndex].Comment.Id)"/>
|
<input type="hidden" value="@Model.Comments[commentIndex].Comment.Id" name="@Html.NameOf(m => m.Comments[commentIndex].Comment.Id)"/>
|
||||||
<input type="checkbox" value="true" name="@Html.NameOf(m => m.Comments[commentIndex].IsChecked)"/>
|
<input type="checkbox" value="true" name="@Html.NameOf(m => m.Comments[commentIndex].IsChecked)"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (commentEntry.Comment.Status == CommentStatus.Spam) { T("Spam"); }
|
@if (commentEntry.Comment.Status == CommentStatus.Spam) { @T("Spam") }
|
||||||
else if (commentEntry.Comment.Status == CommentStatus.Pending) { T("Pending"); }
|
else if (commentEntry.Comment.Status == CommentStatus.Pending) { @T("Pending") }
|
||||||
else { T("Approved"); }</td>
|
else { @T("Approved") }
|
||||||
|
</td>
|
||||||
<td>@commentEntry.Comment.UserName</td>
|
<td>@commentEntry.Comment.UserName</td>
|
||||||
<td>
|
<td>
|
||||||
@if (commentEntry.Comment.CommentText != null) {
|
@* would ideally have permalinks for individual comments *@
|
||||||
var text = commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : (commentEntry.Comment.CommentText + T(" ..."));
|
<p><a href="@Url.ItemDisplayUrl(commentEntry.CommentedOn)#comments"><time>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</time></a></p>
|
||||||
@text
|
@if (commentEntry.Comment.CommentText != null) {
|
||||||
}
|
var ellipsized = Html.Ellipsize(commentEntry.Comment.CommentText, 500);
|
||||||
|
var paragraphed = new HtmlString(ellipsized.ToHtmlString().Replace("\r\n", "</p><p>"));
|
||||||
|
<p>@paragraphed</p>
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@T("[Empty]")
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</td>
|
<td>@Html.ItemDisplayLink(commentEntry.CommentedOn)</td>
|
||||||
<td>@Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn })</td>
|
|
||||||
<td>
|
<td>
|
||||||
<ul class="actions">
|
<div class="actions">
|
||||||
<li class="construct">
|
|
||||||
<a href="@Url.Action("Edit", new {commentEntry.Comment.Id})" title="@T("Edit")">@T("Edit")</a>
|
|
||||||
</li>
|
|
||||||
<li class="destruct"></li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
@if (commentEntry.Comment.Status != CommentStatus.Spam) {
|
@if (commentEntry.Comment.Status != CommentStatus.Spam) {
|
||||||
<a href="@Url.Action("MarkAsSpam", new {commentEntry.Comment.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Spam")</a>@T(" | ")
|
<a href="@Url.Action("MarkAsSpam", new {commentEntry.Comment.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Spam")</a>@T(" | ")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -54,7 +54,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Drivers\ContentQueryPartDriver.cs" />
|
<Compile Include="Drivers\ContentQueryPartDriver.cs" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -10,7 +10,7 @@ namespace Orchard.ContentTypes {
|
|||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
|
|
||||||
builder.Add(T("Content"), "2",
|
builder.Add(T("Content"), "2",
|
||||||
menu => menu.Add(T("Manage Content Types"), "1.1", item => item.Action("Index", "Admin", new { area = "Orchard.ContentTypes" })));
|
menu => menu.Add(T("Content Types"), "3", item => item.Action("Index", "Admin", new {area = "Orchard.ContentTypes"})));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,13 +117,6 @@
|
|||||||
<Content Include="Views\EditorTemplates\TypePart.cshtml" />
|
<Content Include="Views\EditorTemplates\TypePart.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\TypeParts.cshtml" />
|
<Content Include="Views\EditorTemplates\TypeParts.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Settings.cshtml" />
|
<Content Include="Views\EditorTemplates\Settings.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Web.Debug.config">
|
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Web.Release.config">
|
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ namespace Orchard.ContentTypes.Services {
|
|||||||
|
|
||||||
var contentTypeDefinition = new ContentTypeDefinition(name, typeViewModel.DisplayName);
|
var contentTypeDefinition = new ContentTypeDefinition(name, typeViewModel.DisplayName);
|
||||||
_contentDefinitionManager.StoreTypeDefinition(contentTypeDefinition);
|
_contentDefinitionManager.StoreTypeDefinition(contentTypeDefinition);
|
||||||
_contentDefinitionManager.AlterTypeDefinition(name, cfg => cfg.Creatable());
|
_contentDefinitionManager.AlterTypeDefinition(name,
|
||||||
|
cfg => cfg.Creatable().Draftable());
|
||||||
|
|
||||||
return new EditTypeViewModel(contentTypeDefinition);
|
return new EditTypeViewModel(contentTypeDefinition);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
|
||||||
|
|
||||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
|
||||||
<!--
|
|
||||||
In the example below, the "SetAttributes" transform will change the value of
|
|
||||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
|
||||||
finds an atrribute "name" that has a value of "MyDB".
|
|
||||||
|
|
||||||
<connectionStrings>
|
|
||||||
<add name="MyDB"
|
|
||||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
|
||||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
|
||||||
</connectionStrings>
|
|
||||||
-->
|
|
||||||
<system.web>
|
|
||||||
<!--
|
|
||||||
In the example below, the "Replace" transform will replace the entire
|
|
||||||
<customErrors> section of your web.config file.
|
|
||||||
Note that because there is only one customErrors section under the
|
|
||||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
|
||||||
|
|
||||||
<customErrors defaultRedirect="GenericError.htm"
|
|
||||||
mode="RemoteOnly" xdt:Transform="Replace">
|
|
||||||
<error statusCode="500" redirect="InternalError.htm"/>
|
|
||||||
</customErrors>
|
|
||||||
-->
|
|
||||||
</system.web>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
|
||||||
|
|
||||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
|
||||||
<!--
|
|
||||||
In the example below, the "SetAttributes" transform will change the value of
|
|
||||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
|
||||||
finds an atrribute "name" that has a value of "MyDB".
|
|
||||||
|
|
||||||
<connectionStrings>
|
|
||||||
<add name="MyDB"
|
|
||||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
|
||||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
|
||||||
</connectionStrings>
|
|
||||||
-->
|
|
||||||
<system.web>
|
|
||||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
|
||||||
<!--
|
|
||||||
In the example below, the "Replace" transform will replace the entire
|
|
||||||
<customErrors> section of your web.config file.
|
|
||||||
Note that because there is only one customErrors section under the
|
|
||||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
|
||||||
|
|
||||||
<customErrors defaultRedirect="GenericError.htm"
|
|
||||||
mode="RemoteOnly" xdt:Transform="Replace">
|
|
||||||
<error statusCode="500" redirect="InternalError.htm"/>
|
|
||||||
</customErrors>
|
|
||||||
-->
|
|
||||||
</system.web>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -99,7 +98,7 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Placement.info" />
|
<Content Include="Placement.info" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
</configuration>
|
|
||||||
@@ -8,10 +8,8 @@ namespace Orchard.Experimental {
|
|||||||
public Localizer T { get; set; }
|
public Localizer T { get; set; }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Site Configuration"), "11",
|
builder.Add(T("Configuration"), "50",
|
||||||
menu => menu
|
menu => menu.Add(T("Experimental"), "50", item => item.Action("Index", "Home", new { area = "Orchard.Experimental" })));
|
||||||
.Add(T("Experimental"), "10.0", item => item.Action("Index", "Home", new { area = "Orchard.Experimental" })
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,6 @@
|
|||||||
<Content Include="Views\Home\Simple.cshtml" />
|
<Content Include="Views\Home\Simple.cshtml" />
|
||||||
<Content Include="Views\Home\_RenderableAction.cshtml" />
|
<Content Include="Views\Home\_RenderableAction.cshtml" />
|
||||||
<Content Include="Views\Metadata\Index.cshtml" />
|
<Content Include="Views\Metadata\Index.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -7,10 +7,9 @@ namespace Orchard.Indexing {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Site Configuration"), "11",
|
builder.Add(T("Configuration"), "50",
|
||||||
menu => menu
|
menu => menu.Add(T("Search Index"), "15", item => item.Action("Index", "Admin", new {area = "Orchard.Indexing"})
|
||||||
.Add(T("Search Index"), "10.0", item => item.Action("Index", "Admin", new {area = "Orchard.Indexing"})
|
.Permission(Permissions.ManageSearchIndex)));
|
||||||
.Permission(Permissions.ManageSearchIndex)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AdminMenu.cs" />
|
<Compile Include="AdminMenu.cs" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -8,10 +8,9 @@ namespace Orchard.Media {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Media"), "4",
|
builder.Add(T("Media"), "6",
|
||||||
menu => menu
|
menu => menu.Add(T("Media"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Media" })
|
||||||
.Add(T("Manage Media"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Media" }).Permission(Permissions.ManageMediaFiles))
|
.Permission(Permissions.ManageMediaFiles)));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,6 @@
|
|||||||
<Content Include="Content\Admin\images\folder.gif" />
|
<Content Include="Content\Admin\images\folder.gif" />
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Styles\admin.css" />
|
<Content Include="Styles\admin.css" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Content\Site.css" />
|
<Content Include="Content\Site.css" />
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -7,9 +7,8 @@ namespace Orchard.Migrations {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Developer"), "10",
|
builder.Add(T("Developer"), "1",
|
||||||
menu => menu
|
menu => menu.Add(T("Migration"), "1.0", item => item.Action("Index", "DatabaseUpdate", new { area = "Orchard.Migrations" })));
|
||||||
.Add(T("Migration"), "1.0", item => item.Action("Index", "DatabaseUpdate", new { area = "Orchard.Migrations" })));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Views\DatabaseUpdate\Index.cshtml" />
|
<Content Include="Views\DatabaseUpdate\Index.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -8,12 +8,12 @@ namespace Orchard.Modules {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Site Configuration"), "11",
|
builder.Add(T("Configuration"), "50",
|
||||||
menu => menu
|
menu => menu
|
||||||
.Add(T("Features"), "5.0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" })
|
.Add(T("Features"), "0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" })
|
||||||
.Permission(Permissions.ManageFeatures))
|
.Permission(Permissions.ManageFeatures))
|
||||||
.Add(T("Modules"), "5.1", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" })
|
.Add(T("Modules"), "5", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" })
|
||||||
.Permission(Permissions.ManageModules)));
|
.Permission(Permissions.ManageModules)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,6 @@
|
|||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Views\Admin\Add.cshtml" />
|
<Content Include="Views\Admin\Add.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -18,10 +18,9 @@ namespace Orchard.MultiTenancy {
|
|||||||
if ( _shellSettings.Name != "Default" )
|
if ( _shellSettings.Name != "Default" )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
builder.Add(T("Tenants"), "22",
|
builder.Add(T("Tenants"), "100",
|
||||||
menu => menu
|
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.MultiTenancy" })
|
||||||
.Add(T("Manage Tenants"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.MultiTenancy" }).Permission(Permissions.ManageTenants))
|
.Permission(Permissions.ManageTenants)));
|
||||||
.Add(T("Add New Tenant"), "1.1", item => item.Action("Add", "Admin", new { area = "Orchard.MultiTenancy" }).Permission(Permissions.ManageTenants)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,6 @@
|
|||||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForInvalid.cshtml" />
|
<Content Include="Views\Admin\DisplayTemplates\ActionsForInvalid.cshtml" />
|
||||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForRunning.cshtml" />
|
<Content Include="Views\Admin\DisplayTemplates\ActionsForRunning.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -10,12 +10,12 @@ namespace Orchard.Packaging {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Gallery"), "5", menu => menu
|
builder.Add(T("Gallery"), "30", menu => menu
|
||||||
.Add(T("Browse Modules"), "1.0", item => item
|
.Add(T("Modules"), "1.0", item => item
|
||||||
.Action("ModulesIndex", "Gallery", new { area = "Orchard.Packaging" }))
|
.Action("ModulesIndex", "Gallery", new { area = "Orchard.Packaging" }))
|
||||||
.Add(T("Browse Themes"), "2.0", item => item
|
.Add(T("Themes"), "2.0", item => item
|
||||||
.Action("ThemesIndex", "Gallery", new { area = "Orchard.Packaging" }))
|
.Action("ThemesIndex", "Gallery", new { area = "Orchard.Packaging" }))
|
||||||
.Add(T("Gallery Feeds"), "3.0", item => item
|
.Add(T("Feeds"), "3.0", item => item
|
||||||
.Action("Sources", "Gallery", new { area = "Orchard.Packaging" })));
|
.Action("Sources", "Gallery", new { area = "Orchard.Packaging" })));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,9 +118,6 @@
|
|||||||
<Name>Orchard.Framework</Name>
|
<Name>Orchard.Framework</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Gallery\Themes.cshtml" />
|
<Content Include="Views\Gallery\Themes.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ namespace Orchard.Roles {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Users"), "9",
|
builder.Add(T("Users"), "40",
|
||||||
menu => menu
|
menu => menu.Add(T("Roles"), "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Roles" })
|
||||||
.Add(T("Manage Roles"), "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Roles" }).Permission(Permissions.ManageRoles)));
|
.Permission(Permissions.ManageRoles)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,6 @@
|
|||||||
<Content Include="Views\Admin\Edit.cshtml" />
|
<Content Include="Views\Admin\Edit.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
<Content Include="Views\EditorTemplates\Parts\Roles.UserRoles.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Roles.UserRoles.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Content\Site.css" />
|
<Content Include="Content\Site.css" />
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -66,8 +66,7 @@ namespace Orchard.Search.Controllers {
|
|||||||
list.Add(_contentManager.BuildDisplay(contentItem, "Summary"));
|
list.Add(_contentManager.BuildDisplay(contentItem, "Summary"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasNextPage = searchHits.TotalPageCount > pager.Page;
|
var pagerShape = Shape.Pager(pager).TotalItemCount(searchHits.TotalItemCount);
|
||||||
var pagerShape = Shape.Pager(pager).HasNextPage(hasNextPage);
|
|
||||||
|
|
||||||
var searchViewModel = new SearchViewModel {
|
var searchViewModel = new SearchViewModel {
|
||||||
Query = q,
|
Query = q,
|
||||||
|
|||||||
@@ -96,9 +96,6 @@
|
|||||||
<Content Include="Styles\search.css" />
|
<Content Include="Styles\search.css" />
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
||||||
<Content Include="Views\Search\Index.cshtml" />
|
<Content Include="Views\Search\Index.cshtml" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -87,7 +87,6 @@
|
|||||||
<Content Include="Views\Setup\Index.cshtml">
|
<Content Include="Views\Setup\Index.cshtml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Web.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<compilation debug="true" targetFramework="4.0">
|
|
||||||
<assemblies>
|
|
||||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
|
||||||
</assemblies>
|
|
||||||
</compilation>
|
|
||||||
|
|
||||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
|
||||||
<namespaces>
|
|
||||||
<add namespace="System.Web.Mvc"/>
|
|
||||||
<add namespace="System.Web.Mvc.Ajax"/>
|
|
||||||
<add namespace="System.Web.Mvc.Html"/>
|
|
||||||
<add namespace="System.Web.Routing"/>
|
|
||||||
<add namespace="System.Linq"/>
|
|
||||||
<add namespace="System.Collections.Generic"/>
|
|
||||||
<add namespace="Orchard.Mvc.Html"/>
|
|
||||||
</namespaces>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
<system.web.extensions/>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -7,10 +7,9 @@ namespace Orchard.Tags {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder.Add(T("Tags"), "3",
|
builder.Add(T("Tags"), "20",
|
||||||
menu => menu
|
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Tags" })
|
||||||
.Add(T("Manage Tags"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Tags" }).Permission(Permissions.ManageTags))
|
.Permission(Permissions.ManageTags)));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Views\Admin\Create.cshtml" />
|
<Content Include="Views\Admin\Create.cshtml" />
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
<Content Include="Views\Admin\Edit.cshtml" />
|
<Content Include="Views\Admin\Edit.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\Index.cshtml" />
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user