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

solo las usuarias pueden ordenar posts

This commit is contained in:
f 2018-09-28 12:47:02 -03:00
parent e3c42bc606
commit c9e4356dba
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -51,24 +51,25 @@
sort_by: s) sort_by: s)
= form_tag site_reorder_posts_path, method: :post do = form_tag site_reorder_posts_path, method: :post do
= hidden_field 'posts', 'lang', value: @lang = hidden_field 'posts', 'lang', value: @lang
- if @site.ordered? @lang - if policy(@site).reorder_posts?
.reorder-posts-panel.alert.alert-info.alert-dismissible.fade.show{role: 'alert'} - if @site.ordered? @lang
= raw t('help.posts.reorder') .reorder-posts-panel.alert.alert-info.alert-dismissible.fade.show{role: 'alert'}
%br = raw t('help.posts.reorder')
= submit_tag t('posts.reorder_posts'), class: 'btn btn-success' %br
%button.close{type: 'button', = submit_tag t('posts.reorder_posts'), class: 'btn btn-success'
'aria-label': t('help.close') } %button.close{type: 'button',
%span{'aria-hidden': true} × 'aria-label': t('help.close') }
- else %span{'aria-hidden': true} ×
.alert.alert-danger.alert-dismissible.fade.show{role: 'alert'} - else
= raw t('errors.posts.disordered') .alert.alert-danger.alert-dismissible.fade.show{role: 'alert'}
%br = raw t('errors.posts.disordered')
= hidden_field 'posts', 'force', value: true %br
= submit_tag t('errors.posts.disordered_button'), class: 'btn btn-danger' = hidden_field 'posts', 'force', value: true
%button.close{type: 'button', = submit_tag t('errors.posts.disordered_button'), class: 'btn btn-danger'
data: { dismiss: 'alert' }, %button.close{type: 'button',
'aria-label': t('help.close') } data: { dismiss: 'alert' },
%span{'aria-hidden': true} × 'aria-label': t('help.close') }
%span{'aria-hidden': true} ×
%table.table.table-condensed.table-striped{class: (@site.ordered? @lang) ? 'table-draggable' : ''} %table.table.table-condensed.table-striped{class: (@site.ordered? @lang) ? 'table-draggable' : ''}
%tbody %tbody
- @posts.each_with_index do |post, i| - @posts.each_with_index do |post, i|
@ -79,7 +80,7 @@
-# establecer la direccion del texto -# establecer la direccion del texto
- direction = post.get_front_matter(:dir) - direction = post.get_front_matter(:dir)
%tr %tr
- if @site.ordered? @lang - if policy(@site).reorder_posts? && @site.ordered?(@lang)
%td %td
= fa_icon 'arrows-v', class: 'handle' = fa_icon 'arrows-v', class: 'handle'
= hidden_field 'posts[order]', i, value: post.order, class: 'post_order' = hidden_field 'posts[order]', i, value: post.order, class: 'post_order'