Sha256: dda9a4947ee95635bbc01ca156f508d945b9a7febcabc302c2cdd48648e90b61

Contents?: true

Size: 1.07 KB

Versions: 21

Compression:

Stored size: 1.07 KB

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)
    - next if value.nil?
    li
      strong= field.label
      |  - 
      i
        - case field.type.to_s
        - when 'text'
          = raw(value.gsub(/(\r\n|\r|\n)/, '<br/>'))
        - 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 'time', 'date_time'
          = I18n.l(value.in_time_zone(@site.timezone))
        - when 'tags'
          = value.join(', ')
        - else
          = value

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.2.0.alpha1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.1.1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.1.0 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.1.0.rc1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.3 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.2 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.0 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.0.rc0 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.0.alpha3 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.4.1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.0.alpha2 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-4.0.0.alpha1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.4.0 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.3.0 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.3.0.rc3 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.3.0.rc2 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.2.1 app/views/locomotive/notifications/new_content_entry.html.slim
locomotivecms-3.3.0.rc1 app/views/locomotive/notifications/new_content_entry.html.slim