5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 03:56:22 +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. datos y recibir su UUID en respuesta.
- content_for :post_form do - content_for :post_form do
%div{ id: modal_id, data: { controller: 'modal' }} %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 = render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' } do
- content_for :"#{id}_body" do - content_for :"#{id}_body" do
-# @todo ocultar el modal después de guardar -# @todo ocultar el modal después de guardar
@ -47,7 +48,8 @@
- content_for :"#{id}_footer" do - 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', 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 - else
-# @todo Implementar selección de layout para cargar el formulario correcto
Nada Nada

View file

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

View file

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