# HG changeset patch
# User luisf <%=l(:project_filtering_featured_projects_label) %>
-
-<%= l(:label_my_projects) %> -
-<% end %> - - -END - -<% if @user_projects %> - <%= render_my_project_hierarchy(@user_projects)%> -<% end %> -<%= pagination_links_full @project_pages, @project_count %>
diff -r 51d6290d3027 -r bde9c5bfb559 vendor/plugins/redmine_tags/config/locales/en.yml --- a/vendor/plugins/redmine_tags/config/locales/en.yml Thu Nov 10 17:45:08 2011 +0000 +++ b/vendor/plugins/redmine_tags/config/locales/en.yml Fri Nov 11 15:57:58 2011 +0000 @@ -35,3 +35,4 @@ auto_complete_new_tag: Add new... project_filtering_q_label: "Textual search" + button_filter: "Filter" diff -r 51d6290d3027 -r bde9c5bfb559 vendor/plugins/redmine_tags/lib/redmine_project_filtering.rb --- a/vendor/plugins/redmine_tags/lib/redmine_project_filtering.rb Thu Nov 10 17:45:08 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_project_filtering.rb Fri Nov 11 15:57:58 2011 +0000 @@ -3,7 +3,6 @@ # transforms a question and a list of custom fields into something that Project.search can process def self.calculate_tokens(question, custom_fields=nil) list = [] - list << custom_fields.values if custom_fields.present? list << question if question.present? tokens = list.join(' ').scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}) diff -r 51d6290d3027 -r bde9c5bfb559 vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb --- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Thu Nov 10 17:45:08 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Fri Nov 11 15:57:58 2011 +0000 @@ -25,10 +25,10 @@ end end - # luisf - TO BE REMOVED? - def calculate_project_filtering_settings - @project_filtering_settings = Setting[:plugin_redmine_project_filtering] - end + # # luisf - TO BE REMOVED? + # def calculate_project_filtering_settings + # @project_filtering_settings = Setting[:plugin_redmine_project_filtering] + # end def filter_projects @project = Project.new @@ -53,7 +53,7 @@ private - def calculate_filtered_projects + def calculate_filtered_projects @question = (params[:q] || "").strip if params.has_key?(:project) @@ -70,13 +70,12 @@ @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? + debugger + # intersection of both prject groups @projects = @projects && @tagged_projects_ids unless @tag_list.empty? - - # luisf: what exactly are the featured projects? could they be "my projects"? - # if not should remove this code⦠- @featured_projects = @featured_projects.search_by_question(@question) if @featured_projects - + + @filtered_projects = @projects end end end diff -r 51d6290d3027 -r bde9c5bfb559 vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb --- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb Thu Nov 10 17:45:08 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb Fri Nov 11 15:57:58 2011 +0000 @@ -19,6 +19,8 @@ # general activity level, whether there is anything actually hosted # here for the project, etc. def render_project_table_with_filtering(projects, question) + debugger + custom_fields = "" s = "" if projects.any?