Revision 1259:94a6e3687c45 plugins
| plugins/redmine_tags/app/helpers/tags_helper.rb | ||
|---|---|---|
| 41 | 41 |
end |
| 42 | 42 |
|
| 43 | 43 |
def render_project_tag_link(tag, options = {})
|
| 44 |
content = link_to tag.name, :controller => :projects, :action => :index, :project => { :tag_list => tag.name }
|
|
| 44 |
content = link_to tag.name, :controller => :projects, :action => :index, :tag_search => tag.name |
|
| 45 |
|
|
| 45 | 46 |
if options[:show_count] |
| 46 | 47 |
content << content_tag('span', "(#{tag.count})", :class => 'tag-count')
|
| 47 | 48 |
end |
| plugins/redmine_tags/app/views/projects/_filter_search_tags.html.erb | ||
|---|---|---|
| 1 |
<p class='tag'> |
|
| 2 |
<%- fields_for @project do |f| -%> |
|
| 3 |
<div> |
|
| 4 |
<p id="project_tags"> |
|
| 5 |
<%= f.text_field :tag_list, :label => :label_tags_search, :size => 60, :class => 'hol' -%> |
|
| 6 |
</p> |
|
| 7 |
<div id="project_tag_candidates" class="autocomplete"></div> |
|
| 8 |
<%= javascript_include_tag 'tags_input', :plugin => 'redmine_tags' -%> |
|
| 9 |
<%= javascript_tag "observeProjectTagsField('#{url_for(:controller => 'auto_completes', :action => 'project_search_tags')}', true)" -%>
|
|
| 10 |
</div> |
|
| 11 |
<%- end -%> |
|
| 12 |
</p> |
|
| 1 |
<div> |
|
| 2 |
<p id="project_tags"><%= text_field_tag 'tag_search', params[:tag_search] -%> |
|
| 3 |
<br /> |
|
| 4 |
<em class="info"><%= l(:text_tags_info).html_safe %></em> |
|
| 5 |
</p> |
|
| 6 |
<div id="project_tag_candidates" class="autocomplete"></div> |
|
| 7 |
<%= stylesheet_link_tag 'jquery.tagit.css', :plugin => 'redmine_tags' %> |
|
| 8 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 9 |
<%= javascript_include_tag 'tag-it', :plugin => 'redmine_tags' %> |
|
| 10 |
|
|
| 11 |
<%= javascript_tag "$('#tag_search').tagit({
|
|
| 12 |
tagSource: function(search, showChoices) {
|
|
| 13 |
var that = this; |
|
| 14 |
$.ajax({
|
|
| 15 |
url: '#{url_for(:controller => 'auto_completes', :action => 'project_tags')}',
|
|
| 16 |
data: {q: search.term},
|
|
| 17 |
success: function(choices) {
|
|
| 18 |
showChoices(that._subtractArray(jQuery.parseJSON(choices), that.assignedTags())); |
|
| 19 |
} |
|
| 20 |
}); |
|
| 21 |
}, |
|
| 22 |
}); |
|
| 23 |
" %> |
|
| 24 |
|
|
| 25 |
</div> |
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb | ||
|---|---|---|
| 111 | 111 |
end |
| 112 | 112 |
|
| 113 | 113 |
# search for tags |
| 114 |
if params.has_key?(:project)
|
|
| 115 |
tag_list = (params[:project][:tag_list] || "").strip.split(",")
|
|
| 114 |
if params.has_key?(:tag_search)
|
|
| 115 |
tag_list = (params[:tag_search] || "").strip.split(",")
|
|
| 116 | 116 |
else |
| 117 | 117 |
tag_list = "" |
| 118 | 118 |
end |
Also available in: Unified diff