OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/app/views/deliverables/_list.rhtml

36 lines
2.6 KiB

<% form_tag({}) do -%>
<table class="list deliverables">
<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>
<%= sort_header_tag("#{Deliverable.table_name}.id", :caption => '#', :default_order => 'desc') %>
<%= sort_header_tag("status", :caption => l(:caption_status), :default_order => 'desc') %>
<%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => l(:caption_subject)) %>
<%= sort_header_tag("score", :caption => l(:caption_score), :default_order => 'desc') %>
<%= sort_header_tag("total_budget", :caption => l(:caption_budget)) %>
<%= sort_header_tag("labor_budget", :caption => l(:caption_labor_budget)) %>
<%= sort_header_tag("materials_budget", :caption => l(:caption_materials_budget)) %>
<%= sort_header_tag("spent", :caption => l(:caption_spent)) %>
<%= sort_header_tag("#{Deliverable.table_name}.due_date", :caption => l(:caption_due)) %>
<%= sort_header_tag("progress", :caption => l(:caption_progress)) %>
</tr></thead>
<tbody>
<% deliverables.each do |deliverable| %>
<tr id="deliverable-<%= deliverable.id %>" class="hascontextmenu <%= cycle ('odd', 'even') %> <%= deliverable.css_classes %>">
<td class="checkbox"><%= check_box_tag("ids[]", deliverable.id, false, :id => nil) %></td>
<td><%= link_to deliverable.id, :controller => 'deliverables', :action => 'show', :id => deliverable %></td>
<%= content_tag(:td, h(deliverable.status), :class => 'status') %>
<%= content_tag(:td, link_to (h(deliverable.subject), :controller => 'deliverables', :action => 'show', :id => deliverable), :class => 'subject') %>
<%= content_tag(:td, h(deliverable.score.to_i), :class => 'score') %>
<%= content_tag(:td, number_to_currency(deliverable.budget || 0.0, :precision => 0), :class => 'budget') %>
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'budget') %>
<%= content_tag(:td, number_to_currency(deliverable.materials_budget || 0.0, :precision => 0), :class => 'budget') %>
<%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'spent') %>
<%= content_tag(:td, format_date(deliverable.due_date), :class => 'due_date') %>
<%= content_tag(:td, progress_bar(deliverable.progress, :width => '100%', :class => 'done_ratio')) %>
</tr>
<% end %>
</tbody>
</table>
<% end -%>