2024-05-23 21:20:20 +00:00
|
|
|
:ruby
|
2024-07-04 18:05:58 +00:00
|
|
|
local_assigns[:modal_id] ||= 'generic_modal'
|
|
|
|
|
2024-05-23 21:20:20 +00:00
|
|
|
image = nil
|
|
|
|
description = nil
|
|
|
|
|
|
|
|
if post.post.attribute?(:image) && (image = post.post.image.static_file)
|
|
|
|
description = post.post.image.value['description']
|
|
|
|
end
|
|
|
|
|
2024-07-04 18:05:58 +00:00
|
|
|
.col.mb-3.p-1{ data: { controller: 'modal' } }
|
2024-05-23 21:20:20 +00:00
|
|
|
= 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
|
|
|
|
|
2024-07-04 18:05:58 +00:00
|
|
|
= render 'bootstrap/btn', content: t('.edit'), data: { action: 'modal#showAnother', 'modal-show-value': local_assigns[:modal_id] }, id: random_id
|