kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
3.0 KiB
53 lines
3.0 KiB
15 years ago
|
<% form_tag({}) do -%>
|
||
15 years ago
|
|
||
15 years ago
|
<table class="list cost_objects">
|
||
15 years ago
|
<thead><tr>
|
||
|
<th><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
|
||
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
|
||
|
</th>
|
||
15 years ago
|
<%= sort_header_tag("id", :caption => '#', :default_order => 'desc') %>
|
||
15 years ago
|
<%= sort_header_tag("status", :caption => l(:caption_status), :default_order => 'desc') %>
|
||
15 years ago
|
<%= sort_header_tag("subject", :caption => l(:caption_subject)) %>
|
||
15 years ago
|
<%= sort_header_tag("fixed_date", :caption => l(:caption_fixed_date)) %>
|
||
15 years ago
|
<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>
|
||
15 years ago
|
</tr></thead>
|
||
|
<tbody>
|
||
15 years ago
|
<% total_budget = 0; labor_budget = 0; material_budget = 0; spent = 0 %>
|
||
15 years ago
|
<% cost_objects.each do |cost_object| %>
|
||
|
<tr id="cost_object-<%= cost_object.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= cost_object.css_classes %>">
|
||
|
<td class="checkbox"><%= check_box_tag("ids[]", cost_object.id, false, :id => nil) %></td>
|
||
|
<td><%= link_to cost_object.id, :controller => 'cost_objects', :action => 'show', :id => cost_object %></td>
|
||
|
<%= content_tag(:td, l(cost_object.status), :class => 'status') %>
|
||
|
<%= content_tag(:td, link_to(h(cost_object.subject), :controller => 'cost_objects', :action => 'show', :id => cost_object), :class => 'subject') %>
|
||
|
<%= content_tag(:td, format_date(cost_object.fixed_date), :class => 'fixed_date') %>
|
||
|
<%= content_tag(:td, number_to_currency(cost_object.spent, :precision => 0), :class => 'currency') %>
|
||
|
<%= content_tag(:td, number_to_currency(cost_object.budget || 0.0, :precision => 0), :class => 'currency') %>
|
||
|
<%= content_tag(:td, number_to_currency(cost_object.labor_budget || 0.0, :precision => 0), :class => 'currency') %>
|
||
|
<%= content_tag(:td, number_to_currency(cost_object.material_budget || 0.0, :precision => 0), :class => 'currency') %>
|
||
|
<%= content_tag(:td, extended_progress_bar(cost_object.budget_ratio, :width => '100%')) %>
|
||
15 years ago
|
<%-
|
||
15 years ago
|
total_budget += cost_object.budget
|
||
|
labor_budget += cost_object.labor_budget
|
||
|
material_budget += cost_object.material_budget
|
||
|
spent += cost_object.spent
|
||
15 years ago
|
-%>
|
||
15 years ago
|
</tr>
|
||
|
<% end %>
|
||
15 years ago
|
<% if cost_objects.length > 0 %>
|
||
15 years ago
|
<tr>
|
||
|
<td colspan="5" />
|
||
|
<td class="currency"><strong><%= number_to_currency( spent || 0.0, :precision => 0) %></strong></td>
|
||
|
<td class="currency"><strong><%= number_to_currency( total_budget || 0.0, :precision => 0) %></strong></td>
|
||
|
<td class="currency"><strong><%= number_to_currency( labor_budget || 0.0, :precision => 0) %></strong></td>
|
||
|
<td class="currency"><strong><%= number_to_currency( material_budget || 0.0, :precision => 0) %></strong></td>
|
||
|
<td />
|
||
|
<tr>
|
||
|
<% end %>
|
||
|
|
||
15 years ago
|
</tbody>
|
||
|
</table>
|
||
|
<% end -%>
|