- 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:
suhacan
2009-11-25 22:56:03 +00:00
parent 17e2f9f5ed
commit 92eb3260ec
7 changed files with 10 additions and 11 deletions

View File

@@ -13,14 +13,13 @@ using Orchard.UI.Notify;
using Orchard.Security;
namespace Orchard.Tags.Controllers {
//TODO: might as well make this the home controller...
[ValidateInput(false)]
public class TagsController : Controller {
public class HomeController : Controller {
private readonly ITagService _tagService;
private readonly IAuthorizer _authorizer;
private readonly INotifier _notifier;
public TagsController(ITagService tagService, INotifier notifier, IAuthorizer authorizer) {
public HomeController(ITagService tagService, INotifier notifier, IAuthorizer authorizer) {
_tagService = tagService;
_authorizer = authorizer;
_notifier = notifier;

View File

@@ -63,7 +63,7 @@
<ItemGroup>
<Compile Include="AdminMenu.cs" />
<Compile Include="Controllers\AdminController.cs" />
<Compile Include="Controllers\TagsController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Models\Tag.cs" />
<Compile Include="Models\TagSettings.cs" />
<Compile Include="Models\TagsHandler.cs" />
@@ -83,10 +83,10 @@
<Content Include="Views\Admin\Edit.aspx" />
<Content Include="Views\Admin\Index.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\EditorTemplates\TagSettingsRecord.ascx" />
<Content Include="Views\Tags\Index.aspx" />
<Content Include="Views\Tags\Search.aspx" />
<Content Include="Web.config" />
<Content Include="Views\Web.config" />
</ItemGroup>

View File

@@ -44,10 +44,10 @@
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.Tags[tagIndex].IsChecked)%>"/>
</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>
<%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}, new {@class="floatRight topSpacer"}) %>
<%=Html.ActionLink("Edit", "Edit", new {id = tagEntry.Tag.Id}) %>
</td>
</tr>
<% tagIndex++; } %>

View File

@@ -9,8 +9,8 @@
<%=Html.ValidationSummary() %>
<table id="Table1" cellspacing="0" class="roundCorners clearLayout">
<colgroup>
<col id="Col1" />
<col id="Col2" />
<col id="Col3" />
</colgroup>
<thead>
<tr>

View File

@@ -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.Mvc.Html"%>
<% Html.Include("Header"); %>

View File

@@ -2,7 +2,7 @@
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Tags.Models"%>
<h3>Tags</h3>
<% Html.BeginForm("Edit", "Tags", new { area = "Orchard.Tags" }); %>
<% Html.BeginForm("Edit", "Home", new { area = "Orchard.Tags" }); %>
<%= Html.ValidationSummary() %>
<div class="yui-g">
<h2 class="separator">Edit Tags</h2>