2019-09-12 16:57:25 +00:00
|
|
|
= render 'layouts/breadcrumb', crumbs: [t('sites.index.title')]
|
2019-09-04 16:50:27 +00:00
|
|
|
|
2019-09-12 18:10:01 +00:00
|
|
|
%main.row
|
|
|
|
%aside.col-md-3
|
|
|
|
%h1= t('.title')
|
|
|
|
%p.lead= t('.help')
|
|
|
|
- if policy(Site).new?
|
|
|
|
= link_to t('sites.new.title'), new_site_path,
|
|
|
|
class: 'btn'
|
2018-02-26 19:59:55 +00:00
|
|
|
|
2019-09-12 18:10:01 +00:00
|
|
|
%section.col
|
2019-09-12 17:09:43 +00:00
|
|
|
%table.table.table-condensed
|
2018-02-05 17:27:12 +00:00
|
|
|
%tbody
|
|
|
|
- @sites.each do |site|
|
|
|
|
%tr
|
2018-02-26 18:46:47 +00:00
|
|
|
%td
|
2019-07-04 00:47:59 +00:00
|
|
|
%h2
|
2019-07-10 19:58:06 +00:00
|
|
|
- if policy(site).show?
|
|
|
|
= link_to site.name, site_path(site)
|
2019-07-16 19:47:44 +00:00
|
|
|
- else
|
2019-07-10 19:58:06 +00:00
|
|
|
= site.name
|
2018-02-26 18:46:47 +00:00
|
|
|
%br
|
2019-09-12 18:10:01 +00:00
|
|
|
- if current_usuarie.rol_for_site(site).temporal
|
|
|
|
= button_to t('sites.invitations.accept'),
|
|
|
|
site_usuaries_accept_invitation_path(site),
|
|
|
|
data: { toggle: 'tooltip' },
|
|
|
|
title: t('help.sites.invitations.accept'),
|
|
|
|
method: :patch,
|
|
|
|
class: 'btn'
|
|
|
|
= button_to t('sites.invitations.reject'),
|
|
|
|
site_usuaries_reject_invitation_path(site),
|
|
|
|
data: { toggle: 'tooltip' },
|
|
|
|
title: t('help.sites.invitations.reject'),
|
|
|
|
method: :patch,
|
|
|
|
class: 'btn'
|
|
|
|
- else
|
|
|
|
- if policy(site).show?
|
|
|
|
= render 'layouts/btn_with_tooltip',
|
|
|
|
tooltip: t('help.sites.edit_posts'),
|
|
|
|
type: 'success',
|
|
|
|
link: site_path(site),
|
|
|
|
text: t('sites.posts')
|
|
|
|
- if policy(SiteTranslation.new(site)).edit?
|
|
|
|
= render 'layouts/btn_with_tooltip',
|
|
|
|
tooltip: t('help.sites.edit_translations'),
|
|
|
|
text: t('i18n.edit'),
|
|
|
|
type: 'info',
|
|
|
|
link: site_i18n_edit_path(site)
|
|
|
|
- if policy(SiteUsuarie.new(site, current_usuarie)).index?
|
|
|
|
= render 'layouts/btn_with_tooltip',
|
|
|
|
tooltip: t('usuaries.index.help.self'),
|
|
|
|
text: t('usuaries.index.title'),
|
|
|
|
type: 'info',
|
|
|
|
link: site_usuaries_path(site)
|
|
|
|
- if policy(site).pull? && site.repository.needs_pull?
|
|
|
|
= render 'layouts/btn_with_tooltip',
|
|
|
|
tooltip: t('help.sites.pull'),
|
|
|
|
text: t('.pull'),
|
|
|
|
type: 'info',
|
|
|
|
link: site_pull_path(site)
|
|
|
|
= render 'sites/build', site: site
|