Mercurial > hg > soundsoftware-site
changeset 803:6fa65a452888 cannam
Merge from branch feature_14
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 22 Nov 2011 13:37:50 +0000 |
parents | 4719c1f813fc (current diff) c8aec937ea53 (diff) |
children | 548e23d4cd71 a42dcc01dfee |
files | |
diffstat | 7 files changed, 90 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/public/themes/soundsoftware/stylesheets/application.css Mon Nov 21 16:45:19 2011 +0000 +++ b/public/themes/soundsoftware/stylesheets/application.css Tue Nov 22 13:37:50 2011 +0000 @@ -231,6 +231,10 @@ margin-top:136px; } +#my_projects_fieldset.collapsible { + font-size: 1.0em; + font-color: green; +}
--- a/vendor/plugins/redmine_tags/app/views/projects/_filtered_projects.rhtml Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/app/views/projects/_filtered_projects.rhtml Tue Nov 22 13:37:50 2011 +0000 @@ -3,3 +3,5 @@ <% else %> <%= render_project_table_with_filtering(@projects, @question) %> <% end %> + +<p class="pagination"><%= pagination_links_full @project_pages, @project_count %></p>
--- a/vendor/plugins/redmine_tags/app/views/projects/_my_projects.rhtml Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/app/views/projects/_my_projects.rhtml Tue Nov 22 13:37:50 2011 +0000 @@ -8,7 +8,7 @@ <% end%> <% if @user_projects %> <div> - <%= render_my_project_hierarchy(@user_projects)%> + <%= render_my_project_hierarchy_with_tags(@user_projects)%> </div> <% end %> </fieldset>
--- a/vendor/plugins/redmine_tags/app/views/projects/index.rhtml Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/app/views/projects/index.rhtml Tue Nov 22 13:37:50 2011 +0000 @@ -54,7 +54,7 @@ <%= render :partial => 'filtered_projects' %> </div> -<p class="pagination"><%= pagination_links_full @project_pages, @project_count %></p> + <% other_formats_links do |f| %>
--- a/vendor/plugins/redmine_tags/assets/javascripts/tags_input.js Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/assets/javascripts/tags_input.js Tue Nov 22 13:37:50 2011 +0000 @@ -31,7 +31,7 @@ var uri_params = window.location.href.toQueryParams(); if (uri_params["project[tag_list]"] != undefined){ - this.addTag(uri_params["project[tag_list]"], true); + this.addTag(uri_params["project[tag_list]"].stripTags(), true); }; Event.observe(this.button, 'click', this.readTags.bind(this));
--- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Tue Nov 22 13:37:50 2011 +0000 @@ -63,7 +63,12 @@ @filter_status = "false" else @filter_status = session[:filters_fieldset_status] - end + end + + if params && params[:project] && !params[:project][:tag_list].nil? + @filter_status = "true" + end + end # Lists visible projects. Paginator is for top-level projects only
--- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb Mon Nov 21 16:45:19 2011 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb Tue Nov 22 13:37:50 2011 +0000 @@ -160,6 +160,81 @@ s.join "\n" end + # Renders a tree of projects where the current user belongs + # as a nested set of unordered lists + # The given collection may be a subset of the whole project tree + # (eg. some intermediate nodes are private and can not be seen) + def render_my_project_hierarchy_with_tags(projects) + + s = '' + + original_project = @project + + projects.each do |project| + if project.root? || !projects.include?(project.parent) + s << render_my_project_in_hierarchy_with_tags(project) + end + end + + @project = original_project + + if s != '' + a = '' + a << "<ul class='projects root'>\n" + a << s + a << "</ul>\n" + s = a + end + + s + + end + + + + + def render_my_project_in_hierarchy_with_tags(project) + + s = '' + + if User.current.member_of?(project) + + # set the project environment to please macros. + @project = project + + classes = (project.root? ? 'root' : 'child') + + s << "<li class='#{classes}'><div class='#{classes}'>" + + link_to_project(project, {}, :class => "project my-project") + if project.is_public? + s << " <span class='public'>" << l("field_is_public") << "</span>" + else + s << " <span class='private'>" << l("field_is_private") << "</span>" + end + s << render_project_short_description(project) + + s << l(:tags) << ": " + s << project.tag_counts.collect{ |t| render_project_tag_link(t) }.join(', ') + + s << "</div>\n" + + cs = '' + project.children.each do |child| + cs << render_my_project_in_hierarchy(child) + end + + if cs != '' + s << "<ul class='projects'>\n" << cs << "</ul>\n"; + end + + end + + s + + end + + + private # copied from search_helper. This one doesn't escape html or limit the text length