Revision 1015:52be96e83080 vendor/plugins
| vendor/plugins/redmine_tags/app/controllers/tags_controller.rb | ||
|---|---|---|
| 1 |
class TagsController < ApplicationController |
|
| 2 |
|
|
| 3 |
def index |
|
| 4 |
respond_to do |format| |
|
| 5 |
format.html {
|
|
| 6 |
render :template => 'tags/index.html.erb', :layout => !request.xhr? |
|
| 7 |
} |
|
| 8 |
format.api {
|
|
| 9 |
} |
|
| 10 |
format.atom {
|
|
| 11 |
} |
|
| 12 |
end |
|
| 13 |
end |
|
| 14 |
|
|
| 15 |
end |
|
| vendor/plugins/redmine_tags/app/helpers/tags_helper.rb | ||
|---|---|---|
| 40 | 40 |
content_tag('span', content, :class => 'tag-label')
|
| 41 | 41 |
end |
| 42 | 42 |
|
| 43 |
def render_project_tag_link(tag) |
|
| 43 |
def render_project_tag_link(tag, options = {})
|
|
| 44 | 44 |
content = link_to tag.name, :controller => :projects, :action => :index, :project => { :tag_list => tag.name }
|
| 45 |
if options[:show_count] |
|
| 46 |
content << content_tag('span', "(#{tag.count})", :class => 'tag-count')
|
|
| 47 |
end |
|
| 45 | 48 |
content_tag('span', content, :class => 'tag-label')
|
| 46 | 49 |
end |
| 47 | 50 |
|
| ... | ... | |
| 73 | 76 |
end |
| 74 | 77 |
|
| 75 | 78 |
tag_cloud tags, (1..8).to_a do |tag, weight| |
| 76 |
content << " " + content_tag(item_el, render_tag_link(tag, options), :class => "tag-nube-#{weight}") + " "
|
|
| 79 |
content << " " + content_tag(item_el, render_project_tag_link(tag, options), :class => "tag-nube-#{weight}") + " "
|
|
| 77 | 80 |
end |
| 78 | 81 |
|
| 79 | 82 |
content_tag(list_el, content, :class => 'tags') |
| vendor/plugins/redmine_tags/app/views/projects/_tagcloud.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 3 |
<% end %> |
|
| 4 |
|
|
| 5 |
<div id="tags"> |
|
| 6 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
|
| 7 |
</div> |
|
| 8 |
|
|
| 9 |
|
|
| vendor/plugins/redmine_tags/app/views/projects/index.html.erb | ||
|---|---|---|
| 11 | 11 |
</div> |
| 12 | 12 |
|
| 13 | 13 |
|
| 14 |
|
|
| 15 | 14 |
<div style="clear:both;"></div> |
| 16 | 15 |
<% if User.current.logged? %> |
| 17 | 16 |
<%= render :partial => 'my_projects' %> |
| vendor/plugins/redmine_tags/app/views/tags/index.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
|
| 3 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 4 |
<% end %> |
|
| 5 |
|
|
| 6 |
|
|
| 7 |
<div style="clear:both;"></div> |
|
| 8 |
<h2> |
|
| 9 |
<%= l("label_project_tags_all") %>
|
|
| 10 |
</h2> |
|
| 11 |
|
|
| 12 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
|
| 13 |
|
|
| vendor/plugins/redmine_tags/assets/stylesheets/redmine_tags.css | ||
|---|---|---|
| 22 | 22 |
ul.tags li { margin: .25em 0px; }
|
| 23 | 23 |
|
| 24 | 24 |
div.tags { text-align: center; }
|
| 25 |
div.tags h3 { text-align: left; }
|
|
| 25 | 26 |
div.tags .tag-label { margin: .25em; }
|
| 26 | 27 |
div.tags .tag-nube-1 { font-size: .8em; }
|
| 27 | 28 |
div.tags .tag-nube-2 { font-size: .9em; }
|
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb | ||
|---|---|---|
| 4 | 4 |
|
| 5 | 5 |
def self.included(base) # :nodoc: |
| 6 | 6 |
base.send(:include, InstanceMethods) |
| 7 |
base.send(:include, TagsHelper) |
|
| 7 | 8 |
base.class_eval do |
| 8 | 9 |
unloadable |
| 9 | 10 |
end |
Also available in: Unified diff