[#4183] Format wiki fields.

This commit is contained in:
Eric Davis
2010-07-13 11:09:37 -07:00
parent e19a1e192f
commit 9f4fec3fd2
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -26,6 +26,7 @@ module ContractsHelper
label = content_tag(:span, l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym) + ": ")
formatter = options[:format]
raw_content = options[:raw] || false
content = if formatter
send(formatter, object.send(field))
@@ -35,7 +36,7 @@ module ContractsHelper
content_tag(:p,
label +
h(content),
(raw_content ? content : h(content)),
html_options)
end
+4 -4
View File
@@ -13,13 +13,13 @@
<%= show_budget_field(resource, :total_spent, :total_budget, :html_options => {:class => 'contract-total'}) %>
<div id="contract-terms" style="border: 1px solid #000">
<%= show_field(resource, :client_point_of_contact, :html_options => {:class => 'contract-client-point-of-contact'}) %>
<%= show_field(resource, :client_point_of_contact, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-client-point-of-contact'}) %>
<%= show_field(resource, :executed, :html_options => {:class => 'contract-executed'}) %>
<%= show_field(resource, :discount_note, :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_terms, :html_options => {:class => 'contract-payment-terms'}) %>
<%= show_field(resource, :client_ap_contact_information, :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'}) %>
<%= show_field(resource, :po_number, :html_options => {:class => 'contract-po-number'}) %>
<%= show_field(resource, :details, :html_options => {:class => 'contract-details'}) %>
<%= show_field(resource, :details, :format => :textilizable, :raw => true, :html_options => {:class => 'contract-details'}) %>
<div id="contract-finances" style="border: 1px solid #000">
<%= show_budget_field(resource, :labor_spent, :labor_budget, :html_options => {:class => 'contract-labor'}) %>