mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
- Refactoring the Tags controller to a home controller.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042247
This commit is contained in:
@@ -13,14 +13,13 @@ using Orchard.UI.Notify;
|
|||||||
using Orchard.Security;
|
using Orchard.Security;
|
||||||
|
|
||||||
namespace Orchard.Tags.Controllers {
|
namespace Orchard.Tags.Controllers {
|
||||||
//TODO: might as well make this the home controller...
|
|
||||||
[ValidateInput(false)]
|
[ValidateInput(false)]
|
||||||
public class TagsController : Controller {
|
public class HomeController : Controller {
|
||||||
private readonly ITagService _tagService;
|
private readonly ITagService _tagService;
|
||||||
private readonly IAuthorizer _authorizer;
|
private readonly IAuthorizer _authorizer;
|
||||||
private readonly INotifier _notifier;
|
private readonly INotifier _notifier;
|
||||||
|
|
||||||
public TagsController(ITagService tagService, INotifier notifier, IAuthorizer authorizer) {
|
public HomeController(ITagService tagService, INotifier notifier, IAuthorizer authorizer) {
|
||||||
_tagService = tagService;
|
_tagService = tagService;
|
||||||
_authorizer = authorizer;
|
_authorizer = authorizer;
|
||||||
_notifier = notifier;
|
_notifier = notifier;
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AdminMenu.cs" />
|
<Compile Include="AdminMenu.cs" />
|
||||||
<Compile Include="Controllers\AdminController.cs" />
|
<Compile Include="Controllers\AdminController.cs" />
|
||||||
<Compile Include="Controllers\TagsController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Models\Tag.cs" />
|
<Compile Include="Models\Tag.cs" />
|
||||||
<Compile Include="Models\TagSettings.cs" />
|
<Compile Include="Models\TagSettings.cs" />
|
||||||
<Compile Include="Models\TagsHandler.cs" />
|
<Compile Include="Models\TagsHandler.cs" />
|
||||||
@@ -83,10 +83,10 @@
|
|||||||
<Content Include="Views\Admin\Edit.aspx" />
|
<Content Include="Views\Admin\Edit.aspx" />
|
||||||
<Content Include="Views\Admin\Index.aspx" />
|
<Content Include="Views\Admin\Index.aspx" />
|
||||||
<Content Include="Views\Admin\Search.aspx" />
|
<Content Include="Views\Admin\Search.aspx" />
|
||||||
|
<Content Include="Views\Home\Index.aspx" />
|
||||||
|
<Content Include="Views\Home\Search.aspx" />
|
||||||
<Content Include="Views\Models\DisplayTemplates\HasTags.ascx" />
|
<Content Include="Views\Models\DisplayTemplates\HasTags.ascx" />
|
||||||
<Content Include="Views\Models\EditorTemplates\TagSettingsRecord.ascx" />
|
<Content Include="Views\Models\EditorTemplates\TagSettingsRecord.ascx" />
|
||||||
<Content Include="Views\Tags\Index.aspx" />
|
|
||||||
<Content Include="Views\Tags\Search.aspx" />
|
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -44,10 +44,10 @@
|
|||||||
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[tagIndex].IsChecked)%>"/>
|
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[tagIndex].IsChecked)%>"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%=Html.ActionLink(tagEntry.Tag.TagName, "Search", new {id = tagEntry.Tag.Id}, new {@class="floatRight topSpacer"}) %>
|
<%=Html.ActionLink(tagEntry.Tag.TagName, "Search", new {id = tagEntry.Tag.Id}) %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}, new {@class="floatRight topSpacer"}) %>
|
<%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% tagIndex++; } %>
|
<% tagIndex++; } %>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<%=Html.ValidationSummary() %>
|
<%=Html.ValidationSummary() %>
|
||||||
<table id="Table1" cellspacing="0" class="roundCorners clearLayout">
|
<table id="Table1" cellspacing="0" class="roundCorners clearLayout">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
<col id="Col1" />
|
||||||
<col id="Col2" />
|
<col id="Col2" />
|
||||||
<col id="Col3" />
|
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsIndexViewModel>" %>
|
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<TagsIndexViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<% Html.Include("Header"); %>
|
<% Html.Include("Header"); %>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Tags.Models"%>
|
<%@ Import Namespace="Orchard.Tags.Models"%>
|
||||||
<h3>Tags</h3>
|
<h3>Tags</h3>
|
||||||
<% Html.BeginForm("Edit", "Tags", new { area = "Orchard.Tags" }); %>
|
<% Html.BeginForm("Edit", "Home", new { area = "Orchard.Tags" }); %>
|
||||||
<%= Html.ValidationSummary() %>
|
<%= Html.ValidationSummary() %>
|
||||||
<div class="yui-g">
|
<div class="yui-g">
|
||||||
<h2 class="separator">Edit Tags</h2>
|
<h2 class="separator">Edit Tags</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user