From 893d83a03dc4fc5b4a9a64f47b45726ec5bcc198 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 14 Sep 2010 13:57:26 -0700 Subject: [PATCH] [#4506] Format the executed contract as Yes or No. --- app/helpers/contracts_helper.rb | 8 ++++++++ app/views/contracts/show.html.erb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/helpers/contracts_helper.rb b/app/helpers/contracts_helper.rb index 0266bd0..26207c5 100644 --- a/app/helpers/contracts_helper.rb +++ b/app/helpers/contracts_helper.rb @@ -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) diff --git a/app/views/contracts/show.html.erb b/app/views/contracts/show.html.erb index 55a4254..16faae0 100644 --- a/app/views/contracts/show.html.erb +++ b/app/views/contracts/show.html.erb @@ -31,7 +31,7 @@
<%= 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'}) %>