Sha256: 1c3143b23509d10e98a4fe545ee17ca689d6dcb7dfbadad4464646807c8f5a0d

Contents?: true

Size: 1.42 KB

Versions: 62

Compression:

Stored size: 1.42 KB

Contents

.card{ class: card_classes(:comments, local_assigns[:active]) }
  = link_to commentable_comments_path(commentable.to_global_id), title: pluralize(commentable.comment_count, t('workarea.admin.comments.card.label')), class: 'card__header' do
    %span.card__header-text= t('workarea.admin.comments.card.title')
    = inline_svg 'workarea/admin/icons/comments.svg', class: 'card__icon'

  - if local_assigns[:active].blank?
    .card__body
      - unless commentable.has_comments?
        %p= t('workarea.admin.comments.card.description_1')
        %p= t('workarea.admin.comments.card.description_2')

        = link_to commentable_comments_path(commentable.to_global_id), class: 'card__button' do
          %span.button.button--small= t('workarea.admin.comments.card.blank_button')
      - else
        .comments
          %ul.comments__comment-group
            - commentable.comments.take(3).each do |comment|
              %li.comments__comment
                .comments__comment-avatar
                  = avatar_for comment.author
                .comments__comment-body
                  %span.comments__comment-author= comment&.author&.name
                  %span= comment.body
                  %span.comments__comment-time #{time_ago_in_words(comment.created_at)} ago
        = link_to commentable_comments_path(commentable.to_global_id), class: 'card__button' do
          %span.button.button--small= t('workarea.admin.comments.card.button')

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.15 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.36 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.14 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.35 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.13 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.34 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.12 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.33 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.11 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.10 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.32 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.9 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.31 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.8 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.30 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.7 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.29 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.6 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.28 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.5 app/views/workarea/admin/comments/_card.html.haml