|
|
|
@ -1,10 +1,5 @@ |
|
|
|
|
<% form_tag({}) do -%> |
|
|
|
|
|
|
|
|
|
<%- |
|
|
|
|
show_labor = User.current.allowed_to?(:view_all_rates, @project) |
|
|
|
|
show_material = User.current.allowed_to?(:view_unit_price, @project) |
|
|
|
|
-%> |
|
|
|
|
|
|
|
|
|
<table class="list deliverables"> |
|
|
|
|
<thead><tr> |
|
|
|
|
<th><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;', |
|
|
|
@ -14,11 +9,11 @@ |
|
|
|
|
<%= sort_header_tag("status", :caption => l(:caption_status), :default_order => 'desc') %> |
|
|
|
|
<%= sort_header_tag("subject", :caption => l(:caption_subject)) %> |
|
|
|
|
<%= sort_header_tag("fixed_date", :caption => l(:caption_fixed_date)) %> |
|
|
|
|
<%= sort_header_tag("spent", :caption => l(:caption_spent)) %> |
|
|
|
|
<%= sort_header_tag("total_budget", :caption => l(:caption_budget)) if show_labor && show_material %> |
|
|
|
|
<%= sort_header_tag("labor_budget", :caption => l(:caption_labor_budget)) if show_labor %> |
|
|
|
|
<%= sort_header_tag("material_budget", :caption => l(:caption_material_budget)) if show_material %> |
|
|
|
|
<%= sort_header_tag("budget_ratio", :caption => l(:caption_budget_ratio)) %> |
|
|
|
|
<th><%= l(:caption_spent) %></th> |
|
|
|
|
<th><%= l(:caption_budget) %></th> |
|
|
|
|
<th><%= l(:caption_labor_budget) %></th> |
|
|
|
|
<th><%= l(:caption_material_budget) %></th> |
|
|
|
|
<th><%= l(:caption_budget_ratio) %></th> |
|
|
|
|
</tr></thead> |
|
|
|
|
<tbody> |
|
|
|
|
<% total_budget = 0; labor_budget = 0; material_budget = 0; spent = 0 %> |
|
|
|
@ -30,9 +25,9 @@ |
|
|
|
|
<%= content_tag(:td, link_to(h(deliverable.subject), :controller => 'deliverables', :action => 'show', :id => deliverable), :class => 'subject') %> |
|
|
|
|
<%= content_tag(:td, format_date(deliverable.fixed_date), :class => 'fixed_date') %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'currency') %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.budget || 0.0, :precision => 0), :class => 'currency') if show_labor && show_material %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'currency') if show_labor %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.material_budget || 0.0, :precision => 0), :class => 'currency') if show_material %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.budget || 0.0, :precision => 0), :class => 'currency') %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'currency') %> |
|
|
|
|
<%= content_tag(:td, number_to_currency(deliverable.material_budget || 0.0, :precision => 0), :class => 'currency') %> |
|
|
|
|
<%= content_tag(:td, extended_progress_bar(deliverable.budget_ratio, :width => '100%')) %> |
|
|
|
|
<%- |
|
|
|
|
total_budget += deliverable.budget |
|
|
|
|