5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 23:36:21 +00:00

fix: new_has_one

This commit is contained in:
f 2024-06-04 17:11:32 -03:00
parent 5a6ee375b1
commit 0e83b09bf0
No known key found for this signature in database
3 changed files with 10 additions and 2 deletions

View file

@ -38,7 +38,8 @@
datos y recibir su UUID en respuesta.
- content_for :post_form do
%div{ id: modal_id, data: { controller: 'modal' }}
- if layout.is_a?(String)
-# Si hay un solo layout o el post asociado ya existía
- if layout.is_a?(String) || metadata.has_one.present?
= render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' } do
- content_for :"#{id}_body" do
-# @todo ocultar el modal después de guardar
@ -47,7 +48,8 @@
- content_for :"#{id}_footer" do
= render 'bootstrap/btn', form: form_id, content: t('.save'), type: 'submit', class: 'm-0 mt-1 mr-1'
= render 'bootstrap/btn', content: t('.cancel'), action: 'modal#hide', class: 'm-0 mt-1 mr-1'
= render 'bootstrap/btn', content: t('.close'), action: 'modal#hide', class: 'm-0 mt-1 mr-1'
- else
-# @todo Implementar selección de layout para cargar el formulario correcto
Nada

View file

@ -756,6 +756,8 @@ en:
empty: "(Empty)"
draft:
label: Draft
new_has_one:
edit: "Edit"
reorder:
submit: 'Save order'
select: 'Select this post'
@ -944,6 +946,7 @@ en:
add: "Add %{layout}"
add_new: "Add new option"
cancel: "Cancel"
close: "Close"
edit: "Edit"
filter: "Start typing to filter..."
save: "Save"

View file

@ -764,6 +764,8 @@ es:
empty: "(Vacío)"
draft:
label: Borrador
new_has_one:
edit: "Editar"
reorder:
submit: 'Guardar orden'
select: 'Seleccionar este artículo'
@ -952,6 +954,7 @@ es:
add: "Agregar %{layout}"
add_new: "Agregar nueva opción"
cancel: "Cancelar"
close: "Cerrar"
edit: "Editar"
filter: "Empezá a escribir para filtrar..."
save: "Guardar"