Updating HasTagsList.ascx to display tags in a comma delimited list.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042868
This commit is contained in:
ErikPorter
2009-12-01 22:54:15 +00:00
parent 6a9cb33c13
commit caf8009d4a
2 changed files with 10 additions and 5 deletions

View File

@@ -99,6 +99,7 @@
<Content Include="Package.txt" />
<Content Include="Views\BlogPost\Create.aspx" />
<Content Include="Views\BlogPost\Edit.aspx" />
<Content Include="Views\BlogPost\EditorTemplates\BlogPostEditViewModel.ascx" />
<Content Include="Views\Blog\ListForAdmin.aspx" />
<Content Include="Views\Shared\BlogPostPreview.ascx" />
<Content Include="Views\BlogPost\EditorTemplates\CreateBlogPostViewModel.ascx" />

View File

@@ -1,8 +1,12 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<HasTags>" %>
<%@ Import Namespace="Orchard.Mvc.Html" %>
<%@ Import Namespace="Orchard.Tags.Models" %>
<ul class="tags">
<%foreach (var tag in Model.CurrentTags) {%>
<li class="tag"><%=Html.ActionLink(tag.TagName, "Search", "Home", new{ area="Orchard.Tags", tagName=tag.TagName},new{}) %></li>
<%}%>
</ul>
Tag<%=Model.CurrentTags.Count == 1 ? "" : "s" %>: <%
int tagCount = 0;
foreach (Tag tag in Model.CurrentTags) {
if (tagCount > 0) {
%>, <%
}
%><%=Html.ActionLink(tag.TagName, "Search", "Home", new{ area="Orchard.Tags", tagName=tag.TagName}, new {}) %><%
tagCount++;
} %>