mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 23:06:21 +00:00
fixup! feat: desde el modal, tener interfaz para agregar un artículo nuevo
This commit is contained in:
parent
8cafe32ce7
commit
4f08a0e5f2
3 changed files with 9 additions and 5 deletions
|
@ -26,6 +26,13 @@ class MetadataRelatedPosts < MetadataArray
|
|||
posts.where(uuid: value).map(&:title).map(&:value)
|
||||
end
|
||||
|
||||
# Encuentra el filtro
|
||||
#
|
||||
# @return [Hash]
|
||||
def filter
|
||||
layout.metadata.dig(name, 'filter')&.to_h&.symbolize_keys || {}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Obtiene todos los posts y opcionalmente los filtra
|
||||
|
@ -37,11 +44,6 @@ class MetadataRelatedPosts < MetadataArray
|
|||
"#{post&.title&.value || post&.slug&.value} #{post&.date&.value.strftime('%F')} (#{post.layout.humanized_name})"
|
||||
end
|
||||
|
||||
# Encuentra el filtro
|
||||
def filter
|
||||
layout.metadata.dig(name, 'filter')&.to_h&.symbolize_keys || {}
|
||||
end
|
||||
|
||||
def sanitize(uuid)
|
||||
super(uuid.map do |u|
|
||||
u.to_s.gsub(/[^a-f0-9\-]/i, '')
|
||||
|
|
|
@ -729,6 +729,7 @@ en:
|
|||
filter: "Start typing to filter..."
|
||||
accept: "Accept"
|
||||
cancel: "Cancel"
|
||||
add: "Add %{layout}"
|
||||
new_predefined_array:
|
||||
edit: "Edit"
|
||||
filter: "Start typing to filter..."
|
||||
|
|
|
@ -737,6 +737,7 @@ es:
|
|||
filter: "Empezá a escribir para filtrar..."
|
||||
accept: "Aceptar"
|
||||
cancel: "Cancelar"
|
||||
add: "Agregar %{layout}"
|
||||
new_predefined_array:
|
||||
edit: "Editar"
|
||||
filter: "Empezá a escribir para filtrar..."
|
||||
|
|
Loading…
Reference in a new issue