To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / plugins / redmine_tags / app / helpers / issues_helper.rb @ 1309:5ed688bfd441
History | View | Annotate | Download (1.41 KB)
| 1 |
# This file is a part of redmine_tags
|
|---|---|
| 2 |
# redMine plugin, that adds tagging support.
|
| 3 |
#
|
| 4 |
# Copyright (c) 2010 Aleksey V Zapparov AKA ixti
|
| 5 |
#
|
| 6 |
# redmine_tags is free software: you can redistribute it and/or modify
|
| 7 |
# it under the terms of the GNU General Public License as published by
|
| 8 |
# the Free Software Foundation, either version 3 of the License, or
|
| 9 |
# (at your option) any later version.
|
| 10 |
#
|
| 11 |
# redmine_tags is distributed in the hope that it will be useful,
|
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
# GNU General Public License for more details.
|
| 15 |
#
|
| 16 |
# You should have received a copy of the GNU General Public License
|
| 17 |
# along with redmine_tags. If not, see <http://www.gnu.org/licenses/>.
|
| 18 |
|
| 19 |
module IssuesHelper |
| 20 |
include TagsHelper
|
| 21 |
|
| 22 |
def sidebar_tags |
| 23 |
unless @sidebar_tags |
| 24 |
@sidebar_tags = []
|
| 25 |
if :none != RedmineTags.settings[:issues_sidebar].to_sym |
| 26 |
@sidebar_tags = Issue.available_tags({ |
| 27 |
:project => @project, |
| 28 |
:open_only => (RedmineTags.settings[:issues_open_only].to_i == 1) |
| 29 |
}) |
| 30 |
end
|
| 31 |
end
|
| 32 |
@sidebar_tags
|
| 33 |
end
|
| 34 |
|
| 35 |
def render_sidebar_tags |
| 36 |
render_tags_list(sidebar_tags, {
|
| 37 |
:show_count => (RedmineTags.settings[:issues_show_count].to_i == 1), |
| 38 |
:open_only => (RedmineTags.settings[:issues_open_only].to_i == 1), |
| 39 |
:style => RedmineTags.settings[:issues_sidebar].to_sym |
| 40 |
}) |
| 41 |
end
|
| 42 |
end
|