.grid.grid--auto.grid--flush.grid--center .grid__cell .card{ class: card_classes(:attributes, local_assigns[:active]) } = link_to edit_content_blog_entry_path(model), class: 'card__header' do %span.card__header-text= t('workarea.admin.content_blog_entries.cards.attributes.title') = inline_svg 'workarea/admin/icons/attributes.svg', class: 'card__icon' - if local_assigns[:active].blank? .card__body %ul.list-reset %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.author') = model.author.titleize %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.summary') = model.summary.presence || t('workarea.admin.content_blog_entries.cards.attributes.none') %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.tags') = model.tags.join(', ').presence || t('workarea.admin.content_blog_entries.cards.attributes.none') %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.featured') = model.featured.to_s.titleize %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.written_at') = local_time(model.written_at) %li %strong= t('workarea.admin.fields.updated_at') #{local_time_ago(model.updated_at)} %li %strong= t('workarea.admin.content_blog_entries.cards.attributes.created') #{local_time_ago(model.created_at)} = link_to edit_content_blog_entry_path(model), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.attributes.button') .grid__cell .card{ class: card_classes(:thumbnail_image, local_assigns[:active]) } = link_to thumbnail_image_content_blog_entry_path(model), class: 'card__header' do %span.card__header-text= t('workarea.admin.content_blog_entries.cards.thumbnail_image.title') = inline_svg 'workarea/admin/icons/images.svg', class: 'card__icon' - if local_assigns[:active].blank? .card__body - if model.thumbnail_image.present? = image_tag(model.thumbnail_image_url, itemprop: 'image' ) = link_to thumbnail_image_content_blog_entry_path(model), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.thumbnail_image.button_edit') - else .card__empty-note %p= t('workarea.admin.content_blog_entries.cards.thumbnail_image.no_thumbnail_image') %p= t('workarea.admin.content_blog_entries.cards.thumbnail_image.description') = link_to thumbnail_image_content_blog_entry_path(model), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.thumbnail_image.button_add') .grid__cell = render 'workarea/admin/content/card', content: model.content, active: local_assigns[:active] .grid__cell .card{ class: card_classes(:featured_products, local_assigns[:active]) } = link_to select_featured_product_path(model.to_global_id), class: 'card__header' do %span.card__header-text= t('workarea.admin.content_blog_entries.cards.featured_products.title') = inline_svg 'workarea/admin/icons/featured_products.svg', class: 'card__icon' - if local_assigns[:active].blank? .card__body - if model.featured_products.empty? .card__empty-note %p= t('workarea.admin.content_blog_entries.cards.featured_products.empty') %p= t('workarea.admin.content_blog_entries.cards.featured_products.description') = link_to select_featured_product_path(model.to_global_id), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.featured_products.empty_button') - else %ol.grid - model.featured_products.take(4).each_with_index do |product, i| %li.grid__cell.grid__cell--50 .card__photo-box - if i == 3 && model.featured_products.size > 4 %span.card__photo +#{model.featured_products.size - i} - else = image_tag product_image_url(product.primary_image, :medium), alt: product.name, class: 'card__photo' = link_to edit_featured_product_path(model.to_global_id), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.featured_products.button') .grid__cell .card{ class: card_classes(:user_comments, local_assigns[:active]) } = link_to content_blog_entry_comments_path(content_blog_entry_id: model.slug), class: 'card__header' do %span.card__header-text= t('workarea.admin.content_blog_entries.cards.comments.title') = inline_svg 'workarea/admin/icons/comments.svg', class: 'card__icon' - if local_assigns[:active].blank? .card__body - if model.comments.present? .comments %ul.comments__comment-group - model.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 content_blog_entry_comments_path(content_blog_entry_id: model.slug), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.comments.button_edit') - else %p= t('workarea.admin.content_blog_entries.cards.comments.no_comments') = link_to content_blog_user_comments_path(blog_entry_id: model.slug), class: 'card__button' do %span.button.button--small= t('workarea.admin.content_blog_entries.cards.comments.button_add') .grid__cell = render 'workarea/admin/timeline/card', timeline: model.timeline, active: local_assigns[:active]