mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Incremental work on Dashboards.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Orchard.Dashboards.Controllers {
|
||||
public class AdminController : Controller {
|
||||
|
||||
public ActionResult Index() {
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Dashboards.Models;
|
||||
using Orchard.Dashboards.ViewModels;
|
||||
|
||||
namespace Orchard.Dashboards.Elements {
|
||||
public class DashboardSiteSettingsPartDriver : ContentPartDriver<DashboardSiteSettingsPart> {
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
public DashboardSiteSettingsPartDriver(IContentManager contentManager) {
|
||||
_contentManager = contentManager;
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(DashboardSiteSettingsPart part, dynamic shapeHelper) {
|
||||
return Editor(part, null, shapeHelper);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(DashboardSiteSettingsPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_DashboardSettings", () => {
|
||||
var viewModel = new DashboardSiteSettingsViewModel {
|
||||
SelectedDashboardId = part.DefaultDashboardId.ToString(),
|
||||
};
|
||||
|
||||
if (updater != null) {
|
||||
if (updater.TryUpdateModel(viewModel, Prefix, null, new[] { "SelectedDashboard" })) {
|
||||
part.DefaultDashboardId = ParseContentId(viewModel.SelectedDashboardId);
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.SelectedDashboard = part.DefaultDashboardId != null ? _contentManager.Get(part.DefaultDashboardId.Value) : default(ContentItem);
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts.DashboardSettings", Model: viewModel, Prefix: Prefix);
|
||||
}).OnGroup("Dashboard");
|
||||
}
|
||||
|
||||
private int? ParseContentId(string value) {
|
||||
if (String.IsNullOrWhiteSpace(value))
|
||||
return null;
|
||||
|
||||
var items = value.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (!items.Any())
|
||||
return null;
|
||||
|
||||
return XmlHelper.Parse<int>(items.First());
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Dashboards.Models;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Dashboards.Handlers {
|
||||
public class DashboardSiteSettingsPartHandler : ContentHandler {
|
||||
public DashboardSiteSettingsPartHandler() {
|
||||
Filters.Add(new ActivatingFilter<DashboardSiteSettingsPart>("Site"));
|
||||
OnGetContentItemMetadata<DashboardSiteSettingsPart>((context, part) => context.Metadata.EditorGroupInfo.Add(new GroupInfo(T("Dashboard"))));
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
}
|
||||
}
|
22
src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs
Normal file
22
src/Orchard.Web/Modules/Orchard.Dashboards/Migrations.cs
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Dashboards.Models {
|
||||
public class DashboardSiteSettingsPart : ContentPart {
|
||||
public int? DefaultDashboardId {
|
||||
get { return this.Retrieve(x => x.DefaultDashboardId); }
|
||||
set { this.Store(x => x.DefaultDashboardId, value); }
|
||||
}
|
||||
}
|
||||
}
|
13
src/Orchard.Web/Modules/Orchard.Dashboards/Module.txt
Normal file
13
src/Orchard.Web/Modules/Orchard.Dashboards/Module.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name: Dashboards
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.0
|
||||
OrchardVersion: 1.9
|
||||
Description: The Dashboards module enables administrators to customize the dashboard screen of the administration UI of the application.
|
||||
Features:
|
||||
Orchard.Dashboards:
|
||||
Name: Dashboards
|
||||
Description: The Dashboards module enables administrators to customize the dashboard screen of the administration UI of the application.
|
||||
Category: Admin
|
||||
Dependencies: Orchard.Layouts, Orchard.ContentPicker
|
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.Dashboards</RootNamespace>
|
||||
<AssemblyName>Orchard.Dashboards</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Placement.info" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\EditorTemplates\Parts.DashboardSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Elements\DashboardSiteSettingsPartDriver.cs" />
|
||||
<Compile Include="Handlers\DashboardSiteSettingsPartHandler.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="ViewModels\DashboardSiteSettingsViewModel.cs" />
|
||||
<Compile Include="Models\DashboardSiteSettingsPart.cs" />
|
||||
<Compile Include="Routes.cs" />
|
||||
<Compile Include="Services\DashboardSelectorResult.cs" />
|
||||
<Compile Include="Services\DefaultDashboardSelector.cs" />
|
||||
<Compile Include="Services\IDashboardSelector.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Drivers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target> -->
|
||||
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>45979</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
@@ -0,0 +1,3 @@
|
||||
<Placement>
|
||||
<Place Parts_DashboardSettings="Content:0" />
|
||||
</Placement>
|
@@ -0,0 +1,37 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Orchard.Dashboards")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("01af036a-6a2f-419c-aa20-1defce2f5b3f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
31
src/Orchard.Web/Modules/Orchard.Dashboards/Routes.cs
Normal file
31
src/Orchard.Web/Modules/Orchard.Dashboards/Routes.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Mvc.Routes;
|
||||
|
||||
namespace Orchard.Dashboards {
|
||||
public class Routes : IRouteProvider {
|
||||
public void GetRoutes(ICollection<RouteDescriptor> routes) {
|
||||
foreach (var routeDescriptor in GetRoutes())
|
||||
routes.Add(routeDescriptor);
|
||||
}
|
||||
|
||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||
yield return new RouteDescriptor {
|
||||
Priority = -4,
|
||||
Route = new Route(
|
||||
"Admin",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.Dashboards"},
|
||||
{"controller", "Admin"},
|
||||
{"action", "Index"}
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.Dashboards"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
@@ -0,0 +1,8 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Dashboards.Services {
|
||||
public class DashboardSelectorResult {
|
||||
public int Priority { get; set; }
|
||||
public IContent Dashboard { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Dashboards.Models;
|
||||
|
||||
namespace Orchard.Dashboards.Services {
|
||||
public class DefaultDashboardSelector : IDashboardSelector {
|
||||
private readonly IOrchardServices _services;
|
||||
public DefaultDashboardSelector(IOrchardServices services) {
|
||||
_services = services;
|
||||
}
|
||||
|
||||
public DashboardSelectorResult GetDashboard() {
|
||||
var settings = _services.WorkContext.CurrentSite.As<DashboardSiteSettingsPart>();
|
||||
var dashboardId = settings.DefaultDashboardId;
|
||||
var dashboard = dashboardId != null ? _services.ContentManager.Get(dashboardId.Value) : default(ContentItem);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
namespace Orchard.Dashboards.Services {
|
||||
public interface IDashboardSelector : IDependency {
|
||||
DashboardSelectorResult GetDashboard();
|
||||
}
|
||||
}
|
16
src/Orchard.Web/Modules/Orchard.Dashboards/Styles/Web.config
Normal file
16
src/Orchard.Web/Modules/Orchard.Dashboards/Styles/Web.config
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
@@ -0,0 +1,8 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Dashboards.ViewModels {
|
||||
public class DashboardSiteSettingsViewModel {
|
||||
public string SelectedDashboardId { get; set; }
|
||||
public ContentItem SelectedDashboard { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
@model dynamic
|
||||
@{ Layout.Title = T("Welcome to my Custom Dashboard").ToString(); }
|
||||
<section class="dashboard group">
|
||||
<div class="help-item">
|
||||
<h2 class="start">@T("Get up and running")</h2>
|
||||
<p>@T("Start by exploring the menu on the left and familiarize yourself with Orchard. As for the basics, we suggest <a href=\"{0}\">changing the theme</a>, <a href=\"{1}\">adding some pages</a>, <a href=\"{2}\">setup up a blog</a>, and <a href=\"{3}\">configuring basic settings</a>.",
|
||||
Url.Action("Index", "Admin", new { area = "Orchard.Themes" }),
|
||||
Url.Action("Create", "Admin", new { area = "Contents", id = "Page" }),
|
||||
Url.Action("Create", "BlogAdmin", new { area = "Orchard.Blogs" }),
|
||||
Url.Action("Index", "Admin", new { area = "Settings", groupInfoId = "Index" }))</p>
|
||||
</div>
|
||||
<div class="help-item">
|
||||
<h2 class="gallery">@T("Get more goodies")</h2>
|
||||
<p>@T("Change the way your site works and looks with <a href=\"{0}\">themes</a> and <a href=\"{1}\">modules</a>. There’s plenty to choose from in the <a href=\"http://gallery.orchardproject.net/\">Orchard Gallery</a>. We’re always adding things, so be sure to check back often to see what’s new.",
|
||||
Url.Action("Themes", "Gallery", new { area = "Orchard.Packaging" }),
|
||||
Url.Action("Modules", "Gallery", new { area = "Orchard.Packaging" }))
|
||||
</p>
|
||||
</div>
|
||||
<div class="help-item">
|
||||
<h2 class="docs">@T("Read the Docs")</h2>
|
||||
<p>@T("Are you ready to go deeper and become an Orchard expert? Take a look at the <a href=\"http://docs.orchardproject.net\">Orchard Documentation</a> to learn about how everything connects together and what makes Orchard tick.")</p>
|
||||
</div>
|
||||
<div class="help-item">
|
||||
<h2 class="friends">@T("Make friends")</h2>
|
||||
<p>@T("Find friends that share your interest of Orchard. There are a couple ways that you can <a href=\"http://orchardproject.net/discussions\">discuss and get connected</a> to the project including mailing lists, forums and IRC.")</p>
|
||||
</div>
|
||||
<div class="help-item">
|
||||
<h2 class="contribute">@T("Contribute back")</h2>
|
||||
<p>@T("Help grow Orchard. We encourage contributions of all sorts, including code submissions, documentation, translations, feature recommendations, and more. Here are some ways to <a href=\"http://orchardproject.net/contribution\">give back to the project</a>.")</p>
|
||||
</div>
|
||||
|
||||
<div class="help-item">
|
||||
<h2 class="advisory">@T("Stay up to date")</h2>
|
||||
<iframe id="advisory" src="http://www.orchardproject.net/advisory" frameborder="0" height="100%" width="100%" scrolling="no">
|
||||
<p>@T("Your browser does not support iframes. You can't see advisory messages.")</p>
|
||||
</iframe>
|
||||
</div>
|
||||
</section>
|
@@ -0,0 +1,14 @@
|
||||
@using Orchard.ContentManagement
|
||||
@model Orchard.Dashboards.ViewModels.DashboardSiteSettingsViewModel
|
||||
@{
|
||||
Layout.Title = T("Dashboard Settings").ToString();
|
||||
}
|
||||
<section>
|
||||
<div class="form-group">
|
||||
@Display.ContentPicker_Edit(
|
||||
DisplayName: T("Default Dashboard").Text,
|
||||
SelectedItemsFieldName: Html.FieldNameFor(m => m.SelectedDashboardId),
|
||||
ContentItems: Model.SelectedDashboard != null ? new[] { Model.SelectedDashboard } : Enumerable.Empty<ContentItem>(),
|
||||
Hint: T("Select the content item to use as the dashboard.").Text)
|
||||
</div>
|
||||
</section>
|
43
src/Orchard.Web/Modules/Orchard.Dashboards/Web.config
Normal file
43
src/Orchard.Web/Modules/Orchard.Dashboards/Web.config
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<remove name="host" />
|
||||
<remove name="pages" />
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<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.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5.1">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework, Culture=neutral, PublicKeyToken=null"/>
|
||||
<add assembly="Orchard.Core, Culture=neutral, PublicKeyToken=null"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
@@ -261,6 +261,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
WebEssentials-Settings.json = WebEssentials-Settings.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Dashboards", "Orchard.Web\Modules\Orchard.Dashboards\Orchard.Dashboards.csproj", "{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -1063,6 +1065,16 @@ Global
|
||||
{82190F52-2901-46D6-8A4C-34649959483F}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{82190F52-2901-46D6-8A4C-34649959483F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{82190F52-2901-46D6-8A4C-34649959483F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1146,5 +1158,6 @@ Global
|
||||
{2C5EB8B3-A313-413D-BAA0-5C21D2A6EC6E} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{6BD8B2FA-F2E3-4AC8-A4C3-2925A653889A} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{82190F52-2901-46D6-8A4C-34649959483F} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{BAC82DB9-F4C4-4DD1-ABDB-F70E6229E6B0} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Reference in New Issue
Block a user