engine/app/views/locomotive/notifications/new_content_entry.html.haml

29 lines
733 B
Plaintext
Raw Normal View History

%p= t('.title', :name => @account.name, :date => I18n.l(Time.now), :locale => @account.locale)
%hr
%p
%b= t('.type', :type => @type.name, :locale => @account.locale)
%br
%i= @type.description
%hr
%ul
2012-04-13 12:38:00 +00:00
- @type.ordered_entries_custom_fields.each do |field|
- value = @entry.send(field.name)
%li
%strong= field.label
 - 
%i
2012-04-13 12:38:00 +00:00
- case field.type.to_s
- when 'string', 'text', 'boolean', 'date'
= 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(', ')