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

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

No files matched your search

+8
View File
@@ -86,6 +86,14 @@ module ContractsHelper
number_with_precision(value, :precision => Contract::ViewPrecision, :delimiter => ',') number_with_precision(value, :precision => Contract::ViewPrecision, :delimiter => ',')
end 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={}) def retainer_period_options(deliverable, method_options={})
selected = method_options[:selected] selected = method_options[:selected]
if selected && selected.is_a?(Date) if selected && selected.is_a?(Date)
+1 -1
View File
@@ -31,7 +31,7 @@
<div class="left"> <div class="left">
<table class="info"> <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, :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, :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, :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'}) %> <%= show_field(resource, :client_ap_contact_information, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-client-ap-contact-information'}) %>