Files
redmine-budget-plugin/app/views/deliverables/_budget.html.erb
root 4b18f20eba updated views and helpers to specify the currency unit when outputting currency values.
A label_currency localisation variable has been added to config/locales/en.yml
2010-03-03 08:14:39 +00:00

135 lines
3.3 KiB
Plaintext

<h2 class="title"><%= l(:budget_title) %></h2>
<table>
<% if allowed_management? %>
<tr class="total">
<td>
<%= l(:field_budget) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.budget, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_labor_budget) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.labor_budget, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_labor_budget_spent) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.spent, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_labor_budget_remaining) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.labor_budget_left, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<tr>
<td>
<%= l(:label_progress) %>
</td>
<td class="calculation-column">
<%= h number_to_percentage(budget.progress, :precision => 0) %>
</td>
</tr>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_budget_score) %>
</td>
<td class="calculation-column">
<%= h budget.score %>
</td>
</tr>
<% end %>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_overruns) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.overruns, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<% if allowed_management? && budget.amount_missing_on_deliverables > 0%>
<tr>
<td>
<%= l(:label_missing_on) %> <%= link_to('Deliverables:', :action => 'issues', :id => @project.id, :deliverable_id => :none) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.amount_missing_on_deliverables, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<% if allowed_management? && budget.amount_missing_on_issues > 0 %>
<tr>
<td>
<%= l(:label_missing_on) %> <%= link_to('Issues:',
:controller => 'timelog',
:action => 'details',
:project_id => @project.id,
:sort_key => 'issue_id',
:sort_order => 'asc') %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.amount_missing_on_issues, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
<tr>
<td>
<%= l(:label_next_due_date) %>
</td>
<td class="calculation-column">
<%= h distance_of_time_in_words_to_now(budget.next_due_date) if budget.next_due_date %>
</td>
</tr>
<tr>
<td>
<%= l(:label_completion) %>
</td>
<td class="calculation-column">
<%= h distance_of_time_in_words_to_now(budget.final_due_date) if budget.final_due_date %>
</td>
</tr>
<% if allowed_management? %>
<tr>
<td>
<%= l(:label_potential_profit) %>
</td>
<td class="calculation-column">
<%= h number_to_currency(budget.profit, :unit => l(:label_currency), :precision => 0) %>
</td>
</tr>
<% end %>
</table>