5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 06:41:42 +00:00
panel/app/views/posts/index.haml

30 lines
933 B
Text
Raw Normal View History

2018-02-05 17:27:12 +00:00
.row
.col
= render 'layouts/breadcrumb', crumbs: [ link_to(t('sites.index'), sites_path), @site.name, link_to(t('posts.index'), site_posts_path(@site)), @category ]
.row
.col
%h1= @site.name
2018-01-29 22:19:10 +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|
- if @category
- next unless post.categories.include?(@category)
2018-02-19 20:13:49 +00:00
- direction = post.get_front_matter(:dir)
%tr
2018-02-19 20:13:49 +00:00
%td{class: direction}
= link_to post.title, site_post_path(@site, post)
%br
%small
- post.categories.each do |c|
= link_to c, site_posts_path(@site, category: c)
%td= post.date.strftime('%F')
%td= link_to t('post.edit'), edit_site_post_path(@site, post)