Sha256: 6341b15c2cad29bfce4f5a929864c6693ebce5b506525b1b1cf912e6da59a4ac

Contents?: true

Size: 912 Bytes

Versions: 4

Compression:

Stored size: 912 Bytes

Contents

%p= t('.title', name: @account.name, domain: @domain, date: I18n.l(Time.now.in_time_zone), locale: @account.locale).html_safe

%p
  %b= t('.type', type: @type.name, locale: @account.locale)
  %br
  %i= @type.description

%hr

%ul
  - @type.ordered_entries_custom_fields.each do |field|
    - value = @entry.send(field.name)
    %li
      %strong= field.label
       - 
      %i
        - case field.type.to_s
        - when 'file'
          - url = value.guess_url
          - url = url =~ /^http/ ? url : URI.join("http://#{@domain}", url).to_s # Amazon S3 (http/https) or local files ?
          = link_to File.basename(url), url
        - when 'select'
          = value
        - when 'belongs_to'
          = value.try(:_label)
        - when 'has_many', 'many_to_many'
          = value.map(&:_label).join(', ')
        - when 'tags'
          = value.join(', ')
        - else
          = value

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
locomotivecms-3.0.0.pre.alpha.3 app/views/locomotive/notifications/new_content_entry.html.haml
locomotive_cms-2.5.7 app/views/locomotive/notifications/new_content_entry.html.haml
locomotivecms-3.0.0.pre.alpha.2 app/views/locomotive/notifications/new_content_entry.html.haml
locomotivecms-3.0.0.pre.alpha app/views/locomotive/notifications/new_content_entry.html.haml