42 lines
2.9 KiB
Plaintext
42 lines
2.9 KiB
Plaintext
<% css = cycle('odd','even') %>
|
|
<tr id="deliverable-<%= deliverable.id %>" class="deliverable <%= css %>">
|
|
<%= content_tag(:td, deliverable.id) %>
|
|
<%= content_tag(:td, h(deliverable.score.to_i), :class => 'score') %>
|
|
<%= content_tag(:td, h(deliverable.subject), :class => 'subject') %>
|
|
<%= content_tag(:td, number_to_currency(deliverable.budget, :precision => 0), :class => 'budget') %>
|
|
<%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'spent') %>
|
|
<%= content_tag(:td, format_date(deliverable.due), :class => 'due_date') %>
|
|
<%= content_tag(:td, progress_bar(deliverable.progress, :width => '100%', :class => 'dont_ratio')) %>
|
|
<%= content_tag(:td, link_to_function("Details", "$('deliverable-details-#{deliverable.id}').toggle();"), :class => 'actions') %>
|
|
</tr>
|
|
<tr id="deliverable-details-<%= deliverable.id %>" class="deliverable deliverable-details <%= css %>" style="display:none;">
|
|
<%= content_tag(
|
|
:td,
|
|
"<dl>" +
|
|
paragraph_with_data("Deliverable Budget: ", number_to_currency(deliverable.budget, :precision => 0)) +
|
|
paragraph_with_data("Budget Spent: ", number_to_currency(deliverable.spent, :precision => 0)) +
|
|
paragraph_with_data("Budget Remaining: ", number_to_currency(deliverable.budget_remaining, :precision => 0)) +
|
|
paragraph_with_data("Hours Used: ", deliverable.hours_used) +
|
|
paragraph_with_data("Hours Estimated: ", deliverable.total_hours) +
|
|
paragraph_with_data("Progress: ", deliverable.progress) +
|
|
paragraph_with_data("Score ", deliverable.score) +
|
|
paragraph_with_data("Overruns ", number_to_currency(deliverable.overruns, :precision => 0)) +
|
|
paragraph_with_data("Profit: ", number_to_currency(deliverable.profit, :precision => 0)) +
|
|
"</dl>",
|
|
:colspan => 4) %>
|
|
|
|
<td colspan="4">
|
|
<%= content_tag(:p,link_to("Assigned Issues", :action => 'issues', :id => @project.id, :deliverable_id => deliverable.id)) -%>
|
|
<%= content_tag(:p,link_to("Edit", :action => 'edit', :id => @project.id, :deliverable_id => deliverable.id)) -%>
|
|
<%= content_tag(:p,link_to("Delete", { :action => 'destroy', :id => @project.id, :deliverable_id => deliverable.id}, :confirm => l(:text_are_you_sure))) -%>
|
|
<div>
|
|
<% form_for :deliverable, deliverable, :url => { :action => "bulk_assign_issues", :id => @project.id, :deliverable_id => deliverable.id} do |f| %>
|
|
|
|
<label for="version_id">Assign issues on Version to Deliverable</label>
|
|
<%= select("version", "id", @project.versions.sort.collect {|v| [v.name, v.id ] }, { :include_blank => true }) %>
|
|
<%= submit_tag(l(:button_change)) %>
|
|
<% end %>
|
|
</div>
|
|
</td>
|
|
</tr>
|