From e9da38fd2d902eb966232a984b5f9d92ae7140ae Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 23 Jun 2008 16:12:04 -0700 Subject: [PATCH] Hide the labor budget from users without permission --- app/views/deliverables/_deliverable.html.erb | 2 +- app/views/deliverables/_list.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/deliverables/_deliverable.html.erb b/app/views/deliverables/_deliverable.html.erb index 2c8f824..9b4cdde 100644 --- a/app/views/deliverables/_deliverable.html.erb +++ b/app/views/deliverables/_deliverable.html.erb @@ -7,7 +7,7 @@ <%= content_tag(:td, deliverable.id) %> <%= content_tag(:td, h(deliverable.score.to_i), :class => 'score') if allowed_management? %> <%= content_tag(:td, h(deliverable.subject), :class => 'subject') %> - <%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'budget') %> + <%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'budget') if allowed_management? %> <%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'spent') if allowed_management? %> <%= content_tag(:td, format_date(deliverable.due), :class => 'due_date') %> <%= content_tag(:td, progress_bar(deliverable.progress, :width => '100%', :class => 'dont_ratio')) %> diff --git a/app/views/deliverables/_list.html.erb b/app/views/deliverables/_list.html.erb index 853fc77..d21c1bb 100644 --- a/app/views/deliverables/_list.html.erb +++ b/app/views/deliverables/_list.html.erb @@ -4,7 +4,7 @@ <%= sort_header_tag("#{Deliverable.table_name}.id", :caption => '#', :default_order => 'desc') %> <%= sort_header_tag("score", :caption => 'Score', :default_order => 'desc') if allowed_management? %> <%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => 'Subject') %> - <%= sort_header_tag("labor_budget", :caption => 'Budget') %> + <%= sort_header_tag("labor_budget", :caption => 'Budget') if allowed_management? %> <%= sort_header_tag("spent", :caption => 'Spent') if allowed_management? %> <%= sort_header_tag("#{Deliverable.table_name}.due", :caption => 'Due') %> <%= sort_header_tag("progress", :caption => 'Progress') %>