2018-02-05 17:27:12 +00:00
|
|
|
.row
|
|
|
|
.col
|
2018-02-19 21:16:48 +00:00
|
|
|
= render 'layouts/breadcrumb', crumbs: [ link_to(t('sites.index'), sites_path), @site.name, link_to(t('posts.index'), site_posts_path(@site)), @category ]
|
2018-02-03 22:37:09 +00:00
|
|
|
.row
|
|
|
|
.col
|
|
|
|
%h1= @site.name
|
2018-01-29 22:19:10 +00:00
|
|
|
|
2018-02-03 22:37:09 +00:00
|
|
|
.row
|
|
|
|
.col
|
|
|
|
= link_to t('posts.new'), new_site_post_path(@site),
|
|
|
|
class: 'btn btn-success'
|
|
|
|
|
|
|
|
.row
|
|
|
|
.col
|
|
|
|
%table.table.table-condensed.table-striped
|
|
|
|
%tbody
|
|
|
|
- @site.posts.each do |post|
|
2018-02-19 21:16:48 +00:00
|
|
|
- if @category
|
|
|
|
- next unless post.categories.include?(@category)
|
2018-02-19 20:13:49 +00:00
|
|
|
- direction = post.get_front_matter(:dir)
|
2018-02-03 22:37:09 +00:00
|
|
|
%tr
|
2018-02-19 20:13:49 +00:00
|
|
|
%td{class: direction}
|
|
|
|
= link_to post.title, site_post_path(@site, post)
|
|
|
|
%br
|
2018-02-19 21:16:48 +00:00
|
|
|
%small
|
|
|
|
- post.categories.each do |c|
|
|
|
|
= link_to c, site_posts_path(@site, category: c)
|
2018-02-03 22:37:09 +00:00
|
|
|
%td= post.date.strftime('%F')
|
2018-02-19 21:16:48 +00:00
|
|
|
%td= link_to t('post.edit'), edit_site_post_path(@site, post)
|