petities/petitions.eu

View on GitHub
app/views/updates/_single_update.html.slim

Summary

Maintainability
Test Coverage
h2= update.title
div.update-intro
  = markdown raw intro_text(update.text)

- if read_more_text(update.text).present?
  div.read-more-handler.whitespace
    | +
    = t('update.read_more')
  div.read-more-content.whitespace
    = markdown raw read_more_text(update.text)
    - if update.url
      = link_to update.url
        = update.url_text
- else
  div.whitespace

div.update-date
  - if update.date
    = l(update.date.to_date)

  - if @petition.nil? && update.petition.present?
    = ' | '
    = Petition.model_name.human
    = ' '
    = link_to(update.petition.name, petition_path(update.petition))