mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 01:41:42 +00:00
seleccionar artículos con el estilo de sutty
This commit is contained in:
parent
42d22458a0
commit
9225ae7ce8
3 changed files with 11 additions and 2 deletions
|
@ -57,7 +57,7 @@
|
|||
%caption.sr-only= t('posts.caption')
|
||||
%thead
|
||||
%tr
|
||||
%th.border-0.background-white.position-sticky{ style: 'top: 0', colspan: '4' }
|
||||
%th.border-0.background-white.position-sticky{ style: 'top: 0; z-index: 2', colspan: '4' }
|
||||
= submit_tag t('posts.reorder.submit'), class: 'btn'
|
||||
%button.btn{ data: { action: 'reorder#unselect' } }
|
||||
= t('posts.reorder.unselect')
|
||||
|
@ -72,10 +72,17 @@
|
|||
-#
|
||||
TODO: Solo les usuaries cachean porque tenemos que separar
|
||||
les botones por permisos.
|
||||
|
||||
TODO: Verificar qué pasa cuando se gestiona el sitio en
|
||||
distintos idiomas a la vez
|
||||
- cache_if @usuarie, post do
|
||||
- checkbox_id = "checkbox-#{post.uuid.value}"
|
||||
%tr{ id: post.uuid.value, data: { target: 'reorder.row' } }
|
||||
%td
|
||||
%input{ type: 'checkbox', autocomplete: 'off', data: { action: 'reorder#select' } }
|
||||
.custom-control.custom-checkbox
|
||||
%input.custom-control-input{ id: checkbox_id, type: 'checkbox', autocomplete: 'off', data: { action: 'reorder#select' } }
|
||||
%label.custom-control-label{ for: checkbox_id }
|
||||
%span.sr-only= t('posts.reorder.select')
|
||||
-# Orden más alto es mayor prioridad
|
||||
= hidden_field 'post[reorder]', post.uuid.value,
|
||||
value: @posts.length - i,
|
||||
|
|
|
@ -475,6 +475,7 @@ en:
|
|||
destroy: Remove image
|
||||
reorder:
|
||||
submit: 'Save order'
|
||||
select: 'Select this post'
|
||||
unselect: 'Deselected all'
|
||||
top: 'Send to top'
|
||||
bottom: 'Send to bottom'
|
||||
|
|
|
@ -488,6 +488,7 @@ es:
|
|||
destroy: 'Eliminar imagen'
|
||||
reorder:
|
||||
submit: 'Guardar orden'
|
||||
select: 'Seleccionar este artículo'
|
||||
unselect: 'Deseleccionar todos'
|
||||
top: 'Enviar al principio'
|
||||
bottom: 'Enviar al final'
|
||||
|
|
Loading…
Reference in a new issue