From c7f0bfb468fe76e05df5ae0229f9ec7945bf0a19 Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Fri, 18 Dec 2009 18:07:41 +0100 Subject: [PATCH 2/4] Showing stories in goals listing in agile_pm Goals can have many stories. With this patch list of all related stories is displayed in goals view. --- extensions/agile_pm/models/goal.rb | 1 + .../agile_pm/public/stylesheets/agile_pm.css | 2 ++ extensions/agile_pm/views/goals/_goal.html.erb | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 0 deletions(-) diff --git a/extensions/agile_pm/models/goal.rb b/extensions/agile_pm/models/goal.rb index 14666b1..8087713 100644 --- a/extensions/agile_pm/models/goal.rb +++ b/extensions/agile_pm/models/goal.rb @@ -5,6 +5,7 @@ class Goal < ActiveRecord::Base belongs_to :milestone belongs_to :sprint + has_many :story belongs_to :requester, :class_name => 'User' Priority = Struct.new(:id, :name) diff --git a/extensions/agile_pm/public/stylesheets/agile_pm.css b/extensions/agile_pm/public/stylesheets/agile_pm.css index d2363f8..72b07d7 100644 --- a/extensions/agile_pm/public/stylesheets/agile_pm.css +++ b/extensions/agile_pm/public/stylesheets/agile_pm.css @@ -10,6 +10,8 @@ .agile-pm table.sprint thead tr th { border-top:1px solid #fff; } .agile-pm table.sprint tbody tr td { border-top:1px solid #bbb; } .agile-pm table.sprint table.goals tbody td { border-top:0; vertical-align:middle; } +.agile-pm table.sprint .completed { font-weight: normal; font-style: italic; } +.agile-pm table.sprint .active { font-weight: bold; font-style: normal; } .agile-pm .apm-nav-link { padding: 1px 4px; border:1px solid #ccc; font-weight: bold; } .agile-pm a.apm-nav-link { border-color:#ddd; } diff --git a/extensions/agile_pm/views/goals/_goal.html.erb b/extensions/agile_pm/views/goals/_goal.html.erb index 2bfd6a6..796f94c 100644 --- a/extensions/agile_pm/views/goals/_goal.html.erb +++ b/extensions/agile_pm/views/goals/_goal.html.erb @@ -4,6 +4,21 @@ <%= link_to_remote h(truncate(goal.title, :length => 50)), :url => goal_path(goal, :format => :js), :method => :get %> +
+ +
<%= x_image_tag "priority-#{goal.priority_id}.gif", :alt => h(goal.priority.name), :title => h(goal.priority.name) %> -- 1.6.6.rc3