Revision 786:ae82810661da vendor
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb | ||
|---|---|---|
| 76 | 76 |
respond_to do |format| |
| 77 | 77 |
format.html {
|
| 78 | 78 |
paginate_projects |
| 79 |
|
|
| 79 | 80 |
@projects = Project.visible_roots.find(@projects, :offset => @offset, :limit => @limit, :order => sort_clause) |
| 80 | 81 |
|
| 81 | 82 |
if User.current.logged? |
| ... | ... | |
| 116 | 117 |
@tag_list = [] |
| 117 | 118 |
end |
| 118 | 119 |
|
| 119 |
@projects = Project.visible |
|
| 120 |
if @question == "" |
|
| 121 |
@projects = Project.visible |
|
| 122 |
else |
|
| 123 |
@projects = Project.visible.search_by_question(@question) |
|
| 124 |
end |
|
| 125 |
|
|
| 126 |
unless @tag_list.empty? |
|
| 127 |
@tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id) }
|
|
| 128 |
@projects = @projects & @tagged_projects_ids |
|
| 129 |
end |
|
| 130 |
|
|
| 131 |
@projects = @projects.collect{ |project| project.root }
|
|
| 132 |
@projects = @projects.uniq |
|
| 120 | 133 |
|
| 121 |
# luisf |
|
| 122 |
@projects = @projects.search_by_question(@question) unless @question == "" |
|
| 123 |
@tagged_projects_ids = Project.tagged_with(@tag_list).collect{ |project| Project.find(project.id) } unless @tag_list.empty?
|
|
| 124 |
|
|
| 125 |
# intersection of both prject groups |
|
| 126 |
@projects = @projects & @tagged_projects_ids unless @tag_list.empty? |
|
| 127 | 134 |
end |
| 128 | 135 |
end |
| 129 | 136 |
end |
Also available in: Unified diff