Revision 746:2ced57750157
| vendor/plugins/redmine_tags/app/views/projects/_tags.html.erb | ||
|---|---|---|
| 1 |
<% unless project.tag_list.empty? %> |
|
| 1 |
<% unless @project.tag_list.empty? %>
|
|
| 2 | 2 |
<tr> |
| 3 | 3 |
<td><b><%=l(:tags)%>:</b></td> |
| 4 | 4 |
<td><%= project.tag_counts.collect{ |t| render_tag_link(t, :show_count => false, :open_only => false) }.join(', ') %></td>
|
| vendor/plugins/redmine_tags/config/locales/en.yml | ||
|---|---|---|
| 33 | 33 |
issue_tags_sidebar_cloud: Cloud |
| 34 | 34 |
|
| 35 | 35 |
auto_complete_new_tag: Add new... |
| 36 |
|
|
| 37 |
project_filtering_q_label: "Textual search" |
|
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/auto_completes_controller_patch.rb | ||
|---|---|---|
| 35 | 35 |
|
| 36 | 36 |
def project_tags |
| 37 | 37 |
@name = params[:q].to_s |
| 38 |
@tags = Project.available_tags :project_id => @project, :name_like => @name
|
|
| 38 |
@tags = Project.available_tags :name_like => @name |
|
| 39 | 39 |
render :layout => false, :partial => 'tag_list' |
| 40 | 40 |
end |
| 41 | 41 |
end |
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/project_patch.rb | ||
|---|---|---|
| 59 | 59 |
|
| 60 | 60 |
# Returns available project tags |
| 61 | 61 |
# does not show tags from private projects |
| 62 |
def available_tags |
|
| 62 |
def available_tags( options = {} )
|
|
| 63 |
|
|
| 64 |
name_like = options[:name_like] |
|
| 63 | 65 |
options = {}
|
| 64 | 66 |
visible = ARCondition.new |
| 65 | 67 |
|
| 66 | 68 |
visible << ["#{Project.table_name}.is_public = \"1\""]
|
| 69 |
|
|
| 70 |
if name_like |
|
| 71 |
visible << ["#{ActsAsTaggableOn::Tag.table_name}.name LIKE ?", "%#{name_like.downcase}%"]
|
|
| 72 |
end |
|
| 73 |
|
|
| 67 | 74 |
options[:conditions] = visible.conditions |
| 75 |
|
|
| 68 | 76 |
self.all_tag_counts(options) |
| 69 | 77 |
end |
| 70 | 78 |
end |
Also available in: Unified diff