From d8196842ff23fa02a4fb0a1e93cd7c600479d947 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 13 Jul 2010 13:41:25 -0700 Subject: [PATCH] [#4186] Added the Total Budget to the Contract list view. --- app/views/contracts/index.html.erb | 3 ++- config/locales/en.yml | 2 +- test/integration/contracts_list_test.rb | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/contracts/index.html.erb b/app/views/contracts/index.html.erb index 3253d06..e5818ba 100644 --- a/app/views/contracts/index.html.erb +++ b/app/views/contracts/index.html.erb @@ -8,7 +8,7 @@ <%# TODO: Status %> <%# TODO: Type %> <%= l(:field_account_executive_short) %> - <%# TODO: Total Budget %> + <%= l(:field_total_budget) %> <%= l(:field_end_date) %> @@ -17,6 +17,7 @@ <%= link_to(h(contract.id), contract_path(@project, contract)) %> <%= link_to(h(contract.name), contract_path(@project, contract)) %> <%= h contract.account_executive.name %> + <%= h(number_to_currency(contract.total_budget)) %> <%= h format_date(contract.end_date) %> <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 98a9d08..0e1b582 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -47,6 +47,6 @@ en: field_overhead_spent: "Overhead" field_profit_budget: "Profit" field_profit_spent: "Profit" - field_total_budget: "Contract Total" + field_total_budget: "Total Budget" field_total_spent: "Contract Total" field_contract_type: "Type" diff --git a/test/integration/contracts_list_test.rb b/test/integration/contracts_list_test.rb index e57492f..358a3f6 100644 --- a/test/integration/contracts_list_test.rb +++ b/test/integration/contracts_list_test.rb @@ -31,6 +31,7 @@ class ContractsListTest < ActionController::IntegrationTest assert_select "td.name", :text => /#{contract.name}/ assert_select "td.account-executive", :text => /#{contract.account_executive.name}/ assert_select "td.end-date", :text => /#{format_date(contract.end_date)}/ + assert_select "td.total-budget" end end