Removing Orchard.Pages (Page type covered by core app features: Contents, Common, PublishLater, Route, Comments, Tags & Localization)
--HG-- branch : dev
@@ -31,8 +31,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Modules", "..\Orcha
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.MultiTenancy", "..\Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj", "{72457126-E118-4171-A08F-9A709EE4B7FC}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.MultiTenancy", "..\Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj", "{72457126-E118-4171-A08F-9A709EE4B7FC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Pages", "..\Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj", "{4A9C04A6-0986-4A92-A610-5F59FF273FB9}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Roles", "..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj", "{D10AD48F-407D-4DB5-A328-173EC7CB010F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Roles", "..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj", "{D10AD48F-407D-4DB5-A328-173EC7CB010F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Sandbox", "..\Orchard.Web\Modules\Orchard.Sandbox\Orchard.Sandbox.csproj", "{17C44253-65A2-4597-98C7-16EE576824B6}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Sandbox", "..\Orchard.Web\Modules\Orchard.Sandbox\Orchard.Sandbox.csproj", "{17C44253-65A2-4597-98C7-16EE576824B6}"
|
||||||
@@ -119,10 +117,6 @@ Global
|
|||||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{72457126-E118-4171-A08F-9A709EE4B7FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D10AD48F-407D-4DB5-A328-173EC7CB010F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -181,7 +175,6 @@ Global
|
|||||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{17F86780-9A1F-4AA1-86F1-875EEC2730C7} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{72457126-E118-4171-A08F-9A709EE4B7FC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{72457126-E118-4171-A08F-9A709EE4B7FC} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
|
||||||
{D10AD48F-407D-4DB5-A328-173EC7CB010F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{D10AD48F-407D-4DB5-A328-173EC7CB010F} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{17C44253-65A2-4597-98C7-16EE576824B6} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{17C44253-65A2-4597-98C7-16EE576824B6} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
{4BE4EB01-AC56-4048-924E-2CA77F509ABA} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
{4BE4EB01-AC56-4048-924E-2CA77F509ABA} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||||
|
@@ -210,10 +210,6 @@
|
|||||||
<Project>{72457126-E118-4171-A08F-9A709EE4B7FC}</Project>
|
<Project>{72457126-E118-4171-A08F-9A709EE4B7FC}</Project>
|
||||||
<Name>Orchard.MultiTenancy</Name>
|
<Name>Orchard.MultiTenancy</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj">
|
|
||||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
|
||||||
<Name>Orchard.Pages</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||||
<Name>Orchard.Roles</Name>
|
<Name>Orchard.Roles</Name>
|
||||||
|
@@ -248,10 +248,6 @@
|
|||||||
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
||||||
<Name>Orchard.Media</Name>
|
<Name>Orchard.Media</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj">
|
|
||||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
|
||||||
<Name>Orchard.Pages</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||||
<Name>Orchard.Roles</Name>
|
<Name>Orchard.Roles</Name>
|
||||||
|
@@ -137,10 +137,6 @@
|
|||||||
<Project>{EA2B9121-EF54-40A6-A53E-6593C86EE696}</Project>
|
<Project>{EA2B9121-EF54-40A6-A53E-6593C86EE696}</Project>
|
||||||
<Name>Orchard.Indexing</Name>
|
<Name>Orchard.Indexing</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj">
|
|
||||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
|
||||||
<Name>Orchard.Pages</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||||
<Name>Orchard.Roles</Name>
|
<Name>Orchard.Roles</Name>
|
||||||
|
@@ -244,6 +244,11 @@
|
|||||||
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.SummaryAdmin.ascx" />
|
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.SummaryAdmin.ascx" />
|
||||||
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.ascx" />
|
<Content Include="Contents\Views\DisplayTemplates\Parts\Contents.Publish.ascx" />
|
||||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.ascx" />
|
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.ascx" />
|
||||||
|
<Content Include="PublishLater\Content\Admin\images\draft.gif" />
|
||||||
|
<Content Include="PublishLater\Content\Admin\images\offline.gif" />
|
||||||
|
<Content Include="PublishLater\Content\Admin\images\online.gif" />
|
||||||
|
<Content Include="PublishLater\Content\Admin\images\published.gif" />
|
||||||
|
<Content Include="PublishLater\Content\Admin\images\scheduled.gif" />
|
||||||
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.ascx" />
|
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.ascx" />
|
||||||
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.SummaryAdmin.ascx" />
|
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.SummaryAdmin.ascx" />
|
||||||
<Content Include="Common\Views\EditorTemplates\Fields\Common.TextField.ascx" />
|
<Content Include="Common\Views\EditorTemplates\Fields\Common.TextField.ascx" />
|
||||||
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 642 B |
@@ -3,16 +3,16 @@
|
|||||||
<li><%
|
<li><%
|
||||||
// Published or not
|
// Published or not
|
||||||
if (Model.HasPublished) { %>
|
if (Model.HasPublished) { %>
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%:T("Online") %>" title="<%:T("The page is currently online") %>" /> <%:T("Published") %> | <%
|
<img class="icon" src="<%=ResolveUrl("~/Core/PublishLater/Content/Admin/images/online.gif") %>" alt="<%:T("Online") %>" title="<%:T("The page is currently online") %>" /> <%:T("Published") %> | <%
|
||||||
}
|
}
|
||||||
else { %>
|
else { %>
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%:T("Offline") %>" title="<%:T("The page is currently offline") %>" /> <%:T("Not Published") %> | <%
|
<img class="icon" src="<%=ResolveUrl("~/Core/PublishLater/Content/Admin/images/offline.gif") %>" alt="<%:T("Offline") %>" title="<%:T("The page is currently offline") %>" /> <%:T("Not Published") %> | <%
|
||||||
} %>
|
} %>
|
||||||
</li>
|
</li>
|
||||||
<li><%
|
<li><%
|
||||||
// Does the page have a draft
|
// Does the page have a draft
|
||||||
if (Model.HasDraft) { %>
|
if (Model.HasDraft) { %>
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%:T("Draft") %>" title="<%:T("The page has a draft") %>" /><%:T("Draft") %> | <%
|
<img class="icon" src="<%=ResolveUrl("~/Core/PublishLater/Content/Admin/images/draft.gif") %>" alt="<%:T("Draft") %>" title="<%:T("The page has a draft") %>" /><%:T("Draft") %> | <%
|
||||||
}
|
}
|
||||||
else { %>
|
else { %>
|
||||||
<%:T("No Draft") %> | <%
|
<%:T("No Draft") %> | <%
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<%:T("Published: {0}", Html.DateTimeRelative(Model.VersionPublishedUtc.Value, T)) %><%
|
<%:T("Published: {0}", Html.DateTimeRelative(Model.VersionPublishedUtc.Value, T)) %><%
|
||||||
}
|
}
|
||||||
else { %>
|
else { %>
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%:T("Scheduled") %>" title="<%:T("The page is scheduled for publishing") %>" /><%:T("Scheduled") %>
|
<img class="icon" src="<%=ResolveUrl("~/Core/PublishLater/Content/Admin/images/scheduled.gif") %>" alt="<%:T("Scheduled") %>" title="<%:T("The page is scheduled for publishing") %>" /><%:T("Scheduled") %>
|
||||||
<%:Html.DateTime(Model.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt")) %><%
|
<%:Html.DateTime(Model.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt")) %><%
|
||||||
} %> | </li><%
|
} %> | </li><%
|
||||||
} %>
|
} %>
|
||||||
|
@@ -1,32 +0,0 @@
|
|||||||
using Orchard.Localization;
|
|
||||||
using Orchard.Pages.Services;
|
|
||||||
using Orchard.UI.Navigation;
|
|
||||||
|
|
||||||
namespace Orchard.Pages {
|
|
||||||
public class AdminMenu : INavigationProvider {
|
|
||||||
private readonly IPageService _pageService;
|
|
||||||
|
|
||||||
public AdminMenu(IPageService pageService) {
|
|
||||||
_pageService = pageService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Localizer T { get; set; }
|
|
||||||
|
|
||||||
public string MenuName { get { return "admin"; } }
|
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
|
||||||
builder.Add(T("Pages"), "1", BuildMenu);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BuildMenu(NavigationItemBuilder menu) {
|
|
||||||
if (_pageService.GetCount() > 0)
|
|
||||||
menu.Add(T("Manage Pages"), "1.0",
|
|
||||||
item =>
|
|
||||||
item.Action("List", "Admin", new {area = "Orchard.Pages"}).Permission(Permissions.MetaListPages));
|
|
||||||
|
|
||||||
menu.Add(T("Create New Page"), "1.1",
|
|
||||||
item =>
|
|
||||||
item.Action("Create", "Admin", new {area = "Orchard.Pages"}).Permission(Permissions.EditPages));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,317 +0,0 @@
|
|||||||
/*----------------------------------------------------------
|
|
||||||
The base color for this template is #5c87b2. If you'd like
|
|
||||||
to use a different color start by replacing all instances of
|
|
||||||
#5c87b2 with your new color.
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
body
|
|
||||||
{
|
|
||||||
background-color: #5c87b2;
|
|
||||||
font-size: .75em;
|
|
||||||
font-family: Verdana, Helvetica, Sans-Serif;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
color: #696969;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link
|
|
||||||
{
|
|
||||||
color: #034af3;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
a:visited
|
|
||||||
{
|
|
||||||
color: #505abc;
|
|
||||||
}
|
|
||||||
a:hover
|
|
||||||
{
|
|
||||||
color: #1d60ff;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a:active
|
|
||||||
{
|
|
||||||
color: #12eb87;
|
|
||||||
}
|
|
||||||
|
|
||||||
p, ul
|
|
||||||
{
|
|
||||||
margin-bottom: 20px;
|
|
||||||
line-height: 1.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* HEADINGS
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
h1, h2, h3, h4, h5, h6
|
|
||||||
{
|
|
||||||
font-size: 1.5em;
|
|
||||||
color: #000;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 2em;
|
|
||||||
padding-bottom: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
h2
|
|
||||||
{
|
|
||||||
padding: 0 0 10px 0;
|
|
||||||
}
|
|
||||||
h3
|
|
||||||
{
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
h4
|
|
||||||
{
|
|
||||||
font-size: 1.1em;
|
|
||||||
}
|
|
||||||
h5, h6
|
|
||||||
{
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this rule styles <h2> tags that are the
|
|
||||||
first child of the left and right table columns */
|
|
||||||
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
|
|
||||||
{
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PRIMARY LAYOUT ELEMENTS
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* you can specify a greater or lesser percentage for the
|
|
||||||
page width. Or, you can specify an exact pixel width. */
|
|
||||||
.page
|
|
||||||
{
|
|
||||||
width: 90%;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header
|
|
||||||
{
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
color: #000;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header h1
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 5px 0;
|
|
||||||
margin: 0;
|
|
||||||
color: #fff;
|
|
||||||
border: none;
|
|
||||||
line-height: 2em;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 32px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main
|
|
||||||
{
|
|
||||||
padding: 30px 30px 15px 30px;
|
|
||||||
background-color: #fff;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
_height: 1px; /* only IE6 applies CSS properties starting with an underscrore */
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer
|
|
||||||
{
|
|
||||||
color: #999;
|
|
||||||
padding: 10px 0;
|
|
||||||
text-align: center;
|
|
||||||
line-height: normal;
|
|
||||||
margin: 0;
|
|
||||||
font-size: .9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TAB MENU
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
ul#menu
|
|
||||||
{
|
|
||||||
border-bottom: 1px #5C87B2 solid;
|
|
||||||
padding: 0 0 2px;
|
|
||||||
position: relative;
|
|
||||||
margin: 0;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li
|
|
||||||
{
|
|
||||||
display: inline;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li#greeting
|
|
||||||
{
|
|
||||||
padding: 10px 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
line-height: 2.8em;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li a
|
|
||||||
{
|
|
||||||
padding: 10px 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
line-height: 2.8em;
|
|
||||||
background-color: #e8eef4;
|
|
||||||
color: #034af3;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li a:hover
|
|
||||||
{
|
|
||||||
background-color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li a:active
|
|
||||||
{
|
|
||||||
background-color: #a6e2a6;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul#menu li.selected a
|
|
||||||
{
|
|
||||||
background-color: #fff;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FORM LAYOUT ELEMENTS
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
|
|
||||||
fieldset
|
|
||||||
{
|
|
||||||
margin: 1em 0;
|
|
||||||
padding: 1em;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset p
|
|
||||||
{
|
|
||||||
margin: 2px 12px 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset label
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset label.inline
|
|
||||||
{
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
legend
|
|
||||||
{
|
|
||||||
font-size: 1.1em;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 2px 4px 8px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"]
|
|
||||||
{
|
|
||||||
width: 200px;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="password"]
|
|
||||||
{
|
|
||||||
width: 200px;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TABLE
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
|
|
||||||
table
|
|
||||||
{
|
|
||||||
border: solid 1px #e8eef4;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
table td
|
|
||||||
{
|
|
||||||
padding: 5px;
|
|
||||||
border: solid 1px #e8eef4;
|
|
||||||
}
|
|
||||||
|
|
||||||
table th
|
|
||||||
{
|
|
||||||
padding: 6px 5px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #e8eef4;
|
|
||||||
border: solid 1px #e8eef4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MISC
|
|
||||||
----------------------------------------------------------*/
|
|
||||||
.clear
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error
|
|
||||||
{
|
|
||||||
color:Red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menucontainer
|
|
||||||
{
|
|
||||||
margin-top:40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#title
|
|
||||||
{
|
|
||||||
display:block;
|
|
||||||
float:left;
|
|
||||||
text-align:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logindisplay
|
|
||||||
{
|
|
||||||
font-size:1.1em;
|
|
||||||
display:block;
|
|
||||||
text-align:right;
|
|
||||||
margin:10px;
|
|
||||||
color:White;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logindisplay a:link
|
|
||||||
{
|
|
||||||
color: white;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logindisplay a:visited
|
|
||||||
{
|
|
||||||
color: white;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#logindisplay a:hover
|
|
||||||
{
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.field-validation-error
|
|
||||||
{
|
|
||||||
color: #ff0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-validation-error
|
|
||||||
{
|
|
||||||
border: 1px solid #ff0000;
|
|
||||||
background-color: #ffeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.validation-summary-errors
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
color: #ff0000;
|
|
||||||
}
|
|
@@ -1,279 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.Localization;
|
|
||||||
using Orchard.ContentManagement;
|
|
||||||
using Orchard.Mvc.AntiForgery;
|
|
||||||
using Orchard.Mvc.Results;
|
|
||||||
using Orchard.Pages.Drivers;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.Pages.Services;
|
|
||||||
using Orchard.Pages.ViewModels;
|
|
||||||
using Orchard.Settings;
|
|
||||||
using Orchard.UI.Notify;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Controllers {
|
|
||||||
[ValidateInput(false)]
|
|
||||||
public class AdminController : Controller, IUpdateModel {
|
|
||||||
private readonly IPageService _pageService;
|
|
||||||
|
|
||||||
public AdminController(IOrchardServices services, IPageService pageService) {
|
|
||||||
Services = services;
|
|
||||||
_pageService = pageService;
|
|
||||||
T = NullLocalizer.Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual ISite CurrentSite { get; [UsedImplicitly] private set; }
|
|
||||||
public IOrchardServices Services { get; private set; }
|
|
||||||
public Localizer T { get; set; }
|
|
||||||
|
|
||||||
public ActionResult List(PagesOptions options) {
|
|
||||||
// Default options
|
|
||||||
if (options == null)
|
|
||||||
options = new PagesOptions();
|
|
||||||
|
|
||||||
IEnumerable<Page> pages;
|
|
||||||
// Filtering
|
|
||||||
switch (options.Filter) {
|
|
||||||
case PagesFilter.All:
|
|
||||||
pages = _pageService.Get();
|
|
||||||
break;
|
|
||||||
case PagesFilter.Published:
|
|
||||||
pages = _pageService.Get(PageStatus.Published);
|
|
||||||
break;
|
|
||||||
case PagesFilter.Offline:
|
|
||||||
pages = _pageService.Get(PageStatus.Offline);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
var entries = pages.Select(page => CreatePageEntry(page)).OrderBy(pageEntry => pageEntry.Page.Title).ToList();
|
|
||||||
var model = new PagesViewModel { Options = options, PageEntries = entries };
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost, ActionName("List")]
|
|
||||||
[FormValueRequired("submit.BulkEdit")]
|
|
||||||
public ActionResult ListPOST(PagesOptions options, IList<PageEntry> pageEntries) {
|
|
||||||
IEnumerable<PageEntry> checkedEntries = pageEntries.Where(p => p.IsChecked);
|
|
||||||
switch (options.BulkAction) {
|
|
||||||
case PagesBulkAction.None:
|
|
||||||
break;
|
|
||||||
case PagesBulkAction.PublishNow:
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.PublishPages, T("Couldn't publish page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
foreach (PageEntry entry in checkedEntries) {
|
|
||||||
var page = _pageService.GetLatest(entry.PageId);
|
|
||||||
_pageService.Publish(page);
|
|
||||||
Services.ContentManager.Flush();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PagesBulkAction.Unpublish:
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.PublishPages, T("Couldn't unpublish page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
foreach (PageEntry entry in checkedEntries) {
|
|
||||||
var page = _pageService.GetLatest(entry.PageId);
|
|
||||||
_pageService.Unpublish(page);
|
|
||||||
Services.ContentManager.Flush();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PagesBulkAction.Delete:
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.DeletePages, T("Couldn't delete page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
foreach (PageEntry entry in checkedEntries) {
|
|
||||||
var page = _pageService.GetLatest(entry.PageId);
|
|
||||||
_pageService.Delete(page);
|
|
||||||
Services.ContentManager.Flush();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return RedirectToAction("List");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static PageEntry CreatePageEntry(Page page) {
|
|
||||||
return new PageEntry {
|
|
||||||
Page = page,
|
|
||||||
IsChecked = false,
|
|
||||||
PageId = page.Id
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult Create() {
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.EditPages, T("Not allowed to create a page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
var page = Services.ContentManager.New<Page>(PageDriver.ContentType.Name);
|
|
||||||
|
|
||||||
var model = new PageCreateViewModel {
|
|
||||||
Page = Services.ContentManager.BuildEditorModel(page)
|
|
||||||
};
|
|
||||||
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost, ActionName("Create")]
|
|
||||||
public ActionResult CreatePOST(PageCreateViewModel model) {
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.EditPages, T("Couldn't create page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
// Validate form input
|
|
||||||
var page = Services.ContentManager.New<Page>(PageDriver.ContentType.Name);
|
|
||||||
model.Page = Services.ContentManager.UpdateEditorModel(page, this);
|
|
||||||
|
|
||||||
if (!ModelState.IsValid) {
|
|
||||||
Services.TransactionManager.Cancel();
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
Services.ContentManager.Create(model.Page.Item.ContentItem, VersionOptions.Draft);
|
|
||||||
Services.ContentManager.UpdateEditorModel(page, this);
|
|
||||||
|
|
||||||
return RedirectToAction("Edit", "Admin", new { id = model.Page.Item.ContentItem.Id });
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult Edit(int id) {
|
|
||||||
Page page = _pageService.GetLatest(id);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.EditOthersPages, page, T("Couldn't edit page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
var model = new PageEditViewModel {
|
|
||||||
Page = Services.ContentManager.BuildEditorModel(page),
|
|
||||||
PromoteToHomePage = CurrentSite.HomePage == "PageHomePageProvider;" + page.Id
|
|
||||||
};
|
|
||||||
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost, ActionName("Edit")]
|
|
||||||
public ActionResult EditPOST(int id) {
|
|
||||||
var page = _pageService.GetPageOrDraft(id);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.EditOthersPages, page, T("Couldn't edit page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
// Validate form input
|
|
||||||
var model = new PageEditViewModel {
|
|
||||||
Page = Services.ContentManager.UpdateEditorModel(page, this)
|
|
||||||
};
|
|
||||||
|
|
||||||
TryUpdateModel(model);
|
|
||||||
|
|
||||||
if (!ModelState.IsValid) {
|
|
||||||
Services.TransactionManager.Cancel();
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
return RedirectToAction("Edit", "Admin", new {id = model.Page.Item.ContentItem.Id});
|
|
||||||
}
|
|
||||||
|
|
||||||
[ValidateAntiForgeryTokenOrchard]
|
|
||||||
public ActionResult DiscardDraft(int id) {
|
|
||||||
// get the current draft version
|
|
||||||
var draft = Services.ContentManager.Get(id, VersionOptions.Draft);
|
|
||||||
if (draft == null) {
|
|
||||||
Services.Notifier.Information(T("There is no draft to discard."));
|
|
||||||
return RedirectToAction("Edit", new { Id = id });
|
|
||||||
}
|
|
||||||
|
|
||||||
// check edit permission
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.EditOthersPages, draft, T("Couldn't discard page draft")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
// locate the published revision to revert onto
|
|
||||||
var published = Services.ContentManager.Get(id, VersionOptions.Published);
|
|
||||||
if (published == null) {
|
|
||||||
Services.Notifier.Information(T("Can not discard draft on unpublished page."));
|
|
||||||
return RedirectToAction("Edit", new { draft.Id });
|
|
||||||
}
|
|
||||||
|
|
||||||
// marking the previously published version as the latest
|
|
||||||
// has the effect of discarding the draft but keeping the history
|
|
||||||
draft.VersionRecord.Latest = false;
|
|
||||||
published.VersionRecord.Latest = true;
|
|
||||||
|
|
||||||
Services.Notifier.Information(T("Page draft version discarded"));
|
|
||||||
return RedirectToAction("Edit", new { draft.Id });
|
|
||||||
}
|
|
||||||
|
|
||||||
[ValidateAntiForgeryTokenOrchard]
|
|
||||||
public ActionResult Publish(int id) {
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.PublishPages, T("Couldn't publish page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
var page = _pageService.GetLatest(id);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
_pageService.Publish(page);
|
|
||||||
Services.ContentManager.Flush();
|
|
||||||
Services.Notifier.Information(T("Page successfully published."));
|
|
||||||
|
|
||||||
return RedirectToAction("List");
|
|
||||||
}
|
|
||||||
|
|
||||||
[ValidateAntiForgeryTokenOrchard]
|
|
||||||
public ActionResult Unpublish(int id) {
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.PublishPages, T("Couldn't unpublish page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
var page = _pageService.GetLatest(id);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
_pageService.Unpublish(page);
|
|
||||||
Services.ContentManager.Flush();
|
|
||||||
Services.Notifier.Information(T("Page successfully unpublished."));
|
|
||||||
|
|
||||||
return RedirectToAction("List");
|
|
||||||
}
|
|
||||||
|
|
||||||
[ValidateAntiForgeryTokenOrchard]
|
|
||||||
public ActionResult Delete(int id) {
|
|
||||||
var page = _pageService.GetLatest(id);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.DeleteOthersPages, page, T("Couldn't delete page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
_pageService.Delete(page);
|
|
||||||
Services.Notifier.Information(T("Page successfully deleted"));
|
|
||||||
|
|
||||||
return RedirectToAction("List");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
|
||||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
void IUpdateModel.AddModelError(string key, LocalizedString errorMessage) {
|
|
||||||
ModelState.AddModelError(key, errorMessage.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FormValueRequiredAttribute : ActionMethodSelectorAttribute {
|
|
||||||
private readonly string _submitButtonName;
|
|
||||||
|
|
||||||
public FormValueRequiredAttribute(string submitButtonName) {
|
|
||||||
_submitButtonName = submitButtonName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) {
|
|
||||||
var value = controllerContext.HttpContext.Request.Form[_submitButtonName];
|
|
||||||
return !string.IsNullOrEmpty(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
using System.Web.Mvc;
|
|
||||||
using Orchard.Localization;
|
|
||||||
using Orchard.Mvc.Results;
|
|
||||||
using Orchard.Pages.Routing;
|
|
||||||
using Orchard.Pages.Services;
|
|
||||||
using Orchard.Pages.ViewModels;
|
|
||||||
using Orchard.Security;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Controllers {
|
|
||||||
[ValidateInput(false)]
|
|
||||||
public class PageController : Controller {
|
|
||||||
private readonly IPageService _pageService;
|
|
||||||
private readonly IPageSlugConstraint _pageSlugConstraint;
|
|
||||||
|
|
||||||
public PageController(IOrchardServices services, IPageService pageService, IPageSlugConstraint pageSlugConstraint) {
|
|
||||||
Services = services;
|
|
||||||
_pageService = pageService;
|
|
||||||
_pageSlugConstraint = pageSlugConstraint;
|
|
||||||
T = NullLocalizer.Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IOrchardServices Services { get; set; }
|
|
||||||
public Localizer T { get; set; }
|
|
||||||
|
|
||||||
public ActionResult Item(string slug) {
|
|
||||||
if (!Services.Authorizer.Authorize(StandardPermissions.AccessFrontEnd, T("Couldn't view page")))
|
|
||||||
return new HttpUnauthorizedResult();
|
|
||||||
|
|
||||||
var correctedSlug = _pageSlugConstraint.FindSlug(slug);
|
|
||||||
if (correctedSlug == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
var page = _pageService.Get(correctedSlug);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
var model = new PageViewModel {
|
|
||||||
Page = Services.ContentManager.BuildDisplayModel(page, "Detail")
|
|
||||||
};
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
using Orchard.ContentManagement.MetaData;
|
|
||||||
using Orchard.Data.Migration;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.DataMigrations {
|
|
||||||
public class PageDataMigration : DataMigrationImpl {
|
|
||||||
|
|
||||||
public int Create() {
|
|
||||||
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Page",
|
|
||||||
cfg => cfg
|
|
||||||
.WithPart("Page")
|
|
||||||
.WithPart("CommonPart")
|
|
||||||
.WithPart("RoutePart")
|
|
||||||
.WithPart("BodyPart")
|
|
||||||
);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int UpdateFrom1() {
|
|
||||||
ContentDefinitionManager.AlterTypeDefinition("Page",
|
|
||||||
cfg => cfg
|
|
||||||
.WithSetting("ContentTypeSettings.Creatable", "true")
|
|
||||||
);
|
|
||||||
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,68 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Web.Routing;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.Localization;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.ContentManagement;
|
|
||||||
using Orchard.ContentManagement.Drivers;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Drivers {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class PageDriver : ContentItemDriver<Page> {
|
|
||||||
public IOrchardServices Services { get; set; }
|
|
||||||
|
|
||||||
public readonly static ContentType ContentType = new ContentType {
|
|
||||||
Name = "Page",
|
|
||||||
DisplayName = "Page"
|
|
||||||
};
|
|
||||||
|
|
||||||
public PageDriver(IOrchardServices services) {
|
|
||||||
Services = services;
|
|
||||||
T = NullLocalizer.Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Localizer T { get; set; }
|
|
||||||
|
|
||||||
protected override ContentType GetContentType() {
|
|
||||||
return ContentType;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string Prefix { get { return ""; } }
|
|
||||||
|
|
||||||
protected override string GetDisplayText(Page page) {
|
|
||||||
return page.Title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RouteValueDictionary GetDisplayRouteValues(Page page) {
|
|
||||||
return new RouteValueDictionary {
|
|
||||||
{"Area", "Orchard.Pages"},
|
|
||||||
{"Controller", "Page"},
|
|
||||||
{"Action", "Item"},
|
|
||||||
{"slug", page.Slug},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RouteValueDictionary GetEditorRouteValues(Page page) {
|
|
||||||
return new RouteValueDictionary {
|
|
||||||
{"Area", "Orchard.Pages"},
|
|
||||||
{"Controller", "Admin"},
|
|
||||||
{"Action", "Edit"},
|
|
||||||
{"id", page.Id},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override DriverResult Display(Page page, string displayType) {
|
|
||||||
return ContentItemTemplate("Items/Pages.Page").LongestMatch(displayType, "Summary", "SummaryAdmin");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override DriverResult Editor(Page page) {
|
|
||||||
return ContentItemTemplate("Items/Pages.Page");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override DriverResult Editor(Page page, IUpdateModel updater) {
|
|
||||||
updater.TryUpdateModel(page, Prefix, null, null);
|
|
||||||
|
|
||||||
return Editor(page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Extensions {
|
|
||||||
//TODO: Move to orchard.dll
|
|
||||||
public static class UriExtensions {
|
|
||||||
public static string ToRootString(this Uri uri) {
|
|
||||||
return string.Format("{0}://{1}{2}", uri.Scheme, uri.Host, uri.Port != 80 ? ":" + uri.Port : "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,82 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using Orchard.ContentManagement;
|
|
||||||
using Orchard.ContentManagement.Utilities;
|
|
||||||
using Orchard.Core.Common.Models;
|
|
||||||
using Orchard.Core.Routable.Models;
|
|
||||||
using Orchard.Security;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Models {
|
|
||||||
public class Page : ContentPart {
|
|
||||||
[HiddenInput(DisplayValue = false)]
|
|
||||||
public int Id { get { return ContentItem.Id; } }
|
|
||||||
|
|
||||||
public string Title {
|
|
||||||
get { return this.As<RoutePart>().Title; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Slug {
|
|
||||||
get { return this.As<RoutePart>().Slug; }
|
|
||||||
set { this.As<RoutePart>().Slug = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public IUser Creator {
|
|
||||||
get { return this.As<CommonPart>().Owner; }
|
|
||||||
set { this.As<CommonPart>().Owner = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsPublished {
|
|
||||||
get { return ContentItem.VersionRecord != null && ContentItem.VersionRecord.Published; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasDraft {
|
|
||||||
get {
|
|
||||||
return (
|
|
||||||
(ContentItem.VersionRecord != null) && (
|
|
||||||
(ContentItem.VersionRecord.Published == false) ||
|
|
||||||
(ContentItem.VersionRecord.Published && ContentItem.VersionRecord.Latest == false)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasPublished {
|
|
||||||
get {
|
|
||||||
return IsPublished || ContentItem.ContentManager.Get(Id, VersionOptions.Published) != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string PublishedSlug {
|
|
||||||
get {
|
|
||||||
if (IsPublished)
|
|
||||||
return Slug;
|
|
||||||
Page publishedPage = ContentItem.ContentManager.Get<Page>(Id, VersionOptions.Published);
|
|
||||||
if (publishedPage == null)
|
|
||||||
return String.Empty;
|
|
||||||
return publishedPage.Slug;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly LazyField<DateTime?> _scheduledPublishUtc = new LazyField<DateTime?>();
|
|
||||||
public DateTime? ScheduledPublishUtc { get { return _scheduledPublishUtc.Value; } set{ _scheduledPublishUtc.Value = value;} }
|
|
||||||
|
|
||||||
private string _scheduledPublishUtcDate;
|
|
||||||
|
|
||||||
public string ScheduledPublishUtcDate {
|
|
||||||
get {
|
|
||||||
return !HasPublished && !string.IsNullOrEmpty(_scheduledPublishUtcDate) || !ScheduledPublishUtc.HasValue
|
|
||||||
? _scheduledPublishUtcDate
|
|
||||||
: ScheduledPublishUtc.Value.ToShortDateString();
|
|
||||||
}
|
|
||||||
set { _scheduledPublishUtcDate = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
private string _scheduledPublishUtcTime;
|
|
||||||
|
|
||||||
public string ScheduledPublishUtcTime {
|
|
||||||
get {
|
|
||||||
return !HasPublished && !string.IsNullOrEmpty(_scheduledPublishUtcTime) || !ScheduledPublishUtc.HasValue
|
|
||||||
? _scheduledPublishUtcTime
|
|
||||||
: ScheduledPublishUtc.Value.ToShortTimeString();
|
|
||||||
}
|
|
||||||
set { _scheduledPublishUtcTime = value; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,12 +0,0 @@
|
|||||||
name: Pages
|
|
||||||
antiforgery: enabled
|
|
||||||
author: The Orchard Team
|
|
||||||
website: http://orchardproject.net
|
|
||||||
version: 0.5.0
|
|
||||||
orchardversion: 0.5.0
|
|
||||||
description: The pages module enables the creation and management of pages on and Orchard web site.
|
|
||||||
features:
|
|
||||||
Orchard.Pages:
|
|
||||||
Description: Simple pages.
|
|
||||||
Dependencies: Contents
|
|
||||||
Category: Content
|
|
@@ -1,171 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Orchard.Pages</RootNamespace>
|
|
||||||
<AssemblyName>Orchard.Pages</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
|
||||||
<MvcBuildViews>false</MvcBuildViews>
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation />
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</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>
|
|
||||||
</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>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
|
||||||
<Reference Include="System.Web.DynamicData" />
|
|
||||||
<Reference Include="System.Web.Entity" />
|
|
||||||
<Reference Include="System.Web.Extensions" />
|
|
||||||
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="System.Web.Abstractions" />
|
|
||||||
<Reference Include="System.Web.Routing" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Configuration" />
|
|
||||||
<Reference Include="System.Web.Services" />
|
|
||||||
<Reference Include="System.EnterpriseServices" />
|
|
||||||
<Reference Include="System.Web.Mobile" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="Yaml, Version=1.0.3370.39839, Culture=neutral, PublicKeyToken=187a3d240e44a135, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\..\..\lib\yaml\Yaml.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="AdminMenu.cs" />
|
|
||||||
<Compile Include="Controllers\AdminController.cs" />
|
|
||||||
<Compile Include="Controllers\PageController.cs" />
|
|
||||||
<Compile Include="DataMigrations\PageDataMigration.cs" />
|
|
||||||
<Compile Include="Drivers\PageDriver.cs" />
|
|
||||||
<Compile Include="Models\Page.cs" />
|
|
||||||
<Compile Include="Permissions.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Routes.cs" />
|
|
||||||
<Compile Include="Security\AuthorizationEventHandler.cs" />
|
|
||||||
<Compile Include="Services\IPageService.cs" />
|
|
||||||
<Compile Include="Routing\IPageSlugConstraint.cs" />
|
|
||||||
<Compile Include="Services\PageService.cs" />
|
|
||||||
<Compile Include="Services\PageHomePageProvider.cs" />
|
|
||||||
<Compile Include="Routing\PageSlugConstraint.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Routing\PageSlugConstraintUpdator.cs" />
|
|
||||||
<Compile Include="ViewModels\PageCreateViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\PageEditViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\PagesViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\PageViewModel.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Styles\admin.css" />
|
|
||||||
<Content Include="Content\Admin\images\draft.gif" />
|
|
||||||
<Content Include="Content\Admin\images\offline.gif" />
|
|
||||||
<Content Include="Content\Admin\images\online.gif" />
|
|
||||||
<Content Include="Content\Admin\images\published.gif" />
|
|
||||||
<Content Include="Content\Admin\images\scheduled.gif" />
|
|
||||||
<Content Include="Content\Site.css" />
|
|
||||||
<Content Include="Module.txt" />
|
|
||||||
<Content Include="Views\DisplayTemplates\Items\Pages.Page.SummaryAdmin.ascx" />
|
|
||||||
<Content Include="Views\DisplayTemplates\Items\Pages.Page.ascx" />
|
|
||||||
<Content Include="Views\DisplayTemplates\Items\Pages.Page.Summary.ascx" />
|
|
||||||
<Content Include="Views\EditorTemplates\Items\Pages.Page.ascx" />
|
|
||||||
<Content Include="Views\Admin\Create.ascx" />
|
|
||||||
<Content Include="Views\Admin\Edit.ascx" />
|
|
||||||
<Content Include="Views\Page\Item.ascx" />
|
|
||||||
<Content Include="Views\Admin\List.aspx" />
|
|
||||||
<Content Include="Web.config" />
|
|
||||||
<Content Include="Views\Web.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
|
||||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
|
||||||
<Name>Orchard.Framework</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
|
||||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
|
||||||
<Name>Orchard.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Handlers\" />
|
|
||||||
</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.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target> -->
|
|
||||||
<!-- To enable MVC area subproject support, uncomment the following two lines:
|
|
||||||
<UsingTask TaskName="Microsoft.Web.Mvc.Build.CreateAreaManifest" AssemblyName="Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
|
||||||
<UsingTask TaskName="Microsoft.Web.Mvc.Build.CopyAreaManifests" AssemblyName="Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
|
||||||
-->
|
|
||||||
<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>1057</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>
|
|
@@ -1,59 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Orchard.Security.Permissions;
|
|
||||||
|
|
||||||
namespace Orchard.Pages {
|
|
||||||
public class Permissions : IPermissionProvider {
|
|
||||||
public static readonly Permission PublishOthersPages = new Permission { Description = "Publish or unpublish page for others", Name = "PublishOthersPages" };
|
|
||||||
public static readonly Permission PublishPages = new Permission { Description = "Publish or unpublish page", Name = "PublishPages", ImpliedBy = new[] { PublishOthersPages } };
|
|
||||||
public static readonly Permission EditOthersPages = new Permission { Description = "Edit page for others", Name = "EditOthersPages", ImpliedBy = new[] { PublishOthersPages } };
|
|
||||||
public static readonly Permission EditPages = new Permission { Description = "Edit page", Name = "EditPages", ImpliedBy = new[] { EditOthersPages, PublishPages } };
|
|
||||||
public static readonly Permission DeleteOthersPages = new Permission { Description = "Delete page for others", Name = "DeleteOthersPages" };
|
|
||||||
public static readonly Permission DeletePages = new Permission { Description = "Delete page", Name = "DeletePages", ImpliedBy = new[] { DeleteOthersPages } };
|
|
||||||
|
|
||||||
public static readonly Permission MetaListPages = new Permission { ImpliedBy = new[] { EditPages, PublishPages, DeletePages } };
|
|
||||||
|
|
||||||
public string ModuleName {
|
|
||||||
get {
|
|
||||||
return "Pages";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Permission> GetPermissions() {
|
|
||||||
return new Permission[] {
|
|
||||||
EditPages,
|
|
||||||
EditOthersPages,
|
|
||||||
PublishPages,
|
|
||||||
PublishOthersPages,
|
|
||||||
DeletePages,
|
|
||||||
DeleteOthersPages,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
|
||||||
return new[] {
|
|
||||||
new PermissionStereotype {
|
|
||||||
Name = "Administrator",
|
|
||||||
Permissions = new[] {PublishOthersPages,EditOthersPages,DeleteOthersPages}
|
|
||||||
},
|
|
||||||
new PermissionStereotype {
|
|
||||||
Name = "Editor",
|
|
||||||
Permissions = new[] {PublishOthersPages,EditOthersPages,DeleteOthersPages}
|
|
||||||
},
|
|
||||||
new PermissionStereotype {
|
|
||||||
Name = "Moderator",
|
|
||||||
//Permissions = new[] {}
|
|
||||||
},
|
|
||||||
new PermissionStereotype {
|
|
||||||
Name = "Author",
|
|
||||||
Permissions = new[] {PublishPages,EditPages,DeletePages}
|
|
||||||
},
|
|
||||||
new PermissionStereotype {
|
|
||||||
Name = "Contributor",
|
|
||||||
Permissions = new[] {EditPages}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// 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.Pages")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyProduct("Orchard")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2009")]
|
|
||||||
[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("7f5cbc21-9814-4456-8996-3e57e0331c76")]
|
|
||||||
|
|
||||||
// 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("0.5.0")]
|
|
||||||
[assembly: AssemblyFileVersion("0.5.0")]
|
|
@@ -1,42 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using System.Web.Routing;
|
|
||||||
using Orchard.Mvc.Routes;
|
|
||||||
using Orchard.Pages.Routing;
|
|
||||||
|
|
||||||
namespace Orchard.Pages {
|
|
||||||
public class Routes : IRouteProvider {
|
|
||||||
private readonly IPageSlugConstraint _pageSlugConstraint;
|
|
||||||
|
|
||||||
public Routes(IPageSlugConstraint pageSlugConstraint) {
|
|
||||||
_pageSlugConstraint = pageSlugConstraint;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetRoutes(ICollection<RouteDescriptor> routes) {
|
|
||||||
foreach (var routeDescriptor in GetRoutes())
|
|
||||||
routes.Add(routeDescriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
|
||||||
return new[] {
|
|
||||||
new RouteDescriptor {
|
|
||||||
Priority = 10,
|
|
||||||
Route = new Route(
|
|
||||||
"{*slug}",
|
|
||||||
new RouteValueDictionary {
|
|
||||||
{"area", "Orchard.Pages"},
|
|
||||||
{"controller", "Page"},
|
|
||||||
{"action", "Item"}
|
|
||||||
},
|
|
||||||
new RouteValueDictionary {
|
|
||||||
{"slug", _pageSlugConstraint}
|
|
||||||
},
|
|
||||||
new RouteValueDictionary {
|
|
||||||
{"area", "Orchard.Pages"}
|
|
||||||
},
|
|
||||||
new MvcRouteHandler())
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Web.Routing;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Routing {
|
|
||||||
public interface IPageSlugConstraint : IRouteConstraint, ISingletonDependency {
|
|
||||||
void SetSlugs(IEnumerable<string> slugs);
|
|
||||||
string FindSlug(string slug);
|
|
||||||
void AddSlug(string slug);
|
|
||||||
void RemoveSlug(string slug);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,70 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Routing;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.Logging;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Routing {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class PageSlugConstraint : IPageSlugConstraint {
|
|
||||||
/// <summary>
|
|
||||||
/// Singleton object, per Orchard Shell instance. We need to protect concurrent access to the dictionary.
|
|
||||||
/// </summary>
|
|
||||||
private readonly object _syncLock = new object();
|
|
||||||
private IDictionary<string, string> _slugs = new Dictionary<string, string>();
|
|
||||||
|
|
||||||
public PageSlugConstraint() {
|
|
||||||
Logger = NullLogger.Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ILogger Logger { get; set; }
|
|
||||||
|
|
||||||
public void SetSlugs(IEnumerable<string> slugs) {
|
|
||||||
// Make a copy to avoid performing potential lazy computation inside the lock
|
|
||||||
var slugsArray = slugs.ToArray();
|
|
||||||
|
|
||||||
lock (_syncLock) {
|
|
||||||
_slugs = slugsArray.Distinct(StringComparer.OrdinalIgnoreCase).ToDictionary(value => value, StringComparer.OrdinalIgnoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.Debug("Page slugs: {0}", string.Join(", ", slugsArray));
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FindSlug(string slug) {
|
|
||||||
lock (_syncLock) {
|
|
||||||
string actual;
|
|
||||||
return _slugs.TryGetValue(slug, out actual) ? actual : slug;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddSlug(string slug) {
|
|
||||||
lock (_syncLock) {
|
|
||||||
_slugs[slug] = slug;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveSlug(string slug) {
|
|
||||||
lock (_syncLock) {
|
|
||||||
_slugs.Remove(slug);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) {
|
|
||||||
if (routeDirection == RouteDirection.UrlGeneration)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
object value;
|
|
||||||
if (values.TryGetValue(parameterName, out value)) {
|
|
||||||
var parameterValue = Convert.ToString(value);
|
|
||||||
|
|
||||||
lock (_syncLock) {
|
|
||||||
return _slugs.ContainsKey(parameterValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
using System.Linq;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.Environment;
|
|
||||||
using Orchard.Pages.Services;
|
|
||||||
using Orchard.Tasks;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Routing {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class PageSlugConstraintUpdator : IOrchardShellEvents, IBackgroundTask {
|
|
||||||
private readonly IPageSlugConstraint _pageSlugConstraint;
|
|
||||||
private readonly IPageService _pageService;
|
|
||||||
|
|
||||||
public PageSlugConstraintUpdator(IPageSlugConstraint pageSlugConstraint, IPageService pageService) {
|
|
||||||
_pageSlugConstraint = pageSlugConstraint;
|
|
||||||
_pageService = pageService;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IOrchardShellEvents.Activated() {
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void IOrchardShellEvents.Terminating() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void IBackgroundTask.Sweep() {
|
|
||||||
Refresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Refresh() {
|
|
||||||
_pageSlugConstraint.SetSlugs(_pageService.Get(PageStatus.Published).Select(p => p.Slug));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.ContentManagement;
|
|
||||||
using Orchard.ContentManagement.Aspects;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.Security;
|
|
||||||
using Orchard.Security.Permissions;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Security {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class AuthorizationEventHandler : IAuthorizationServiceEventHandler {
|
|
||||||
public void Checking(CheckAccessContext context) { }
|
|
||||||
public void Complete(CheckAccessContext context) { }
|
|
||||||
|
|
||||||
public void Adjust(CheckAccessContext context) {
|
|
||||||
if (context.Granted == false &&
|
|
||||||
context.Content.Is<Page>() &&
|
|
||||||
OwnerVariationExists(context.Permission) &&
|
|
||||||
HasOwnership(context.User, context.Content)) {
|
|
||||||
|
|
||||||
context.Adjusted = true;
|
|
||||||
context.Permission = GetOwnerVariation(context.Permission);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool HasOwnership(IUser user, IContent content) {
|
|
||||||
if (user==null || content==null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var common = content.As<ICommonPart>();
|
|
||||||
if (common==null || common.Owner==null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return user.Id == common.Owner.Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool OwnerVariationExists(Permission permission) {
|
|
||||||
return GetOwnerVariation(permission) != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Permission GetOwnerVariation(Permission permission) {
|
|
||||||
if (permission.Name == Permissions.PublishOthersPages.Name)
|
|
||||||
return Permissions.PublishPages;
|
|
||||||
if (permission.Name == Permissions.EditOthersPages.Name)
|
|
||||||
return Permissions.EditPages;
|
|
||||||
if (permission.Name == Permissions.DeleteOthersPages.Name)
|
|
||||||
return Permissions.DeletePages;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,28 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Services {
|
|
||||||
public interface IPageService : IDependency {
|
|
||||||
int GetCount();
|
|
||||||
IEnumerable<Page> Get();
|
|
||||||
IEnumerable<Page> Get(PageStatus status);
|
|
||||||
Page Get(string slug);
|
|
||||||
Page Get(int id);
|
|
||||||
Page GetPageOrDraft(string slug);
|
|
||||||
Page GetPageOrDraft(int id);
|
|
||||||
Page GetLatest(string slug);
|
|
||||||
Page GetLatest(int id);
|
|
||||||
void Delete(Page page);
|
|
||||||
void Publish(Page page);
|
|
||||||
void Publish(Page page, DateTime scheduledPublishUtc);
|
|
||||||
void Unpublish(Page page);
|
|
||||||
DateTime? GetScheduledPublishUtc(Page page);
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PageStatus {
|
|
||||||
All,
|
|
||||||
Published,
|
|
||||||
Offline
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,52 +0,0 @@
|
|||||||
using System.Web.Mvc;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.Localization;
|
|
||||||
using Orchard.Mvc.Results;
|
|
||||||
using Orchard.Pages.Routing;
|
|
||||||
using Orchard.Pages.ViewModels;
|
|
||||||
using Orchard.Services;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Services {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class PageHomePageProvider : IHomePageProvider {
|
|
||||||
private readonly IPageService _pageService;
|
|
||||||
private readonly IPageSlugConstraint _pageSlugConstraint;
|
|
||||||
|
|
||||||
public PageHomePageProvider(IOrchardServices services, IPageService pageService, IPageSlugConstraint pageSlugConstraint) {
|
|
||||||
Services = services;
|
|
||||||
_pageSlugConstraint = pageSlugConstraint;
|
|
||||||
_pageService = pageService;
|
|
||||||
T = NullLocalizer.Instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IOrchardServices Services { get; private set; }
|
|
||||||
public Localizer T { get; set; }
|
|
||||||
|
|
||||||
public string GetProviderName() {
|
|
||||||
return "PageHomePageProvider";
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult GetHomePage(int itemId) {
|
|
||||||
var page = _pageService.Get(itemId);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
var correctedSlug = _pageSlugConstraint.FindSlug(page.Slug);
|
|
||||||
if (correctedSlug == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
page = _pageService.Get(correctedSlug);
|
|
||||||
if (page == null)
|
|
||||||
return new NotFoundResult();
|
|
||||||
|
|
||||||
var model = new PageViewModel {
|
|
||||||
Page = Services.ContentManager.BuildDisplayModel(page, "Detail")
|
|
||||||
};
|
|
||||||
|
|
||||||
return new ViewResult {
|
|
||||||
ViewName = "~/Modules/Orchard.Pages/Views/Page/Item.ascx",
|
|
||||||
ViewData = new ViewDataDictionary<PageViewModel>(model)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,102 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Orchard.ContentManagement.Records;
|
|
||||||
using Orchard.Core.Routable.Models;
|
|
||||||
using Orchard.Pages.Drivers;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.ContentManagement;
|
|
||||||
using Orchard.Pages.Routing;
|
|
||||||
using Orchard.Tasks.Scheduling;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.Services {
|
|
||||||
[UsedImplicitly]
|
|
||||||
public class PageService : IPageService {
|
|
||||||
private readonly IContentManager _contentManager;
|
|
||||||
private readonly IPublishingTaskManager _publishingTaskManager;
|
|
||||||
private readonly IPageSlugConstraint _pageSlugConstraint;
|
|
||||||
|
|
||||||
public PageService(IContentManager contentManager, IPublishingTaskManager publishingTaskManager, IPageSlugConstraint pageSlugConstraint) {
|
|
||||||
_contentManager = contentManager;
|
|
||||||
_publishingTaskManager = publishingTaskManager;
|
|
||||||
_pageSlugConstraint = pageSlugConstraint;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetCount() {
|
|
||||||
//TODO: (erikpo) Need to add a count method to IContentQuery so it doesn't need to pull out all pages to get a count
|
|
||||||
return _contentManager.Query<Page>(VersionOptions.Latest).List().Count();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Page> Get() {
|
|
||||||
return Get(PageStatus.All);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<Page> Get(PageStatus status) {
|
|
||||||
switch (status) {
|
|
||||||
case PageStatus.All:
|
|
||||||
return _contentManager.Query(PageDriver.ContentType.Name).Join<RoutePartRecord>().ForVersion(VersionOptions.Latest).List().AsPart<Page>();
|
|
||||||
case PageStatus.Published:
|
|
||||||
return _contentManager.Query(PageDriver.ContentType.Name).Join<RoutePartRecord>().ForVersion(VersionOptions.Published).List().AsPart<Page>();
|
|
||||||
case PageStatus.Offline:
|
|
||||||
return _contentManager.Query(PageDriver.ContentType.Name).Join<RoutePartRecord>().ForVersion(VersionOptions.Latest).Where<ContentPartVersionRecord>(ci => !ci.ContentItemVersionRecord.Published).List().AsPart<Page>();
|
|
||||||
default:
|
|
||||||
return Enumerable.Empty<Page>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page Get(int id) {
|
|
||||||
return _contentManager.Get<Page>(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page Get(string slug) {
|
|
||||||
return
|
|
||||||
_contentManager.Query(PageDriver.ContentType.Name).Join<RoutePartRecord>().Where(rr => rr.Slug == slug).List().FirstOrDefault
|
|
||||||
().As<Page>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page GetLatest(int id) {
|
|
||||||
return _contentManager.Get<Page>(id, VersionOptions.Latest);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page GetLatest(string slug) {
|
|
||||||
return
|
|
||||||
_contentManager.Query(VersionOptions.Latest, PageDriver.ContentType.Name).Join<RoutePartRecord>().Where(rr => rr.Slug == slug)
|
|
||||||
.Slice(0, 1).FirstOrDefault().As<Page>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page GetPageOrDraft(int id) {
|
|
||||||
return _contentManager.GetDraftRequired<Page>(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Page GetPageOrDraft(string slug) {
|
|
||||||
Page page = GetLatest(slug);
|
|
||||||
return _contentManager.GetDraftRequired<Page>(page.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Delete(Page page) {
|
|
||||||
_publishingTaskManager.DeleteTasks(page.ContentItem);
|
|
||||||
_contentManager.Remove(page.ContentItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Publish(Page page) {
|
|
||||||
_publishingTaskManager.DeleteTasks(page.ContentItem);
|
|
||||||
_contentManager.Publish(page.ContentItem);
|
|
||||||
_pageSlugConstraint.AddSlug(page.Slug);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Publish(Page page, DateTime scheduledPublishUtc) {
|
|
||||||
_publishingTaskManager.Publish(page.ContentItem, scheduledPublishUtc);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Unpublish(Page page) {
|
|
||||||
_contentManager.Unpublish(page.ContentItem);
|
|
||||||
_pageSlugConstraint.RemoveSlug(page.Slug);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime? GetScheduledPublishUtc(Page page) {
|
|
||||||
var task = _publishingTaskManager.GetPublishTask(page.ContentItem);
|
|
||||||
return (task == null ? null : task.ScheduledUtc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
.pageList {
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
/*background:#FFFFFF url(images/backgroundGradient.gif) repeat-x scroll left top;*/
|
|
||||||
}
|
|
||||||
.orchard-pages .contentItems {
|
|
||||||
margin:.5em 0 0;
|
|
||||||
padding:0;
|
|
||||||
}
|
|
||||||
.contentItems .properties ul {
|
|
||||||
margin:0.8em 0 0 2em;
|
|
||||||
}
|
|
||||||
.contentItems .properties ul li {
|
|
||||||
margin:0;
|
|
||||||
padding:0 0 .1em 0;
|
|
||||||
}
|
|
||||||
.properties h3 {
|
|
||||||
display:inline;
|
|
||||||
}
|
|
@@ -1,9 +0,0 @@
|
|||||||
using Orchard.Mvc.ViewModels;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.ViewModels {
|
|
||||||
public class PageCreateViewModel : BaseViewModel {
|
|
||||||
public ContentItemViewModel<Page> Page { get; set; }
|
|
||||||
public bool PromoteToHomePage { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,9 +0,0 @@
|
|||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.Mvc.ViewModels;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.ViewModels {
|
|
||||||
public class PageEditViewModel : BaseViewModel {
|
|
||||||
public ContentItemViewModel<Page> Page { get; set; }
|
|
||||||
public bool PromoteToHomePage { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,8 +0,0 @@
|
|||||||
using Orchard.Pages.Models;
|
|
||||||
using Orchard.Mvc.ViewModels;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.ViewModels {
|
|
||||||
public class PageViewModel : BaseViewModel {
|
|
||||||
public ContentItemViewModel<Page> Page { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Orchard.Mvc.ViewModels;
|
|
||||||
using Orchard.Pages.Models;
|
|
||||||
|
|
||||||
namespace Orchard.Pages.ViewModels {
|
|
||||||
public class PagesViewModel : BaseViewModel {
|
|
||||||
public IList<PageEntry> PageEntries { get; set; }
|
|
||||||
public PagesOptions Options { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PageEntry {
|
|
||||||
public Page Page { get; set; }
|
|
||||||
public int PageId { get; set; }
|
|
||||||
public bool IsChecked { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PagesOptions {
|
|
||||||
public PagesFilter Filter { get; set; }
|
|
||||||
public PagesBulkAction BulkAction { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PagesFilter {
|
|
||||||
All,
|
|
||||||
Published,
|
|
||||||
Offline
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PagesBulkAction {
|
|
||||||
None,
|
|
||||||
PublishNow,
|
|
||||||
Unpublish,
|
|
||||||
Delete
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,12 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<PageCreateViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
|
||||||
<h1><%: Html.TitleForPage(T("Add Page").ToString()) %></h1>
|
|
||||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
|
||||||
<%: Html.ValidationSummary() %>
|
|
||||||
<%: Html.EditorForItem(m => m.Page) %>
|
|
||||||
<fieldset>
|
|
||||||
<%: Html.EditorFor(m => m.PromoteToHomePage) %>
|
|
||||||
<label for="PromoteToHomePage" class="forcheckbox"><%: T("Set as home page") %></label>
|
|
||||||
</fieldset><%
|
|
||||||
} %>
|
|
@@ -1,12 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<PageEditViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
|
||||||
<h1><%: Html.TitleForPage(T("Edit Page").ToString()) %></h1>
|
|
||||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
|
||||||
<%: Html.ValidationSummary() %>
|
|
||||||
<%: Html.EditorForItem(m => m.Page) %>
|
|
||||||
<fieldset>
|
|
||||||
<%: Html.EditorFor(m => m.PromoteToHomePage) %>
|
|
||||||
<label for="PromoteToHomePage" class="forcheckbox"><%: T("Set as home page") %></label>
|
|
||||||
</fieldset><%
|
|
||||||
} %>
|
|
@@ -1,99 +0,0 @@
|
|||||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<PagesViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.ContentManagement.Aspects"%>
|
|
||||||
<%@ Import Namespace="Orchard.ContentManagement"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%><%
|
|
||||||
Html.RegisterStyle("admin.css"); %>
|
|
||||||
|
|
||||||
<h1><%: Html.TitleForPage(T("Manage Pages").ToString())%></h1>
|
|
||||||
<%-- todo: Add helper text here when ready. <p><%: T("Possible text about setting up a page goes here.")%></p>--%>
|
|
||||||
<div class="manage"><%: Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div><%
|
|
||||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
|
||||||
<%: Html.ValidationSummary()%>
|
|
||||||
<fieldset class="actions bulk">
|
|
||||||
<label for="publishActions"><%: T("Actions:")%></label>
|
|
||||||
<select id="publishActions" name="<%: Html.NameOf(m => m.Options.BulkAction) %>">
|
|
||||||
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.None, T("Choose action...").ToString())%>
|
|
||||||
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.PublishNow, T("Publish Now").ToString())%>
|
|
||||||
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Unpublish, T("Unpublish").ToString())%>
|
|
||||||
<%: Html.SelectOption(Model.Options.BulkAction, PagesBulkAction.Delete, T("Remove").ToString())%>
|
|
||||||
</select>
|
|
||||||
<input class="button" type="submit" name="submit.BulkEdit" value="<%: T("Apply") %>" />
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="actions bulk">
|
|
||||||
<label for="filterResults"><%: T("Filter:")%></label>
|
|
||||||
<select id="filterResults" name="<%: Html.NameOf(m => m.Options.Filter) %>">
|
|
||||||
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.All, T("All Pages").ToString())%>
|
|
||||||
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Published, T("Published Pages").ToString())%>
|
|
||||||
<%: Html.SelectOption(Model.Options.Filter, PagesFilter.Offline, T("Offline Pages").ToString())%>
|
|
||||||
</select>
|
|
||||||
<input class="button" type="submit" name="submit.Filter" value="<%: T("Apply") %>"/>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="pageList">
|
|
||||||
<ul class="contentItems"><%
|
|
||||||
var pageIndex = 0;
|
|
||||||
foreach (var pageEntry in Model.PageEntries) {
|
|
||||||
var pi = pageIndex; %>
|
|
||||||
<li>
|
|
||||||
<div class="summary">
|
|
||||||
<div class="properties">
|
|
||||||
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%: Html.NameOf(m => m.PageEntries[pi].PageId) %>"/>
|
|
||||||
<input type="checkbox" value="true" name="<%: Html.NameOf(m => m.PageEntries[pi].IsChecked) %>"/>
|
|
||||||
<h3><%: Html.ActionLink(pageEntry.Page.Title, "Edit", new { id = pageEntry.PageId })%></h3>
|
|
||||||
<ul class="pageStatus">
|
|
||||||
<li><%
|
|
||||||
// Published or not
|
|
||||||
if (pageEntry.Page.HasPublished) { %>
|
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="<%: T("Online") %>" title="<%: T("The page is currently online") %>" /> <%: T("Published") %> | <%
|
|
||||||
}
|
|
||||||
else { %>
|
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="<%: T("Offline") %>" title="<%: T("The page is currently offline") %>" /> <%: T("Not Published")%> | <%
|
|
||||||
} %>
|
|
||||||
</li>
|
|
||||||
<li><%
|
|
||||||
// Does the page have a draft
|
|
||||||
if (pageEntry.Page.HasDraft) { %>
|
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="<%: T("Draft") %>" title="<%: T("The page has a draft") %>" /><%: T("Draft")%> | <%
|
|
||||||
}
|
|
||||||
else { %>
|
|
||||||
<%: T("No Draft")%> | <%
|
|
||||||
} %>
|
|
||||||
</li>
|
|
||||||
<li><%
|
|
||||||
if (pageEntry.Page.ScheduledPublishUtc.HasValue && pageEntry.Page.ScheduledPublishUtc.Value > DateTime.UtcNow) { %>
|
|
||||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="<%: T("Scheduled") %>" title="<%: T("The page is scheduled for publishing") %>" /><%: T("Scheduled")%>
|
|
||||||
<%: Html.DateTime(pageEntry.Page.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt"))%><%
|
|
||||||
}
|
|
||||||
else if (pageEntry.Page.IsPublished) { %>
|
|
||||||
<%: T("Published: {0}", Html.DateTimeRelative(pageEntry.Page.As<ICommonPart>().VersionPublishedUtc.Value, T)) %><%
|
|
||||||
}
|
|
||||||
else { %>
|
|
||||||
<%: T("Last modified: {0}", Html.DateTimeRelative(pageEntry.Page.As<ICommonPart>().ModifiedUtc.Value, T)) %><%
|
|
||||||
} %> |
|
|
||||||
</li>
|
|
||||||
<li><%: T("By {0}", pageEntry.Page.Creator.UserName)%></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="related"><%
|
|
||||||
if (pageEntry.Page.HasPublished) { %>
|
|
||||||
<%: Html.ActionLink("View", "Item", new { controller = "Page", slug = pageEntry.Page.PublishedSlug }, new {title = T("View Page")})%><%: T(" | ")%><%
|
|
||||||
if (pageEntry.Page.HasDraft) { %>
|
|
||||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
|
|
||||||
} %>
|
|
||||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Unpublish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Unpublish Page")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
|
|
||||||
}
|
|
||||||
else { %>
|
|
||||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = pageEntry.Page.Id})) %>" title="<%: T("Publish Page")%>"><%: T("Publish")%></a><%: T(" | ")%><%
|
|
||||||
} %>
|
|
||||||
<%: Html.ActionLink(T("Edit").ToString(), "Edit", new { id = pageEntry.Page.Id }, new { title = T("Edit Page").ToString() })%><%: T(" | ")%>
|
|
||||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = pageEntry.Page.Id})) %>" title="<%: T("Remove Page")%>"><%: T("Remove")%></a>
|
|
||||||
</div>
|
|
||||||
<div style="clear:both;"></div>
|
|
||||||
</div>
|
|
||||||
</li><%
|
|
||||||
pageIndex++;
|
|
||||||
} %>
|
|
||||||
</ul>
|
|
||||||
</fieldset><%
|
|
||||||
} %>
|
|
||||||
<div class="manage"><%: Html.ActionLink(T("Add a page").ToString(), "Create", new { }, new { @class = "button primaryAction" })%></div>
|
|
@@ -1,7 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
<h3><a href="<%:Url.Action("Item", "Page", new { area = "Orchard.Pages", slug = Model.Item.Slug }) %>"><%: Model.Item.Title %></a></h3>
|
|
||||||
<div class="content">
|
|
||||||
<% Html.Zone("primary", ":manage :metadata"); %>
|
|
||||||
</div>
|
|
@@ -1,24 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
|
|
||||||
<div class="summary">
|
|
||||||
<div class="properties">
|
|
||||||
<h3><%:Html.ActionLink(Model.Item.Title, "Edit", new { id = Model.Item.Id }) %></h3><%
|
|
||||||
Html.Zone("metadata"); %>
|
|
||||||
</div>
|
|
||||||
<div class="related"><%
|
|
||||||
if (Model.Item.HasPublished) { %>
|
|
||||||
<%:Html.ActionLink("View", "Item", new { controller = "Page", slug = Model.Item.PublishedSlug }, new { title = T("View Page") }) %><%:T(" | ") %><%
|
|
||||||
if (Model.Item.HasDraft) { %>
|
|
||||||
<a href="<%:Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = Model.Item.Id})) %>" title="<%:T("Publish Draft") %>"><%:T("Publish Draft") %></a><%:T(" | ") %><%
|
|
||||||
} %>
|
|
||||||
<a href="<%:Html.AntiForgeryTokenGetUrl(Url.Action("Unpublish", new {id = Model.Item.Id})) %>" title="<%:T("Unpublish Page") %>"><%:T("Unpublish") %></a><%:T(" | ") %><%
|
|
||||||
}
|
|
||||||
else { %>
|
|
||||||
<a href="<%:Html.AntiForgeryTokenGetUrl(Url.Action("Publish", new {id = Model.Item.Id})) %>" title="<%:T("Publish Page")%>"><%:T("Publish") %></a><%:T(" | ") %><%
|
|
||||||
} %>
|
|
||||||
<%:Html.ActionLink(T("Edit").ToString(), "Edit", new { id = Model.Item.Id }, new { title = T("Edit Page").ToString() })%><%:T(" | ") %>
|
|
||||||
<a href="<%:Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = Model.Item.Id})) %>" title="<%:T("Remove Page") %>"><%:T("Remove") %></a>
|
|
||||||
</div>
|
|
||||||
<div style="clear:both;"></div>
|
|
||||||
<% Html.Zone("primary"); %>
|
|
||||||
</div>
|
|
@@ -1,6 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
<h1><%: Html.TitleForPage(Model.Item.Title)%></h1>
|
|
||||||
<% Html.Zone("primary", ":manage :metadata");
|
|
||||||
Html.ZonesAny(); %>
|
|
@@ -1,20 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
<% Html.AddTitleParts(Model.Item.Title); %>
|
|
||||||
<div class="sections">
|
|
||||||
<div class="primary"><%
|
|
||||||
Html.Zone("primary");
|
|
||||||
Html.ZonesExcept("secondary"); %>
|
|
||||||
</div>
|
|
||||||
<div class="secondary">
|
|
||||||
<% Html.Zone("secondary");%>
|
|
||||||
<fieldset>
|
|
||||||
<input class="button primaryAction" type="submit" name="submit.Save" value="<%: T("Save") %>"/><%
|
|
||||||
//TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to
|
|
||||||
if (Model.Item.HasDraft && Model.Item.HasPublished) { %>
|
|
||||||
<%: Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Pages", Controller = "Admin", id = Model.Item.Id}), new {@class = "button"})%><%
|
|
||||||
} %>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@@ -1,4 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PageViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
|
||||||
<%: Html.DisplayForItem(m=>m.Page) %>
|
|
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<configuration>
|
|
||||||
<system.web>
|
|
||||||
<httpHandlers>
|
|
||||||
<add path="*" verb="*"
|
|
||||||
type="System.Web.HttpNotFoundHandler"/>
|
|
||||||
</httpHandlers>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Enabling request validation in view pages would cause validation to occur
|
|
||||||
after the input has already been processed by the controller. By default
|
|
||||||
MVC performs request validation before a controller processes the input.
|
|
||||||
To change this behavior apply the ValidateInputAttribute to a
|
|
||||||
controller or action.
|
|
||||||
-->
|
|
||||||
<pages
|
|
||||||
validateRequest="false"
|
|
||||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
|
||||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
|
||||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
|
||||||
<controls>
|
|
||||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
|
||||||
</controls>
|
|
||||||
</pages>
|
|
||||||
</system.web>
|
|
||||||
|
|
||||||
<system.webServer>
|
|
||||||
<validation validateIntegratedModeConfiguration="false"/>
|
|
||||||
<handlers>
|
|
||||||
<remove name="BlockViewHandler"/>
|
|
||||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
|
|
||||||
</handlers>
|
|
||||||
</system.webServer>
|
|
||||||
</configuration>
|
|
@@ -1,24 +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>
|
|
@@ -100,6 +100,8 @@
|
|||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
<Content Include="Refresh.html" />
|
<Content Include="Refresh.html" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Contents.Item.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Contents.Item.ascx" />
|
||||||
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Blogs.BlogPost.Metadata.ascx" />
|
||||||
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Blogs.BlogPost.Metadata.ascx" />
|
||||||
<Content Include="Themes\TheAdmin\Scripts\admin.js" />
|
<Content Include="Themes\TheAdmin\Scripts\admin.js" />
|
||||||
<Content Include="Themes\TheAdmin\Styles\ie.css" />
|
<Content Include="Themes\TheAdmin\Styles\ie.css" />
|
||||||
<Content Include="Themes\TheAdmin\Styles\images\menuClosed.gif" />
|
<Content Include="Themes\TheAdmin\Styles\images\menuClosed.gif" />
|
||||||
@@ -146,7 +148,7 @@
|
|||||||
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Items\Blogs.BlogPost.Summary.ascx" />
|
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Items\Blogs.BlogPost.Summary.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Parts\Blogs.BlogPost.Metadata.ascx" />
|
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Parts\Blogs.BlogPost.Metadata.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Parts\Pages.Page.Metadata.ascx" />
|
<Content Include="Themes\ClassicDark\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\Footer.ascx" />
|
<Content Include="Themes\ClassicDark\Views\Footer.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\Layout.ascx" />
|
<Content Include="Themes\ClassicDark\Views\Layout.ascx" />
|
||||||
<Content Include="Themes\ClassicDark\Views\ZoneTest.ascx" />
|
<Content Include="Themes\ClassicDark\Views\ZoneTest.ascx" />
|
||||||
@@ -162,7 +164,7 @@
|
|||||||
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.Blog.Summary.ascx" />
|
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.Blog.Summary.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.Summary.ascx" />
|
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.Summary.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\DisplayTemplates\Parts\Pages.Page.Metadata.ascx" />
|
<Content Include="Themes\Classic\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\Footer.ascx" />
|
<Content Include="Themes\Classic\Views\Footer.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\Layout.ascx" />
|
<Content Include="Themes\Classic\Views\Layout.ascx" />
|
||||||
<Content Include="Themes\Classic\Views\ZoneTest.ascx" />
|
<Content Include="Themes\Classic\Views\ZoneTest.ascx" />
|
||||||
@@ -194,10 +196,10 @@
|
|||||||
<Content Include="Themes\Contoso\Zones\Sidebar-w1.html" />
|
<Content Include="Themes\Contoso\Zones\Sidebar-w1.html" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Pages.Page.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Contents.Item.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.BlogPost.ListByArchive.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Items\Blogs.BlogPost.ListByArchive.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Comments.Comments.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Comments.Comments.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Pages.Page.Metadata.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
||||||
<Content Include="Themes\Contoso\Views\Header.ascx" />
|
<Content Include="Themes\Contoso\Views\Header.ascx" />
|
||||||
<Content Include="Themes\Contoso\Scripts\easySlider.js" />
|
<Content Include="Themes\Contoso\Scripts\easySlider.js" />
|
||||||
@@ -239,9 +241,9 @@
|
|||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.BlogPost.ListByArchive.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Blogs.BlogPost.ListByArchive.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Pages.Page.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Items\Contents.Item.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Comments.Comments.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Comments.Comments.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Pages.Page.Metadata.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
<Content Include="Themes\Corporate\Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\Footer.ascx" />
|
<Content Include="Themes\Corporate\Views\Footer.ascx" />
|
||||||
<Content Include="Themes\Corporate\Views\Header.ascx" />
|
<Content Include="Themes\Corporate\Views\Header.ascx" />
|
||||||
@@ -278,7 +280,7 @@
|
|||||||
<Content Include="Themes\Green\Styles\yui.css" />
|
<Content Include="Themes\Green\Styles\yui.css" />
|
||||||
<Content Include="Themes\Green\Theme.png" />
|
<Content Include="Themes\Green\Theme.png" />
|
||||||
<Content Include="Themes\Green\Theme.txt" />
|
<Content Include="Themes\Green\Theme.txt" />
|
||||||
<Content Include="Themes\Green\Views\DisplayTemplates\Parts\Pages.Page.Metadata.ascx" />
|
<Content Include="Themes\Green\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||||
<Content Include="Themes\Green\Views\Layout.HomePage.ascx" />
|
<Content Include="Themes\Green\Views\Layout.HomePage.ascx" />
|
||||||
<Content Include="Themes\Green\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
<Content Include="Themes\Green\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
|
||||||
<Content Include="Themes\Green\Views\DisplayTemplates\Items\Blogs.Blog.Summary.ascx" />
|
<Content Include="Themes\Green\Views\DisplayTemplates\Items\Blogs.Blog.Summary.ascx" />
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Pages.Models.Page>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<%--<div class="metadata">
|
<%--<div class="metadata">
|
||||||
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
@@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Pages.Models.Page>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<%--<div class="metadata">
|
<%--<div class="metadata">
|
||||||
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
@@ -1,6 +1,8 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Security"%>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
|
||||||
<h1 class="page-title"><%:Html.ItemDisplayText(Model.Item)%></h1>
|
<h1 class="page-title"><%:Html.ItemDisplayText(Model.Item)%></h1>
|
||||||
<% Html.Zone("metadata");
|
<% Html.Zone("metadata");
|
||||||
Html.Zone("primary", ":manage :metadata");
|
Html.Zone("primary", ":manage :metadata");
|
||||||
Html.ZonesAny(); %>
|
Html.ZonesAny(); %>
|
@@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Pages.Models.Page>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<%--<div class="metadata">
|
<%--<div class="metadata">
|
||||||
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
@@ -1,10 +1,8 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Security"%>
|
<%@ Import Namespace="Orchard.Security"%>
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
|
<div class="page-title"><%:Html.ItemDisplayText(Model.Item) %></div>
|
||||||
<div class="page-title"><%: Html.TitleForPage(Model.Item.Title)%></div>
|
|
||||||
|
|
||||||
<%--<% if (Html.Resolve<IAuthenticationService>().GetAuthenticatedUser() != null){ %>
|
<%--<% if (Html.Resolve<IAuthenticationService>().GetAuthenticatedUser() != null){ %>
|
||||||
<%} %>--%>
|
<%} %>--%>
|
||||||
|
|
@@ -1,16 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<Orchard.Pages.Models.Page>>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Security"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
|
|
||||||
<div class="page-title"><%: Html.TitleForPage(Model.Item.Title)%></div>
|
|
||||||
|
|
||||||
<%--<% if (Html.Resolve<IAuthenticationService>().GetAuthenticatedUser() != null){ %>
|
|
||||||
<%} %>--%>
|
|
||||||
|
|
||||||
<% Html.Zone("primary");
|
|
||||||
Html.ZonesAny(); %>
|
|
||||||
|
|
||||||
<%--<% if (Html.Resolve<IAuthenticationService>().GetAuthenticatedUser() != null){ %>
|
|
||||||
</a>
|
|
||||||
<%} %>--%>
|
|
@@ -1,4 +1,4 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Pages.Models.Page>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<%--<div class="metadata">
|
<%--<div class="metadata">
|
||||||
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
@@ -0,0 +1,5 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
|
<%--<div class="metadata">
|
||||||
|
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
||||||
|
</div>--%>
|
@@ -1,5 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Pages.Models.Page>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
<%--<div class="metadata">
|
|
||||||
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
|
|
||||||
</div>--%>
|
|
@@ -41,8 +41,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.DevTools", "Orchard
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tags", "Orchard.Web\Modules\Orchard.Tags\Orchard.Tags.csproj", "{5D0F00F0-26C9-4785-AD61-B85710C60EB0}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tags", "Orchard.Web\Modules\Orchard.Tags\Orchard.Tags.csproj", "{5D0F00F0-26C9-4785-AD61-B85710C60EB0}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Pages", "Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj", "{4A9C04A6-0986-4A92-A610-5F59FF273FB9}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Setup", "Orchard.Web\Modules\Orchard.Setup\Orchard.Setup.csproj", "{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Setup", "Orchard.Web\Modules\Orchard.Setup\Orchard.Setup.csproj", "{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSBuild.Orchard.Tasks", "Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj", "{5E5E7A21-C7B2-44D8-8593-2F9541AE041D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSBuild.Orchard.Tasks", "Tools\MSBuild.Orchard.Tasks\MSBuild.Orchard.Tasks.csproj", "{5E5E7A21-C7B2-44D8-8593-2F9541AE041D}"
|
||||||
@@ -145,10 +143,6 @@ Global
|
|||||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
{5D0F00F0-26C9-4785-AD61-B85710C60EB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
@@ -227,7 +221,6 @@ Global
|
|||||||
{14C049FD-B35B-415A-A824-87F26B26E7FD} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{14C049FD-B35B-415A-A824-87F26B26E7FD} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
{67C1D3AF-A0EC-46B2-BAE1-DF1DA8E0B890} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{67C1D3AF-A0EC-46B2-BAE1-DF1DA8E0B890} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
{5D0F00F0-26C9-4785-AD61-B85710C60EB0} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{5D0F00F0-26C9-4785-AD61-B85710C60EB0} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
{4A9C04A6-0986-4A92-A610-5F59FF273FB9} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
|
||||||
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
{72457126-E118-4171-A08F-9A709EE4B7FC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{72457126-E118-4171-A08F-9A709EE4B7FC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
{CDE24A24-01D3-403C-84B9-37722E18DFB7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
{CDE24A24-01D3-403C-84B9-37722E18DFB7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||||
|
@@ -115,10 +115,6 @@
|
|||||||
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
||||||
<Name>Orchard.Media</Name>
|
<Name>Orchard.Media</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="Modules\Orchard.Pages\Orchard.Pages.csproj">
|
|
||||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
|
||||||
<Name>Orchard.Pages</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="Modules\Orchard.Roles\Orchard.Roles.csproj">
|
<ProjectReference Include="Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||||
<Name>Orchard.Roles</Name>
|
<Name>Orchard.Roles</Name>
|
||||||
|