mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-01 21:56:23 -04:00
58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
- content_for :title, @author ? t('.title.author_posts', author: @author) : t('.title.default')
|
|
|
|
- content_for :breadcrumbs do
|
|
- if @author.present?
|
|
%li.breadcrumb-item= link_to @author, @author
|
|
%li.breadcrumb-item.active= link_to 'posts', posts_path(author: @author.slug)
|
|
|
|
%h1= @author ? t('.title.author_posts', author: @author) : t('.title.default')
|
|
.pagination= render 'layouts/pagination', collection: @posts
|
|
.row
|
|
.card-deck
|
|
- @posts.each do |post|
|
|
.col-12.col-md-6
|
|
.card.post
|
|
.card-body
|
|
.row
|
|
.col-2.text-right
|
|
= render 'members/avatar', member: post.author
|
|
.col-10.border-left
|
|
%h5.card-title
|
|
= link_to strip_tags(post.subject), post
|
|
- if post.comments.size.positive?
|
|
%span.badge.badge-pill.badge-info.float-right
|
|
= icon 'fas', 'comment'
|
|
= post.comments.size
|
|
%p.text-muted
|
|
Posted by
|
|
- if post.author
|
|
= link_to post.author.login_name, member_path(post.author)
|
|
- else
|
|
Member Deleted
|
|
|
|
- if post.forum
|
|
in #{link_to post.forum, post.forum}
|
|
on #{post.created_at}"
|
|
- if post.updated_at > post.created_at
|
|
and edited at #{post.updated_at}
|
|
.card-text
|
|
.post-body= display_post_truncated(post)
|
|
- post.crops.each do |crop|
|
|
%span.badge.badge-pill.badge-primary= link_to crop, crop
|
|
|
|
|
|
.pagination= render 'layouts/pagination', collection: @posts
|
|
|
|
%p
|
|
- if @author
|
|
Subscribe to
|
|
= succeed "." do
|
|
= link_to "#{@author}'s posts RSS feed", member_posts_path(@author, format: 'rss')
|
|
|
|
- else
|
|
Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']}
|
|
= link_to "posts RSS feed", posts_path(format: 'rss')
|
|
or
|
|
= succeed "." do
|
|
= link_to "comments RSS feed", comments_path(format: 'rss')
|