5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 15:56:21 +00:00
panel/app/views/posts/_new_related_post.haml

17 lines
623 B
Text
Raw Normal View History

:ruby
local_assigns[:modal_id] ||= 'generic_modal'
image = nil
description = nil
if post.post.attribute?(:image) && (image = post.post.image.static_file)
description = post.post.image.value['description']
end
.col.mb-3.p-1{ data: { controller: 'modal' } }
= render('bootstrap/card', image: image, description: description, title: post.title, class: 'h-100') do
- if post.post.attribute?(:description)
%p.card-text= post.post.description.value
= render 'bootstrap/btn', content: t('.edit'), data: { action: 'modal#showAnother', 'modal-show-value': local_assigns[:modal_id] }, id: random_id