mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -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]
|
||||
public void QueryShouldJoinVersionedRecords() {
|
||||
|
@@ -26,6 +26,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
private string _tempFolder;
|
||||
private SchemaBuilder _schemaBuilder;
|
||||
private DefaultDataMigrationInterpreter _interpreter;
|
||||
private ISession _session;
|
||||
|
||||
[SetUp]
|
||||
public void Setup() {
|
||||
@@ -38,7 +39,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
|
||||
var builder = new ContainerBuilder();
|
||||
|
||||
var session = _sessionFactory.OpenSession();
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(appDataFolder).As<IAppDataFolder>();
|
||||
builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>();
|
||||
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>();
|
||||
@@ -46,7 +47,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
builder.RegisterType<DefaultDataMigrationInterpreter>().As<IDataMigrationInterpreter>();
|
||||
builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>();
|
||||
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 ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>();
|
||||
builder.RegisterModule(new DataModule());
|
||||
@@ -133,10 +134,24 @@ namespace Orchard.Tests.DataMigration {
|
||||
.AlterTable("User", table => table
|
||||
.AddColumn("Age", DbType.Int32))
|
||||
.AlterTable("User", table => table
|
||||
.AlterColumn("Lastname", column => column.WithDefault("John")))
|
||||
.AlterColumn("Lastname", column => column.WithDefault("Doe")))
|
||||
.AlterTable("User", table => table
|
||||
.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]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI;
|
||||
|
||||
namespace Orchard.Tests.UI.Navigation {
|
||||
[TestFixture]
|
||||
@@ -10,7 +10,7 @@ namespace Orchard.Tests.UI.Navigation {
|
||||
|
||||
[SetUp]
|
||||
public void Init() {
|
||||
_comparer = new PositionComparer();
|
||||
_comparer = new FlatPositionComparer();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,22 @@ namespace Orchard.Tests.UI.Navigation {
|
||||
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]
|
||||
public void DotsSplitParts() {
|
||||
AssertLess("0500.3", "0500.5");
|
||||
|
@@ -21,14 +21,18 @@ namespace Orchard.Core.Contents {
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
|
||||
|
||||
builder.Add(T("Content"), "2", menu => {
|
||||
menu.Add(T("Manage Content"), "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("Content"), "2",
|
||||
menu => menu.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new {area = "Contents", id = ""})));
|
||||
|
||||
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 cim = _contentManager.GetItemMetadata(ci);
|
||||
var createRouteValues = cim.CreateRouteValues;
|
||||
// review: the display name should be a LocalizedString
|
||||
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;
|
||||
}
|
||||
|
||||
var pageOfContentItems = query.Slice(pager.GetStartIndex(), pager.PageSize).ToList();
|
||||
|
||||
model.Options.SelectedFilter = model.TypeName;
|
||||
model.Options.FilterOptions = GetCreatableTypes()
|
||||
.Select(ctd => new KeyValuePair<string, string>(ctd.Name, ctd.DisplayName))
|
||||
.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();
|
||||
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()
|
||||
.ContentItems(list)
|
||||
.Pager(pagerShape)
|
||||
|
@@ -6,6 +6,9 @@ namespace Orchard.Core.Contents.Extensions {
|
||||
public static ContentTypeDefinitionBuilder Creatable(this ContentTypeDefinitionBuilder builder, bool creatable = true) {
|
||||
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) {
|
||||
return builder.WithSetting("ContentPartSettings.Attachable", attachable.ToString());
|
||||
}
|
||||
|
@@ -1,8 +1,12 @@
|
||||
namespace Orchard.Core.Contents.Settings {
|
||||
public class ContentTypeSettings {
|
||||
/// <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>
|
||||
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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Orchard"), "0",
|
||||
menu => menu.Add(T("Dashboard"), "0", item => item.Action("Index", "Admin", new { area = "Dashboard" }).Permission(StandardPermissions.AccessAdminPanel)));
|
||||
builder.Add(T("Dashboard"), "0",
|
||||
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) {
|
||||
//todo: - add new menu? and list menus? ...and remove hard-coded menu name here
|
||||
builder.Add(T("Navigation"), "8",
|
||||
menu => menu
|
||||
.Add(T("Main Menu"), "6.0", item => item.Action("Index", "Admin", new { area = "Navigation" }).Permission(Permissions.ManageMainMenu)));
|
||||
menu => menu.Add(T("Main Menu"), "0", item => item.Action("Index", "Admin", new { area = "Navigation" })
|
||||
.Permission(Permissions.ManageMainMenu)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ using Orchard.Core.Navigation.ViewModels;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.AntiForgery;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Utility;
|
||||
|
||||
@@ -41,7 +42,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
model = new NavigationManagementViewModel();
|
||||
|
||||
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
|
||||
return View("Index", model);
|
||||
|
@@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -8,8 +8,9 @@ namespace Orchard.Core.Reports {
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11",
|
||||
menu => menu.Add(T("Reports"), "15", item => item.Action("Index", "Admin", new { area = "Reports" }).Permission(StandardPermissions.AccessAdminPanel)));
|
||||
builder.Add(T("Configuration"), "50",
|
||||
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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11",
|
||||
menu => menu
|
||||
.Add(T("Settings"), "10", item => item.Action("Index", "Admin", new { area = "Settings" }).Permission(Permissions.ManageSettings)));
|
||||
builder.Add(T("Configuration"), "50",
|
||||
menu => menu.Add(T("Settings"), "10", item => item.Action("Index", "Admin", new { area = "Settings" })
|
||||
.Permission(Permissions.ManageSettings)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
var queryString = ViewContext.HttpContext.Request.QueryString;
|
||||
if (queryString != null) {
|
||||
foreach (string key in queryString.Keys) {
|
||||
if (!routeData.ContainsKey(key)) {
|
||||
if (key != null && !routeData.ContainsKey(key)) {
|
||||
var value = queryString[key];
|
||||
routeData[key] = queryString[key];
|
||||
}
|
||||
@@ -17,21 +17,23 @@
|
||||
routeData.Remove("id");
|
||||
}
|
||||
|
||||
var hasNextPage = (Model.Page * Model.PageSize) < Model.TotalItemCount;
|
||||
|
||||
Model.Classes.Add("pager");
|
||||
Model.Classes.Add("group");
|
||||
var tag = Tag(Model, "ul");
|
||||
}
|
||||
@if (Model.HasNextPage || Model.Page > 1) {
|
||||
@if (hasNextPage || Model.Page > 1) {
|
||||
@tag.StartElement
|
||||
if(Model.HasNextPage) {
|
||||
if(hasNextPage) {
|
||||
routeData["page"] = Model.Page + 1;
|
||||
<li class="older">
|
||||
<li class="page-next">
|
||||
@Html.ActionLink((string)nextText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
|
||||
</li>
|
||||
}
|
||||
if(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)
|
||||
</li>
|
||||
}
|
||||
|
@@ -80,9 +80,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -16,7 +16,7 @@ namespace Orchard.Blogs {
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Blogs"), "1", BuildMenu);
|
||||
builder.Add(T("Blogs"), "2.5", BuildMenu);
|
||||
}
|
||||
|
||||
private void BuildMenu(NavigationItemBuilder menu) {
|
||||
@@ -24,16 +24,15 @@ namespace Orchard.Blogs {
|
||||
var blogCount = blogs.Count();
|
||||
var singleBlog = blogCount == 1 ? blogs.ElementAt(0) : null;
|
||||
|
||||
if (blogCount > 0 && singleBlog == null)
|
||||
menu.Add(T("Manage Blogs"), "1.0",
|
||||
item =>
|
||||
item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListBlogs));
|
||||
if (blogCount > 0 && singleBlog == null) {
|
||||
menu.Add(T("List"), "3",
|
||||
item => item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListBlogs));
|
||||
}
|
||||
else if (singleBlog != null)
|
||||
menu.Add(T("Manage Blog"), "1.0",
|
||||
item =>
|
||||
item.Action("Item", "BlogAdmin", new {area = "Orchard.Blogs", blogSlug = singleBlog.Slug}).Permission(Permissions.MetaListBlogs));
|
||||
item => 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",
|
||||
item =>
|
||||
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.Localization;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Blogs.Controllers {
|
||||
@@ -27,7 +28,8 @@ namespace Orchard.Blogs.Controllers {
|
||||
IBlogPostService blogPostService,
|
||||
IContentManager contentManager,
|
||||
ITransactionManager transactionManager,
|
||||
IBlogSlugConstraint blogSlugConstraint) {
|
||||
IBlogSlugConstraint blogSlugConstraint,
|
||||
IShapeFactory shapeFactory) {
|
||||
Services = services;
|
||||
_blogService = blogService;
|
||||
_blogPostService = blogPostService;
|
||||
@@ -35,8 +37,10 @@ namespace Orchard.Blogs.Controllers {
|
||||
_transactionManager = transactionManager;
|
||||
_blogSlugConstraint = blogSlugConstraint;
|
||||
T = NullLocalizer.Instance;
|
||||
Shape = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
|
||||
@@ -135,20 +139,25 @@ namespace Orchard.Blogs.Controllers {
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
public ActionResult Item(string blogSlug) {
|
||||
public ActionResult Item(string blogSlug, Pager pager) {
|
||||
BlogPart blogPart = _blogService.Get(blogSlug);
|
||||
|
||||
if (blogPart == null)
|
||||
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");
|
||||
return View(model);
|
||||
var blogPosts = _blogPostService.Get(blogPart, pager.GetStartIndex(), pager.PageSize, VersionOptions.Latest)
|
||||
.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) {
|
||||
|
@@ -74,8 +74,8 @@ namespace Orchard.Blogs.Controllers {
|
||||
list.AddRange(blogPosts);
|
||||
blog.Content.Add(Shape.Parts_Blogs_BlogPost_List(ContentItems: list), "5");
|
||||
|
||||
var hasNextPage = _blogPostService.Get(blogPart, pager.GetStartIndex(pager.Page + 1), 1).Any();
|
||||
blog.Content.Add(Shape.Pager(pager).HasNextPage(hasNextPage), "Content:after");
|
||||
var totalItemCount = _blogPostService.PostCount(blogPart);
|
||||
blog.Content.Add(Shape.Pager(pager).TotalItemCount(totalItemCount), "Content:after");
|
||||
|
||||
return View(blog);
|
||||
}
|
||||
|
@@ -131,11 +131,10 @@
|
||||
<Content Include="Views\Parts\Blogs.Blog.Manage.cshtml" />
|
||||
<Content Include="Views\Parts\Blogs.Blog.Description.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>
|
||||
</Content>
|
||||
<Content Include="Views\Items\Content-Blog.SummaryAdmin.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -49,9 +49,20 @@ namespace Orchard.Blogs.Services {
|
||||
return GetBlogQuery(blogPart, versionOptions).List().Select(ci => ci.As<BlogPostPart>());
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
|
@@ -13,6 +13,9 @@ namespace Orchard.Blogs.Services {
|
||||
IEnumerable<BlogPostPart> Get(BlogPart blogPart, VersionOptions versionOptions);
|
||||
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, VersionOptions versionOptions);
|
||||
int PostCount(BlogPart blogPart);
|
||||
int PostCount(BlogPart blogPart, VersionOptions versionOptions);
|
||||
IEnumerable<KeyValuePair<ArchiveData, int>> GetArchives(BlogPart blogPart);
|
||||
void Delete(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\ModuleWebConfig.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ViewsWebConfig.txt" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
|
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Comments"), "3",
|
||||
menu => menu
|
||||
.Add(T("Manage Comments"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Comments" }).Permission(Permissions.ManageComments))
|
||||
);
|
||||
builder.Add(T("Comments"), "10",
|
||||
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Comments" })
|
||||
.Permission(Permissions.ManageComments)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ using System.Reflection;
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Comments.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
@@ -42,7 +43,7 @@ namespace Orchard.Comments.Controllers {
|
||||
options = new CommentIndexOptions();
|
||||
|
||||
// Filtering
|
||||
IEnumerable<CommentPart> comments;
|
||||
IContentQuery<CommentPart, CommentPartRecord> comments;
|
||||
try {
|
||||
switch (options.Filter) {
|
||||
case CommentIndexFilter.All:
|
||||
@@ -60,13 +61,16 @@ namespace Orchard.Comments.Controllers {
|
||||
default:
|
||||
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).HasNextPage(hasNextPage);
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(comments.Count());
|
||||
var entries = comments
|
||||
.OrderByDescending<CommentPartRecord, DateTime?>(cpr => cpr.CommentDateUtc)
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize)
|
||||
.ToList()
|
||||
.Select(comment => CreateCommentEntry(comment.Record));
|
||||
|
||||
var model = new CommentsIndexViewModel {
|
||||
Comments = entries,
|
||||
Comments = entries.ToList(),
|
||||
Options = options,
|
||||
Pager = pagerShape
|
||||
};
|
||||
@@ -97,12 +101,12 @@ namespace Orchard.Comments.Controllers {
|
||||
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
||||
}
|
||||
break;
|
||||
case CommentIndexBulkAction.Pend:
|
||||
case CommentIndexBulkAction.Unapprove:
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
||||
return new HttpUnauthorizedResult();
|
||||
//TODO: Transaction
|
||||
foreach (CommentEntry entry in checkedEntries) {
|
||||
_commentService.PendComment(entry.Comment.Id);
|
||||
_commentService.UnapproveComment(entry.Comment.Id);
|
||||
}
|
||||
break;
|
||||
case CommentIndexBulkAction.Approve:
|
||||
@@ -140,7 +144,7 @@ namespace Orchard.Comments.Controllers {
|
||||
options = new CommentDetailsOptions();
|
||||
|
||||
// Filtering
|
||||
IEnumerable<CommentPart> comments;
|
||||
IContentQuery<CommentPart, CommentPartRecord> comments;
|
||||
try {
|
||||
switch (options.Filter) {
|
||||
case CommentDetailsFilter.All:
|
||||
@@ -158,7 +162,7 @@ namespace Orchard.Comments.Controllers {
|
||||
default:
|
||||
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 {
|
||||
Comments = entries,
|
||||
Options = options,
|
||||
@@ -193,12 +197,12 @@ namespace Orchard.Comments.Controllers {
|
||||
_commentService.MarkCommentAsSpam(entry.Comment.Id);
|
||||
}
|
||||
break;
|
||||
case CommentDetailsBulkAction.Pend:
|
||||
case CommentDetailsBulkAction.Unapprove:
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageComments, T("Couldn't moderate comment")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
foreach (CommentEntry entry in checkedEntries) {
|
||||
_commentService.PendComment(entry.Comment.Id);
|
||||
_commentService.UnapproveComment(entry.Comment.Id);
|
||||
}
|
||||
break;
|
||||
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]
|
||||
public ActionResult Delete(int id, string returnUrl) {
|
||||
try {
|
||||
@@ -333,7 +406,7 @@ namespace Orchard.Comments.Controllers {
|
||||
private CommentEntry CreateCommentEntry(CommentPartRecord commentPart) {
|
||||
return new CommentEntry {
|
||||
Comment = commentPart,
|
||||
CommentedOn = _commentService.GetDisplayForCommentedContent(commentPart.CommentedOn).DisplayText,
|
||||
CommentedOn = _commentService.GetCommentedContent(commentPart.CommentedOn),
|
||||
IsChecked = false,
|
||||
};
|
||||
}
|
||||
|
@@ -35,7 +35,8 @@ namespace Orchard.Comments.Handlers {
|
||||
|
||||
OnRemoved<CommentsPart>(
|
||||
(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);
|
||||
}
|
||||
});
|
||||
|
@@ -110,8 +110,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Views\Admin\Details.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -139,6 +139,7 @@
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Comments.Drivers;
|
||||
using Orchard.Comments.Models;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Data;
|
||||
@@ -32,32 +30,28 @@ namespace Orchard.Comments.Services {
|
||||
public ILogger Logger { get; set; }
|
||||
protected virtual IUser CurrentUser { get; [UsedImplicitly] private set; }
|
||||
|
||||
public IEnumerable<CommentPart> GetComments() {
|
||||
public IContentQuery<CommentPart, CommentPartRecord> GetComments() {
|
||||
return _contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.List();
|
||||
.Query<CommentPart, CommentPartRecord>();
|
||||
}
|
||||
|
||||
public IEnumerable<CommentPart> GetComments(CommentStatus status) {
|
||||
public IContentQuery<CommentPart, CommentPartRecord> GetComments(CommentStatus status) {
|
||||
return _contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.Status == status)
|
||||
.List();
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.Status == status);
|
||||
}
|
||||
|
||||
public IEnumerable<CommentPart> GetCommentsForCommentedContent(int id) {
|
||||
public IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id) {
|
||||
return _contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
||||
.List();
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id);
|
||||
}
|
||||
|
||||
public IEnumerable<CommentPart> GetCommentsForCommentedContent(int id, CommentStatus status) {
|
||||
public IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id, CommentStatus status) {
|
||||
return _contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
||||
.Where(ctx => ctx.Status == status)
|
||||
.List();
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(c => c.CommentedOn == id || c.CommentedOnContainer == id)
|
||||
.Where(ctx => ctx.Status == status);
|
||||
}
|
||||
|
||||
public CommentPart GetComment(int id) {
|
||||
@@ -71,6 +65,10 @@ namespace Orchard.Comments.Services {
|
||||
return _contentManager.GetItemMetadata(content);
|
||||
}
|
||||
|
||||
public ContentItem GetCommentedContent(int id) {
|
||||
return _contentManager.Get(id);
|
||||
}
|
||||
|
||||
public CommentPart CreateComment(CreateCommentContext context, bool moderateComments) {
|
||||
var comment = _contentManager.Create<CommentPart>("Comment");
|
||||
|
||||
@@ -110,7 +108,7 @@ namespace Orchard.Comments.Services {
|
||||
commentPart.Record.Status = CommentStatus.Approved;
|
||||
}
|
||||
|
||||
public void PendComment(int commentId) {
|
||||
public void UnapproveComment(int commentId) {
|
||||
CommentPart commentPart = GetComment(commentId);
|
||||
commentPart.Record.Status = CommentStatus.Pending;
|
||||
}
|
||||
|
@@ -1,19 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Comments.Models;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Comments.Services {
|
||||
public interface ICommentService : IDependency {
|
||||
IEnumerable<CommentPart> GetComments();
|
||||
IEnumerable<CommentPart> GetComments(CommentStatus status);
|
||||
IEnumerable<CommentPart> GetCommentsForCommentedContent(int id);
|
||||
IEnumerable<CommentPart> GetCommentsForCommentedContent(int id, CommentStatus status);
|
||||
IContentQuery<CommentPart, CommentPartRecord> GetComments();
|
||||
IContentQuery<CommentPart, CommentPartRecord> GetComments(CommentStatus status);
|
||||
IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id);
|
||||
IContentQuery<CommentPart, CommentPartRecord> GetCommentsForCommentedContent(int id, CommentStatus status);
|
||||
CommentPart GetComment(int id);
|
||||
ContentItemMetadata GetDisplayForCommentedContent(int id);
|
||||
ContentItem GetCommentedContent(int id);
|
||||
CommentPart CreateComment(CreateCommentContext commentRecord, bool moderateComments);
|
||||
void UpdateComment(int id, string name, string email, string siteName, string commentText, CommentStatus status);
|
||||
void ApproveComment(int commentId);
|
||||
void PendComment(int commentId);
|
||||
void UnapproveComment(int commentId);
|
||||
void MarkCommentAsSpam(int commentId);
|
||||
void DeleteComment(int commentId);
|
||||
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 {
|
||||
None,
|
||||
Pend,
|
||||
Unapprove,
|
||||
Approve,
|
||||
MarkAsSpam,
|
||||
Delete,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Comments.Models;
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Comments.ViewModels {
|
||||
public class CommentsIndexViewModel {
|
||||
@@ -10,7 +11,7 @@ namespace Orchard.Comments.ViewModels {
|
||||
|
||||
public class CommentEntry {
|
||||
public CommentPartRecord Comment { get; set; }
|
||||
public string CommentedOn { get; set; }
|
||||
public ContentItem CommentedOn { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
}
|
||||
|
||||
@@ -21,7 +22,7 @@ namespace Orchard.Comments.ViewModels {
|
||||
|
||||
public enum CommentIndexBulkAction {
|
||||
None,
|
||||
Pend,
|
||||
Unapprove,
|
||||
Approve,
|
||||
MarkAsSpam,
|
||||
Delete
|
||||
|
@@ -1,7 +1,12 @@
|
||||
@model Orchard.Comments.ViewModels.CommentsIndexViewModel
|
||||
@using Orchard.Comments.Models;
|
||||
@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>
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
@@ -10,7 +15,7 @@
|
||||
<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.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.Delete, T("Remove").ToString())
|
||||
</select>
|
||||
@@ -35,7 +40,6 @@
|
||||
<col id="Col4" />
|
||||
<col id="Col5" />
|
||||
<col id="Col6" />
|
||||
<col id="Col7" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -43,39 +47,38 @@
|
||||
<th scope="col">@T("Status")</th>
|
||||
<th scope="col">@T("Author")</th>
|
||||
<th scope="col">@T("Comment")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col">@T("Commented On")</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">@T("Actions")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@{var commentIndex = 0;}
|
||||
@foreach (var commentEntry in Model.Comments) {
|
||||
<tr>
|
||||
<tr itemscope="itemscope" itemid="@Model.Comments[commentIndex].Comment.Id" itemtype="http://orchardproject.net/data/Comment">
|
||||
<td>
|
||||
<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)"/>
|
||||
</td>
|
||||
<td>
|
||||
@if (commentEntry.Comment.Status == CommentStatus.Spam) { T("Spam"); }
|
||||
else if (commentEntry.Comment.Status == CommentStatus.Pending) { T("Pending"); }
|
||||
else { T("Approved"); }</td>
|
||||
@if (commentEntry.Comment.Status == CommentStatus.Spam) { @T("Spam") }
|
||||
else if (commentEntry.Comment.Status == CommentStatus.Pending) { @T("Pending") }
|
||||
else { @T("Approved") }
|
||||
</td>
|
||||
<td>@commentEntry.Comment.UserName</td>
|
||||
<td>
|
||||
@if (commentEntry.Comment.CommentText != null) {
|
||||
var text = commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : (commentEntry.Comment.CommentText + T(" ..."));
|
||||
@text
|
||||
}
|
||||
@* would ideally have permalinks for individual comments *@
|
||||
<p><a href="@Url.ItemDisplayUrl(commentEntry.CommentedOn)#comments"><time>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</time></a></p>
|
||||
@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>@Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault())</td>
|
||||
<td>@Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn })</td>
|
||||
<td>@Html.ItemDisplayLink(commentEntry.CommentedOn)</td>
|
||||
<td>
|
||||
<ul 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>
|
||||
<div class="actions">
|
||||
@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(" | ")
|
||||
}
|
||||
|
@@ -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>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Drivers\ContentQueryPartDriver.cs" />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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) {
|
||||
|
||||
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\TypeParts.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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -73,7 +73,8 @@ namespace Orchard.ContentTypes.Services {
|
||||
|
||||
var contentTypeDefinition = new ContentTypeDefinition(name, typeViewModel.DisplayName);
|
||||
_contentDefinitionManager.StoreTypeDefinition(contentTypeDefinition);
|
||||
_contentDefinitionManager.AlterTypeDefinition(name, cfg => cfg.Creatable());
|
||||
_contentDefinitionManager.AlterTypeDefinition(name,
|
||||
cfg => cfg.Creatable().Draftable());
|
||||
|
||||
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>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -99,7 +98,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Placement.info" />
|
||||
<Content Include="Placement.info" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11",
|
||||
menu => menu
|
||||
.Add(T("Experimental"), "10.0", item => item.Action("Index", "Home", new { area = "Orchard.Experimental" })
|
||||
));
|
||||
builder.Add(T("Configuration"), "50",
|
||||
menu => menu.Add(T("Experimental"), "50", item => item.Action("Index", "Home", new { area = "Orchard.Experimental" })));
|
||||
}
|
||||
}
|
||||
}
|
@@ -102,7 +102,6 @@
|
||||
<Content Include="Views\Home\Simple.cshtml" />
|
||||
<Content Include="Views\Home\_RenderableAction.cshtml" />
|
||||
<Content Include="Views\Metadata\Index.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11",
|
||||
menu => menu
|
||||
.Add(T("Search Index"), "10.0", item => item.Action("Index", "Admin", new {area = "Orchard.Indexing"})
|
||||
.Permission(Permissions.ManageSearchIndex)));
|
||||
builder.Add(T("Configuration"), "50",
|
||||
menu => menu.Add(T("Search Index"), "15", item => item.Action("Index", "Admin", new {area = "Orchard.Indexing"})
|
||||
.Permission(Permissions.ManageSearchIndex)));
|
||||
}
|
||||
}
|
||||
}
|
@@ -55,7 +55,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Media"), "4",
|
||||
menu => menu
|
||||
.Add(T("Manage Media"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Media" }).Permission(Permissions.ManageMediaFiles))
|
||||
);
|
||||
builder.Add(T("Media"), "6",
|
||||
menu => menu.Add(T("Media"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Media" })
|
||||
.Permission(Permissions.ManageMediaFiles)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -92,7 +92,6 @@
|
||||
<Content Include="Content\Admin\images\folder.gif" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Styles\admin.css" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Developer"), "10",
|
||||
menu => menu
|
||||
.Add(T("Migration"), "1.0", item => item.Action("Index", "DatabaseUpdate", new { area = "Orchard.Migrations" })));
|
||||
builder.Add(T("Developer"), "1",
|
||||
menu => menu.Add(T("Migration"), "1.0", item => item.Action("Index", "DatabaseUpdate", new { area = "Orchard.Migrations" })));
|
||||
}
|
||||
}
|
||||
}
|
@@ -77,7 +77,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\DatabaseUpdate\Index.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11",
|
||||
menu => menu
|
||||
.Add(T("Features"), "5.0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" })
|
||||
.Permission(Permissions.ManageFeatures))
|
||||
.Add(T("Modules"), "5.1", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" })
|
||||
.Permission(Permissions.ManageModules)));
|
||||
builder.Add(T("Configuration"), "50",
|
||||
menu => menu
|
||||
.Add(T("Features"), "0", item => item.Action("Features", "Admin", new { area = "Orchard.Modules" })
|
||||
.Permission(Permissions.ManageFeatures))
|
||||
.Add(T("Modules"), "5", item => item.Action("Index", "Admin", new { area = "Orchard.Modules" })
|
||||
.Permission(Permissions.ManageModules)));
|
||||
}
|
||||
}
|
||||
}
|
@@ -88,7 +88,6 @@
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Admin\Add.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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" )
|
||||
return;
|
||||
|
||||
builder.Add(T("Tenants"), "22",
|
||||
menu => menu
|
||||
.Add(T("Manage Tenants"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.MultiTenancy" }).Permission(Permissions.ManageTenants))
|
||||
.Add(T("Add New Tenant"), "1.1", item => item.Action("Add", "Admin", new { area = "Orchard.MultiTenancy" }).Permission(Permissions.ManageTenants)));
|
||||
builder.Add(T("Tenants"), "100",
|
||||
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.MultiTenancy" })
|
||||
.Permission(Permissions.ManageTenants)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -91,7 +91,6 @@
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForInvalid.cshtml" />
|
||||
<Content Include="Views\Admin\DisplayTemplates\ActionsForRunning.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Gallery"), "5", menu => menu
|
||||
.Add(T("Browse Modules"), "1.0", item => item
|
||||
builder.Add(T("Gallery"), "30", menu => menu
|
||||
.Add(T("Modules"), "1.0", item => item
|
||||
.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" }))
|
||||
.Add(T("Gallery Feeds"), "3.0", item => item
|
||||
.Add(T("Feeds"), "3.0", item => item
|
||||
.Action("Sources", "Gallery", new { area = "Orchard.Packaging" })));
|
||||
}
|
||||
}
|
||||
|
@@ -118,9 +118,6 @@
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Gallery\Themes.cshtml" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -7,9 +7,9 @@ namespace Orchard.Roles {
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Users"), "9",
|
||||
menu => menu
|
||||
.Add(T("Manage Roles"), "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Roles" }).Permission(Permissions.ManageRoles)));
|
||||
builder.Add(T("Users"), "40",
|
||||
menu => menu.Add(T("Roles"), "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Roles" })
|
||||
.Permission(Permissions.ManageRoles)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -95,7 +95,6 @@
|
||||
<Content Include="Views\Admin\Edit.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Roles.UserRoles.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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"));
|
||||
}
|
||||
|
||||
var hasNextPage = searchHits.TotalPageCount > pager.Page;
|
||||
var pagerShape = Shape.Pager(pager).HasNextPage(hasNextPage);
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(searchHits.TotalItemCount);
|
||||
|
||||
var searchViewModel = new SearchViewModel {
|
||||
Query = q,
|
||||
|
@@ -96,9 +96,6 @@
|
||||
<Content Include="Styles\search.css" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts\Search.SiteSettings.cshtml" />
|
||||
<Content Include="Views\Search\Index.cshtml" />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -32,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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 void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Tags"), "3",
|
||||
menu => menu
|
||||
.Add(T("Manage Tags"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Tags" }).Permission(Permissions.ManageTags))
|
||||
);
|
||||
builder.Add(T("Tags"), "20",
|
||||
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Tags" })
|
||||
.Permission(Permissions.ManageTags)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -92,7 +92,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Admin\Create.cshtml" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\Admin\Edit.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
@@ -31,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
@@ -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,10 @@ namespace Orchard.Themes {
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Design"), "10",
|
||||
menu => menu
|
||||
.Add(T("Themes"), "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Themes" })
|
||||
.Permission(Permissions.ManageThemes).Permission(Permissions.ApplyTheme)));
|
||||
builder.Add(T("Themes"), "25",
|
||||
menu => menu.Add(T("List"), "0", item => item.Action("Index", "Admin", new { area = "Orchard.Themes" })
|
||||
.Permission(Permissions.ManageThemes)
|
||||
.Permission(Permissions.ApplyTheme)));
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user