[#4506] Format the executed contract as Yes or No.

This commit is contained in:
Eric Davis
2010-09-14 13:57:26 -07:00
parent 9b49959bcf
commit 893d83a03d
2 changed files with 9 additions and 1 deletions

View File

@@ -86,6 +86,14 @@ module ContractsHelper
number_with_precision(value, :precision => Contract::ViewPrecision, :delimiter => ',')
end
def format_as_yes_or_no(value)
if value
l(:general_text_Yes)
else
l(:general_text_No)
end
end
def retainer_period_options(deliverable, method_options={})
selected = method_options[:selected]
if selected && selected.is_a?(Date)

View File

@@ -31,7 +31,7 @@
<div class="left">
<table class="info">
<%= show_field(resource, :client_point_of_contact, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-client-point-of-contact padd'}, :label_html_options => {:width => '25%'}) %>
<%= show_field(resource, :executed, :html_options => {:class => 'contract-executed'}) %>
<%= show_field(resource, :executed, :format => :format_as_yes_or_no, :html_options => {:class => 'contract-executed'}) %>
<%= show_field(resource, :discount_note, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-discount-note'}) %>
<%= show_field(resource, :payment_term, :format => :format_payment_terms, :html_options => {:class => 'contract-payment-terms'}) %>
<%= show_field(resource, :client_ap_contact_information, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-client-ap-contact-information'}) %>