Sha256: d6619706e2bd35c555725178dae762afb7098adc8b1b58096ea9254c716189bd

Contents?: true

Size: 1.26 KB

Versions: 35

Compression:

Stored size: 1.26 KB

Contents

.card{ class: card_classes(:content, local_assigns[:active]) }
  = link_to edit_content_path(content), class: 'card__header', data: { turbolinks: false } do
    %span.card__header-text= t('workarea.admin.content.card.title')
    = inline_svg 'workarea/admin/icons/content.svg', class: 'card__icon'

  - if local_assigns[:active].blank?
    .card__body
      - if content.blocks.active.empty?
        %p.card__empty-note= t('workarea.admin.content.card.description')
        = link_to edit_content_path(content), class: 'card__button' do
          %span.button.button--small= t('workarea.admin.content.card.blank_button')
      - else
        %ol.content-block-list
          - content.blocks.active.take(5).each do |block|
            %li.content-block-list__item
              = content_block_icon(block.icon, title: block.name, class: 'content-block-list__icon')
              %span.content-block-list__name= block.name

          - if content.blocks.length > 5
            %li.content-block-list__item.align-center
              = link_to t('workarea.admin.cards.more', amount: content.blocks.length - 5), edit_content_path(content)

        = link_to edit_content_path(content), class: 'card__button' do
          %span.button.button--small= t('workarea.admin.content.card.button')

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
workarea-admin-3.4.45 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.44 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.43 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.42 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.41 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.40 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.39 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.38 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.37 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.36 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.35 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.34 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.33 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.32 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.31 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.30 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.29 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.28 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.27 app/views/workarea/admin/content/_card.html.haml
workarea-admin-3.4.26 app/views/workarea/admin/content/_card.html.haml