51 lines
1.9 KiB
Text
51 lines
1.9 KiB
Text
|
.row
|
||
|
.col
|
||
|
= render 'layouts/breadcrumb',
|
||
|
crumbs: [ link_to(t('sites.index'), sites_path),
|
||
|
@site.name,
|
||
|
link_to(t('posts.index'),
|
||
|
site_usuaries_path(@site)) ]
|
||
|
= render 'layouts/help', help: t('help.breadcrumbs')
|
||
|
.row
|
||
|
.col
|
||
|
%h1= t('.title')
|
||
|
|
||
|
.row
|
||
|
.col
|
||
|
-# Una tabla de usuaries y otra de invitades, con acciones
|
||
|
- %i[usuaries invitades].each do |u|
|
||
|
%h2= t(".#{u.to_s}")
|
||
|
%p= t(".help.#{u.to_s}")
|
||
|
%table.table.table-striped.table-condensed
|
||
|
%tbody
|
||
|
- @site.send(u).each do |cuenta|
|
||
|
%tr
|
||
|
-# TODO: avatares
|
||
|
%td= cuenta.email
|
||
|
%td
|
||
|
.btn-group{role: 'group', 'aria-label': t('.actions')}
|
||
|
- if @policy.demote? && @site.usuarie?(cuenta)
|
||
|
= link_to t('.demote.text'),
|
||
|
site_usuarie_demote_path(@site, cuenta),
|
||
|
class: 'btn btn-warning',
|
||
|
data: { toggle: 'tooltip',
|
||
|
confirm: t('.demote.confirm')},
|
||
|
title: t('.help.demote'),
|
||
|
method: :patch
|
||
|
- if @policy.promote? && @site.invitade?(cuenta)
|
||
|
= link_to t('.promote.text'),
|
||
|
site_usuarie_promote_path(@site, cuenta),
|
||
|
class: 'btn btn-success',
|
||
|
data: { toggle: 'tooltip',
|
||
|
confirm: t('.promote.confirm')},
|
||
|
title: t('.help.promote'),
|
||
|
method: :patch
|
||
|
- if @policy.destroy?
|
||
|
= link_to t('.destroy.text'),
|
||
|
site_usuarie_path(@site, cuenta),
|
||
|
class: 'btn btn-danger',
|
||
|
data: { toggle: 'tooltip',
|
||
|
confirm: t('.destroy.confirm')},
|
||
|
title: t('.help.destroy'),
|
||
|
method: :delete
|