Mercurial > hg > soundsoftware-site
changeset 901:6e80a22916e9 cannam
Merge from branch "luisf"
author | Chris Cannam |
---|---|
date | Thu, 02 Feb 2012 15:24:04 +0000 |
parents | 84f0b221aa7a (current diff) f2a30f704798 (diff) |
children | 8623d131c9ad 154205fd9f8b 1f446682602c bd2afdf7e446 |
files | |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_tags/app/views/projects/_tags_form.html.erb Thu Feb 02 15:02:30 2012 +0000 +++ b/vendor/plugins/redmine_tags/app/views/projects/_tags_form.html.erb Thu Feb 02 15:24:04 2012 +0000 @@ -3,6 +3,6 @@ <p id="project_tags"><%= f.text_field :tag_list, :label => :tags, :size => 60, :class => 'hol' %></p> <div id="project_tag_candidates" class="autocomplete"></div> <%= javascript_include_tag 'tags_input', :plugin => 'redmine_tags' %> - <%= javascript_tag "observeProjectTagsField('#{url_for(:controller => 'auto_completes', :action => 'project_tags', :project_id => 1)}', false)" %> + <%= javascript_tag "observeProjectTagsField('#{url_for(:controller => 'auto_completes', :action => 'project_tags', :project_id => Project.first.id)}', false)" %> </div> <% end -%> \ No newline at end of file
--- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Thu Feb 02 15:02:30 2012 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Thu Feb 02 15:24:04 2012 +0000 @@ -34,6 +34,7 @@ sort_update %w(name lft created_on updated_on) @limit = per_page_option @project_count = Project.visible_roots.find(@projects).count + @project_pages = ActionController::Pagination::Paginator.new self, @project_count, @limit, params['page'] @offset ||= @project_pages.current.offset end @@ -120,9 +121,9 @@ end if @question == "" - @projects = Project.visible + @projects = Project.visible_roots else - @projects = Project.visible.search_by_question(@question) + @projects = Project.visible_roots.find(Project.visible.search_by_question(@question)) end unless @tag_list.empty? @@ -132,7 +133,7 @@ @projects = @projects.collect{ |project| project.root } @projects = @projects.uniq - + end end end