# HG changeset patch # User Chris Cannam # Date 1352472046 0 # Node ID a2660a5eb3957828bc3f18cb338a69621a64cc92 # Parent c1b8a34d3560b90043972a6592e9275aee57f4cd Some work towards interesting ways of browsing projects diff -r c1b8a34d3560 -r a2660a5eb395 vendor/plugins/redmine_tags/app/controllers/tags_controller.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_tags/app/controllers/tags_controller.rb Fri Nov 09 14:40:46 2012 +0000 @@ -0,0 +1,15 @@ +class TagsController < ApplicationController + + def index + respond_to do |format| + format.html { + render :template => 'tags/index.html.erb', :layout => !request.xhr? + } + format.api { + } + format.atom { + } + end + end + +end diff -r c1b8a34d3560 -r a2660a5eb395 vendor/plugins/redmine_tags/app/helpers/tags_helper.rb --- a/vendor/plugins/redmine_tags/app/helpers/tags_helper.rb Fri Nov 09 13:58:49 2012 +0000 +++ b/vendor/plugins/redmine_tags/app/helpers/tags_helper.rb Fri Nov 09 14:40:46 2012 +0000 @@ -40,8 +40,11 @@ content_tag('span', content, :class => 'tag-label') end - def render_project_tag_link(tag) + def render_project_tag_link(tag, options = {}) content = link_to tag.name, :controller => :projects, :action => :index, :project => { :tag_list => tag.name } + if options[:show_count] + content << content_tag('span', "(#{tag.count})", :class => 'tag-count') + end content_tag('span', content, :class => 'tag-label') end @@ -73,7 +76,7 @@ end tag_cloud tags, (1..8).to_a do |tag, weight| - content << " " + content_tag(item_el, render_tag_link(tag, options), :class => "tag-nube-#{weight}") + " " + content << " " + content_tag(item_el, render_project_tag_link(tag, options), :class => "tag-nube-#{weight}") + " " end content_tag(list_el, content, :class => 'tags') diff -r c1b8a34d3560 -r a2660a5eb395 vendor/plugins/redmine_tags/app/views/projects/index.html.erb --- a/vendor/plugins/redmine_tags/app/views/projects/index.html.erb Fri Nov 09 13:58:49 2012 +0000 +++ b/vendor/plugins/redmine_tags/app/views/projects/index.html.erb Fri Nov 09 14:40:46 2012 +0000 @@ -11,7 +11,6 @@ -
<% if User.current.logged? %> <%= render :partial => 'my_projects' %> diff -r c1b8a34d3560 -r a2660a5eb395 vendor/plugins/redmine_tags/app/views/tags/index.html.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_tags/app/views/tags/index.html.erb Fri Nov 09 14:40:46 2012 +0000 @@ -0,0 +1,13 @@ +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %> + <%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> +<% end %> + + +
+

+ <%= l("label_project_tags_all") %> +

+ +<%= render_tags_list(Project.available_tags, :style => :cloud) %> +