2011-12-22 23:45:32 +00:00
|
|
|
%p= t('.title', :name => @account.name, :date => I18n.l(Time.now), :locale => @account.locale)
|
|
|
|
|
|
|
|
%hr
|
|
|
|
|
|
|
|
%p
|
2012-01-09 14:49:59 +00:00
|
|
|
%b= t('.type', :type => @type.name, :locale => @account.locale)
|
2011-12-22 23:45:32 +00:00
|
|
|
%br
|
2012-01-09 14:49:59 +00:00
|
|
|
%i= @type.description
|
2011-12-22 23:45:32 +00:00
|
|
|
|
|
|
|
%hr
|
|
|
|
|
|
|
|
%ul
|
2012-04-13 12:38:00 +00:00
|
|
|
- @type.ordered_entries_custom_fields.each do |field|
|
|
|
|
- value = @entry.send(field.name)
|
2011-12-22 23:45:32 +00:00
|
|
|
%li
|
|
|
|
%strong= field.label
|
|
|
|
-
|
|
|
|
%i
|
2012-04-13 12:38:00 +00:00
|
|
|
- case field.type.to_s
|
|
|
|
- when 'string', 'text', 'boolean', 'date'
|
2012-01-09 14:49:59 +00:00
|
|
|
= value
|
2012-04-13 12:38:00 +00:00
|
|
|
- when 'file'
|
|
|
|
= link_to File.basename(value.to_s), value.to_s
|
|
|
|
- when 'select'
|
|
|
|
= value
|
|
|
|
- when 'belongs_to'
|
|
|
|
= value.try(:_label)
|
|
|
|
- when 'has_many', 'many_to_many'
|
|
|
|
= value.map(&:_label).join(', ')
|