From 5a277c723f7efd4c6f7a3da9654b8228c8a4ea32 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 5 Oct 2010 10:39:44 -0700 Subject: [PATCH] [#4600] Replaced todo and later release notes with icons --- app/helpers/contracts_helper.rb | 5 ++++ app/views/contracts/_title.html.erb | 11 ++------ app/views/contracts/index.html.erb | 9 +++--- app/views/contracts/show.html.erb | 26 ++++++++++++------ app/views/deliverables/_details_row.html.erb | 16 +++++------ app/views/deliverables/_finance_form.html.erb | 14 ++++------ assets/images/todo1.png | Bin 0 -> 200 bytes assets/images/todo2.png | Bin 0 -> 207 bytes assets/images/todo3.png | Bin 0 -> 203 bytes assets/images/todo4.png | Bin 0 -> 197 bytes assets/images/todo5.png | Bin 0 -> 209 bytes config/locales/en.yml | 2 ++ test/integration/contracts_show_test.rb | 4 +-- 13 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 assets/images/todo1.png create mode 100644 assets/images/todo2.png create mode 100644 assets/images/todo3.png create mode 100644 assets/images/todo4.png create mode 100644 assets/images/todo5.png diff --git a/app/helpers/contracts_helper.rb b/app/helpers/contracts_helper.rb index 0975f3f..fcbb441 100644 --- a/app/helpers/contracts_helper.rb +++ b/app/helpers/contracts_helper.rb @@ -159,4 +159,9 @@ module ContractsHelper }) end + + def release(version=5, message='') + return '' unless (1..5).include?(version) + image_tag("todo#{version}.png", :plugin => 'redmine_contracts', :title => "Coming in release #{version}. #{message}") + end end diff --git a/app/views/contracts/_title.html.erb b/app/views/contracts/_title.html.erb index 575398b..985ed90 100644 --- a/app/views/contracts/_title.html.erb +++ b/app/views/contracts/_title.html.erb @@ -2,15 +2,15 @@ <%= content_tag(:h2, h(contract.name)) %>
- Log time (Release 4) + <%= release(4, "Log time") %> | - Watch (Release 3) + <%= release(3, "Watch") %> | - Copy (Release ?) + <%= release(5, "Copy") %> |
@@ -18,8 +18,3 @@
-<%# TODO: release 3/4, contract messages -
-

There is $243 worth of time clocked to issues that are not assigned to any deliverables. Please update the orphaned issues.

-
-%> diff --git a/app/views/contracts/index.html.erb b/app/views/contracts/index.html.erb index 92aec18..42d2734 100644 --- a/app/views/contracts/index.html.erb +++ b/app/views/contracts/index.html.erb @@ -19,8 +19,8 @@ <%= l(:field_id) %> <%= l(:field_name) %> - <%# TODO: Release 5, Status %> - <%# TODO: Release 5, Type %> + <%= l(:field_status) %> + <%= l(:field_type) %> <%= l(:field_account_executive_short) %> <%= l(:field_total_budget) %> <%= l(:field_end_date) %> @@ -30,6 +30,8 @@ <% content_tag_for(:tr, contract, :class => cycle('','odd')) do %> <%= link_to(h(contract.id), contract_path(@project, contract)) %> <%= link_to(h(contract.name), contract_path(@project, contract)) %> + <%= release(5, "Contract Status") %> + <%= release(5, "Contract Type") %> <%= h contract.account_executive.name %> <%= h(format_value_field_for_contracts(contract.total_budget)) %> <%= h format_date(contract.end_date) %> @@ -43,9 +45,8 @@

Inactive Contracts

- <%# TODO: split contracts by active and inactive %>

<%= l(:label_no_data) %>

-

TODO: Release 5 (Contract Status)

+

<%= release(5, "Contract Status. Split contracts by active and inactive") %>

diff --git a/app/views/contracts/show.html.erb b/app/views/contracts/show.html.erb index 826b1dc..d968e31 100644 --- a/app/views/contracts/show.html.erb +++ b/app/views/contracts/show.html.erb @@ -15,9 +15,16 @@
- <%= show_field(resource, :status, :html_options => {:class => 'contract-status'}) %> + + <%# show_field(resource, :status, :html_options => {:class => 'contract-status'}) %> + + <%= show_field(resource, :account_executive, :html_options => {:class => 'contract-account-manager'}) %> - <%= show_field(resource, :contract_type, :html_options => {:class => 'contract-type'}) %> + + <%# show_field(resource, :contract_type, :html_options => {:class => 'contract-type'}) %> + + +
<%= release(5, "Contract status") %>
<%= release(5, "Contract type") %>
@@ -57,7 +64,10 @@ <%= show_budget_field(resource, :fixed_markup_spent, :fixed_markup_budget, :format => :format_value_field_for_contracts, :html_options => {:class => 'contract-markup'}) %> <% end %> <%= show_budget_field(resource, :profit_spent, :profit_budget, :format => :format_value_field_for_contracts, :html_options => {:class => 'contract-profit'}) %> - <%= show_budget_field(resource, :discount_spent, :discount_budget, :format => :format_value_field_for_contracts, :html_options => {:class => 'contract-discount'}) %> + + <%# show_budget_field(resource, :discount_spent, :discount_budget, :format => :format_value_field_for_contracts, :html_options => {:class => 'contract-discount'}) %> + + - + <%= format_budget_for_deliverable(deliverable, deliverable.labor_budget_spent, deliverable.labor_budget_total, :class => 'labor') %> <%= format_budget_for_deliverable(deliverable, deliverable.overhead_spent, deliverable.overhead_budget_total, :class => 'overhead') %> @@ -130,7 +140,7 @@ <% end %> <%# div_for(resource) %> -

TODO: Release 4, Milestones

+

<%= release(4, "Milestones") %>

-

TODO: Release 2+, history

+

<%= release(3, "history") %>

<% html_title "#{l(:text_contracts)} - #{h(resource.name)}" %> diff --git a/app/views/deliverables/_details_row.html.erb b/app/views/deliverables/_details_row.html.erb index ae6a025..c10b10d 100644 --- a/app/views/deliverables/_details_row.html.erb +++ b/app/views/deliverables/_details_row.html.erb @@ -24,21 +24,21 @@
<%= release(4, "Discount") %>
@@ -81,8 +91,8 @@ <%= content_tag(:h3, l(:field_deliverable_plural)) %>
- CSV (Release 2) - View All (9) (Release ?) + <%= release(2, "CSV") %> + <%= release(5, "View All/Pagination") %> <%= link_to(l(:button_add_new), new_contract_deliverable_path(@project, resource), :id => 'new-deliverable') %>
@@ -111,7 +121,7 @@
<%= h format_date(deliverable.end_date) %> <%= h deliverable.short_type %> <%= h deliverable.title %>TODO: Release 5<%= release(5, "Deliverable status") %> <%= h deliverable.manager.try(:name) %>
<%= show_field(deliverable, :current_period, :html_options => {:class => 'deliverable-current-period'}) if deliverable.retainer? %> + <%= show_field(deliverable, :start_date, :format => :format_date, :html_options => {:class => 'deliverable-start-date'}) %> <%= show_field(deliverable, :end_date, :format => :format_date, :html_options => {:class => 'deliverable-end-date'}) %>
<%= release(5, "Retainer lightbox") %>
- <%# TODO: Release 2, skinning port %>
- - - + + + @@ -51,7 +51,7 @@ - + - + - + - + - <%# TODO: Select field for the Time Entry Activity in a td %> - <%# TODO: Green Add button for multiple records %> <% end %> @@ -41,9 +39,8 @@ <%= overhead_budget.hidden_field(:year) %> <%= overhead_budget.hidden_field(:month) %> - <%# TODO: Select field for the Time Entry Activity in a td %> - <%# TODO: Green Add button for multiple records %> <% end %> @@ -95,7 +91,7 @@ <%= fixed_budget.text_area(:description, :class => 'wiki-edit', :rows => '5', :id => "fixed-description#{fixed_budget.object.object_id}") %> <%= wikitoolbar_for "fixed-description#{fixed_budget.object.object_id}" %> -

Todo: Add button (Release 3)

+

<%= release(3, "Green Add button for multiple records") %>

<% end %> diff --git a/assets/images/todo1.png b/assets/images/todo1.png new file mode 100644 index 0000000000000000000000000000000000000000..c3a8e101d2e858b762cfeb81250066e6fb2a3ab3 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XvOHZJLn>}1B^=;ivOq#TL1lrYq>b`XhL~-3%EuTqneJ7! zoo8^GWyq6wWcknk|Nr|R?2?dNS}1v_<$RiqRG?0Z(!rY%yopH*1PmT_#V0XOUg2;= vQ11K+x!w>@j}XsODyeF0UYm^_8WbP0l+XkK!(Bm$ literal 0 HcmV?d00001 diff --git a/assets/images/todo2.png b/assets/images/todo2.png new file mode 100644 index 0000000000000000000000000000000000000000..ac062b1bd9326cedfd9368e97d2f8422f698f835 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X3O!vMLn>~qnHY)6ChfzTK+73CUHx3vIVCg! E073;y!2kdN literal 0 HcmV?d00001 diff --git a/assets/images/todo3.png b/assets/images/todo3.png new file mode 100644 index 0000000000000000000000000000000000000000..532d3696c8cb3000261344db7016433a78a2a96a GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xay?xfLn>}1B^=;ivOq#TL1lrYq>b`XhL~-3%EuTqneJ7! zoo8^GWyq6wWcknk|Nr|R?2?dNS}1v_!{69P*+}}XfSc2~V~Zu~q2|metz<_6yr1IVREmgeVFS{>3HGx~x-@x!j z&*Hu7Tev@o8!89*_6jzt?GyEJm{_kA@Z`*%ncg}RtOX4=?T*(<+i>!b82l=gb2fN4UIbdn;OXk;vd$@?2>?+PNCW@? literal 0 HcmV?d00001 diff --git a/assets/images/todo5.png b/assets/images/todo5.png new file mode 100644 index 0000000000000000000000000000000000000000..dbe757755e5fc8915f07bfd438f7667950c06eea GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XialK%Ln>~qnS7VG!GNR1^07$i|BETSJ)LS>-#SVwKK!`v zarlw`Pb$1DkE}{q55$zR1vG8D!tC;hk4epJ^XJDbGRi03S@OH&Zsk&2r~ScU#>?Mr zh9{1FyM3;KSNI-V97o~xFQ&_6f=+4b+fM#d``o*Mk%8%v;?%db^EU&nXYh3Ob6Mw< G&;$T#l1`ui literal 0 HcmV?d00001 diff --git a/config/locales/en.yml b/config/locales/en.yml index 98cd683..ac89ba6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -73,5 +73,7 @@ en: field_budget: Budget field_markup: Markup field_paid: Paid + field_spent: Spent + field_profit: Profit text_error_message_orphaned_time: "There is {{amount}} worth of time clocked to issues that are not assigned to any deliverables." text_error_message_update_orphaned_time: "Please update the orphaned issues." diff --git a/test/integration/contracts_show_test.rb b/test/integration/contracts_show_test.rb index e99997b..18374f2 100644 --- a/test/integration/contracts_show_test.rb +++ b/test/integration/contracts_show_test.rb @@ -54,8 +54,8 @@ class ContractsShowTest < ActionController::IntegrationTest assert_select '.contract-fixed .budget' assert_select '.contract-profit .spent' assert_select '.contract-profit .budget' - assert_select '.contract-discount .spent' - assert_select '.contract-discount .budget' + # assert_select '.contract-discount .spent' + # assert_select '.contract-discount .budget' assert_select '.contract-total .spent' assert_select '.contract-total .budget'
SpentBudgetHours<%= l(:field_spent) %><%= l(:field_budget) %><%= l(:field_hours) %>
Labor<%= l(:field_labor) %><%= release(3, "Deliverable lightbox") %> <%= h(format_value_field_for_contracts(deliverable.labor_budget_spent(validated_period))) %> <%= h(format_value_field_for_contracts(deliverable.labor_budget_total(validated_period))) %> @@ -59,7 +59,7 @@
Overhead<%= l(:field_overhead) %><%= release(3, "Deliverable lightbox") %> <%= h(format_value_field_for_contracts(deliverable.overhead_spent(validated_period))) %> <%= h(format_value_field_for_contracts(deliverable.overhead_budget_total(validated_period))) %> @@ -87,13 +87,13 @@ <% end %>
Profit<%= l(:field_profit) %> <%= h(format_value_field_for_contracts(deliverable.profit_left(validated_period))) %> <%= h(format_value_field_for_contracts(deliverable.profit_budget(validated_period))) %>
Total:<%= l(:field_total) %>: <%= h(format_value_field_for_contracts(deliverable.total_spent(validated_period))) %> <%= h(format_value_field_for_contracts(deliverable.total(validated_period))) %> diff --git a/app/views/deliverables/_finance_form.html.erb b/app/views/deliverables/_finance_form.html.erb index 17c5ca1..7636b4e 100644 --- a/app/views/deliverables/_finance_form.html.erb +++ b/app/views/deliverables/_finance_form.html.erb @@ -12,9 +12,8 @@ <%= labor_budget.hidden_field(:year) %> <%= labor_budget.hidden_field(:month) %>
- + <%= release(3, "Select field for the Time Entry Activity in a td") %>

<%= labor_budget.label(:hours, l(:text_short_hours)) %>

@@ -24,9 +23,8 @@

<%= labor_budget.label(:budget, l(:text_dollar_sign)) %>

<%= labor_budget.text_field(:budget, :value => format_deliverable_value_fields(labor_budget.object.budget), :class => 'financial') %>
- Todo: Add button (Release 3) + <%= release(3, "Green Add button for multiple records") %>
- + <%= release(3, "Select field for the Time Entry Activity in a td") %>

<%= overhead_budget.label(:hours, l(:text_short_hours)) %>

@@ -53,9 +50,8 @@

<%= overhead_budget.label(:budget, l(:text_dollar_sign)) %>

<%= overhead_budget.text_field(:budget, :value => format_deliverable_value_fields(overhead_budget.object.budget), :class => 'financial') %>
- Todo: Add button (Release 3) + <%= release(3, "Green Add button for multiple records") %>