From c3928904facc8179d042260d31258def98fc735f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Tue, 21 Feb 2012 09:22:58 +0100 Subject: [PATCH] Add subproject widget. --- app/controllers/my_projects_overviews_controller.rb | 3 ++- .../my_projects_overviews/blocks/_subprojects.html.erb | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 app/views/my_projects_overviews/blocks/_subprojects.html.erb diff --git a/app/controllers/my_projects_overviews_controller.rb b/app/controllers/my_projects_overviews_controller.rb index b319148cc4..d435418a2a 100644 --- a/app/controllers/my_projects_overviews_controller.rb +++ b/app/controllers/my_projects_overviews_controller.rb @@ -32,7 +32,8 @@ class MyProjectsOverviewsController < ApplicationController 'members' => :label_member_plural, 'issuetracking' => :label_issue_tracking, 'projectdetails' => :label_project_details, - 'projectdescription' => :label_project_description + 'projectdescription' => :label_project_description, + 'subprojects' => :label_subproject_plural } verify :xhr => true, diff --git a/app/views/my_projects_overviews/blocks/_subprojects.html.erb b/app/views/my_projects_overviews/blocks/_subprojects.html.erb new file mode 100644 index 0000000000..1af1ae58c8 --- /dev/null +++ b/app/views/my_projects_overviews/blocks/_subprojects.html.erb @@ -0,0 +1,7 @@ +

<%=l(:label_subproject_plural)%>

+

<%=l(:label_subproject_plural)%>

+<% if @subprojects.any? %> +
+

<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %>

+
+<% end %>