diff --git a/app/views/posts/_new_related_post.haml b/app/views/posts/_new_related_post.haml index 8425ad3e..79bf33a2 100644 --- a/app/views/posts/_new_related_post.haml +++ b/app/views/posts/_new_related_post.haml @@ -6,7 +6,7 @@ description = post.post.image.value['description'] end -.col.mb-3 +.col.mb-3.p-1 = 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 diff --git a/app/views/posts/attributes/_new_belongs_to.haml b/app/views/posts/attributes/_new_belongs_to.haml index afbc8bdd..0a2a4c5b 100644 --- a/app/views/posts/attributes/_new_belongs_to.haml +++ b/app/views/posts/attributes/_new_belongs_to.haml @@ -41,8 +41,9 @@ Para poder cancelar, mantenemos el estado original y desactivamos o activamos los ítemes según estén incluidos en esa lista o no. .row.row-cols-3.row-cols-md-4.no-gutters.placeholder-glow{ data: { target: 'array.current' } } - - metadata.values.slice(*metadata.value).each do |value| - = render 'posts/new_array_value', value: value + -# @todo issue-7537 + - if !metadata.empty? && (indexed_post = site.indexed_posts.find_by(post_id: metadata.value)) + = render 'posts/new_related_post', post: indexed_post = render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' }, hide_actions: ['array#cancel'] do - content_for :"#{id}_header" do diff --git a/app/views/posts/attributes/_new_has_and_belongs_to_many.haml b/app/views/posts/attributes/_new_has_and_belongs_to_many.haml index 143ad2d1..0b53f0ae 100644 --- a/app/views/posts/attributes/_new_has_and_belongs_to_many.haml +++ b/app/views/posts/attributes/_new_has_and_belongs_to_many.haml @@ -40,8 +40,10 @@ Para poder cancelar, mantenemos el estado original y desactivamos o activamos los ítemes según estén incluidos en esa lista o no. .row.row-cols-3.row-cols-md-4.no-gutters.placeholder-glow{ data: { target: 'array.current' } } - - metadata.values.slice(*metadata.value).each do |value| - = render 'posts/new_array_value', value: value + -# @todo issue-7537 + - metadata.value.each do |uuid| + - if (indexed_post = site.indexed_posts.find_by(post_id: uuid)) + = render 'posts/new_related_post', post: indexed_post = render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' }, hide_actions: ['array#cancel'] do - content_for :"#{id}_header" do diff --git a/app/views/posts/attributes/_new_has_many.haml b/app/views/posts/attributes/_new_has_many.haml index 143ad2d1..0b53f0ae 100644 --- a/app/views/posts/attributes/_new_has_many.haml +++ b/app/views/posts/attributes/_new_has_many.haml @@ -40,8 +40,10 @@ Para poder cancelar, mantenemos el estado original y desactivamos o activamos los ítemes según estén incluidos en esa lista o no. .row.row-cols-3.row-cols-md-4.no-gutters.placeholder-glow{ data: { target: 'array.current' } } - - metadata.values.slice(*metadata.value).each do |value| - = render 'posts/new_array_value', value: value + -# @todo issue-7537 + - metadata.value.each do |uuid| + - if (indexed_post = site.indexed_posts.find_by(post_id: uuid)) + = render 'posts/new_related_post', post: indexed_post = render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' }, hide_actions: ['array#cancel'] do - content_for :"#{id}_header" do