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.27 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.26 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.45 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.25 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.23 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.44 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.22 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.43 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.21 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.42 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.20 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.41 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.19 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.40 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.18 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.39 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.17 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.38 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.5.16 app/views/workarea/admin/comments/_card.html.haml
workarea-admin-3.4.37 app/views/workarea/admin/comments/_card.html.haml