Mercurial > hg > soundsoftware-site
changeset 788:6300012e354e cannam
Merge
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 18 Nov 2011 16:55:47 +0000 |
parents | 32d853e2e7ed (current diff) a36cce722860 (diff) |
children | 863f447c4d88 |
files | |
diffstat | 1 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Fri Nov 18 16:18:52 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Fri Nov 18 16:55:47 2011 +0000 @@ -76,6 +76,7 @@ respond_to do |format| format.html { paginate_projects + @projects = Project.visible_roots.find(@projects, :offset => @offset, :limit => @limit, :order => sort_clause) if User.current.logged? @@ -116,14 +117,20 @@ @tag_list = [] end - @projects = Project.visible + if @question == "" + @projects = Project.visible + else + @projects = Project.visible.search_by_question(@question) + end + + unless @tag_list.empty? + @tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id) } + @projects = @projects & @tagged_projects_ids + end + + @projects = @projects.collect{ |project| project.root } + @projects = @projects.uniq - # luisf - @projects = @projects.search_by_question(@question) unless @question == "" - @tagged_projects_ids = Project.tagged_with(@tag_list).collect{ |project| Project.find(project.id) } unless @tag_list.empty? - - # intersection of both prject groups - @projects = @projects & @tagged_projects_ids unless @tag_list.empty? end end end