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 0000000..c3a8e10 Binary files /dev/null and b/assets/images/todo1.png differ diff --git a/assets/images/todo2.png b/assets/images/todo2.png new file mode 100644 index 0000000..ac062b1 Binary files /dev/null and b/assets/images/todo2.png differ diff --git a/assets/images/todo3.png b/assets/images/todo3.png new file mode 100644 index 0000000..532d369 Binary files /dev/null and b/assets/images/todo3.png differ diff --git a/assets/images/todo4.png b/assets/images/todo4.png new file mode 100644 index 0000000..8506c97 Binary files /dev/null and b/assets/images/todo4.png differ diff --git a/assets/images/todo5.png b/assets/images/todo5.png new file mode 100644 index 0000000..dbe7577 Binary files /dev/null and b/assets/images/todo5.png differ 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") %>