[#4420] Display a message in the form when a Retainer has no effective months.

This commit is contained in:
Eric Davis
2010-09-01 18:50:24 -07:00
parent 994e9b0332
commit abc4d30346
2 changed files with 5 additions and 0 deletions

View File

@@ -32,10 +32,14 @@
<% end %>
<% if resource.retainer? && resource.respond_to?(:months) %>
<% if resource.months.present? %>
<% resource.months.each do |month| %>
<%= render :partial => 'finance_form', :locals => {:form => form, :labor_budgets => resource.labor_budgets_for_date(month), :overhead_budgets => resource.overhead_budgets_for_date(month), :label => l(:text_deliverable_finances_date, :date => month.strftime("%B, %Y")), :fieldset_class => 'date-' + month.strftime('%Y-%m') } %>
<% end %>
<% else %>
<%= content_tag(:p, l(:text_missing_period), :class => 'nodata') %>
<% end %>
<% else %>
<%= render :partial => 'finance_form', :locals => {:form => form, :labor_budgets => resource.labor_budgets, :overhead_budgets => resource.overhead_budgets, :label => l(:text_deliverable_finances), :fieldset_class => '' } %>
<% end %>

View File

@@ -66,3 +66,4 @@ en:
text_quarterly: "Quarterly"
text_start_date_empty: "The start date is empty. If this form is submitted, no budget items will be created."
text_end_date_empty: "The end date is empty. If this form is submitted, no budget items will be created."
text_missing_period: "This deliverable is missing a date range so it cannot have budget items. Please save start and end dates before adding any budget items."