Sha256: 265c680e53f4b32bbf9a01051ce9f76ac34321889db1f5829ac5b6dbc0051c89

Contents?: true

Size: 1.35 KB

Versions: 4

Compression:

Stored size: 1.35 KB

Contents

.page-header
  = link_to t('.new_link'), new_comfy_admin_blog_post_path(@site), class: 'btn btn-secondary pull-right'
  %h2= t('.title')

= comfy_admin_partial "comfy/admin/blog/partials/posts_before"

= render "comfy/admin/cms/categories/index", type: "Comfy::Blog::Post"

= comfy_paginate @posts

%ul.list
  - @posts.each do |post|
    %li
      .row
        .col-md-8.item
          .item-content
            .item-title
              - published_css_class = post.is_published? ? "published" : "draft"
              = link_to post.title, edit_comfy_admin_blog_post_path(@site, post), class: published_css_class
            .item-meta
              - link = post.url
              = link_to link, link, target: "_blank"
              %br
              = post.published_at.try(:to_s, :db)

          .item-categories.ml-auto.d-flex.align-items-center
            = render "comfy/admin/cms/categories/categories", object: post

        .col-md-4.d-flex.align-items-center.justify-content-md-end
          .btn-group.btn-group-sm
            = link_to t('.edit'), edit_comfy_admin_blog_post_path(@site, post), class: 'btn btn-outline-secondary'
            = link_to t('.delete'), comfy_admin_blog_post_path(@site, post), method: :delete, data: {confirm: t('.are_you_sure')}, class: 'btn btn-danger'

= comfy_paginate @posts

= comfy_admin_partial "comfy/admin/blog/partials/posts_after"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
comfy_blog-2.0.3 app/views/comfy/admin/blog/posts/index.html.haml
comfy_blog-2.0.2 app/views/comfy/admin/blog/posts/index.html.haml
comfy_blog-2.0.1 app/views/comfy/admin/blog/posts/index.html.haml
comfy_blog-2.0.0 app/views/comfy/admin/blog/posts/index.html.haml