mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
- owner = entry.owner
|
|
- lines = entry_lines(entry)
|
|
- images = entry_images(entry)
|
|
%article.neighbours-entry
|
|
= link_to image_tag(avatar_uri(owner, 48), alt: '', width: 48, height: 48, class: 'neighbours-avatar'), member_path(owner)
|
|
.neighbours-entry-body
|
|
.neighbours-entry-head
|
|
= link_to owner.login_name, member_path(owner), class: 'fw-bold'
|
|
- if entry.tag
|
|
%span.neighbours-tag{ class: entry.tag }= t(".#{entry.tag}")
|
|
%small= entry_when(entry)
|
|
- if lines.one?
|
|
- kind, sentence = lines.first
|
|
= render 'line', kind:, sentence:
|
|
- else
|
|
%p.neighbours-entry-text= t('.did_things_html', count: entry.items.size)
|
|
%ul.neighbours-entry-list
|
|
- lines.each do |kind, sentence|
|
|
%li= render 'line', kind:, sentence:
|
|
- if images.any?
|
|
.neighbours-entry-photos{ class: ('one' if images.one?) }
|
|
- images.each do |image|
|
|
= link_to subject_path(image[:link]) do
|
|
= image_tag image[:url], alt: ''
|
|
- entry.others.select { |item| item.type == 'garden_layout' }.each do |item|
|
|
= render 'layout', garden: item.record, owner:
|
|
- if lines.one? && entry.others.size <= 1 && (liked = (entry.others.first || entry.photos.first).record).respond_to?(:liked_by?)
|
|
.neighbours-entry-actions= render 'likes/likes', object: liked
|