Mercurial > hg > soundsoftware-site
changeset 787:a36cce722860 feature_14
Merge from branch "cannam"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 18 Nov 2011 16:53:34 +0000 |
parents | ae82810661da (diff) 32d853e2e7ed (current diff) |
children | 6300012e354e dc15818e132e b5e8049ded56 |
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:53:34 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