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

28 lines
649 B
Text
Raw Normal View History

2018-01-30 15:20:19 +00:00
.row
%h1= @post.title
2018-01-31 20:29:27 +00:00
= link_to t('posts.edit'), edit_site_post_path(@site, @post),
class: 'btn btn-info'
2018-01-30 15:20:19 +00:00
.content
:markdown
#{@post.content}
%table.table.table-condensed.table-striped
%tbody
- @post.data.each do |key, data|
%tr
%th= key
%td
- if data.respond_to? :each
- data.each do |d|
%span.badge.badge-success= d
- elsif data.respond_to? :content
:markdown
#{data.content}
- elsif data.respond_to? :strftime
= data.strftime('%F')
- else
= data