sutty/app/views/sites/index.haml

61 lines
2.5 KiB
Text
Raw Normal View History

2018-01-29 22:19:10 +00:00
2018-02-05 17:27:12 +00:00
.row
.col
= render 'layouts/breadcrumb', crumbs: [ t('sites.index') ]
.row
.col
%h1= t('sites.title')
2018-02-26 19:59:55 +00:00
= render 'layouts/help', help: t('help.sites.index')
2018-02-05 17:27:12 +00:00
%table.table.table-striped.table-condensed
%tbody
- @sites.each do |site|
%tr
2018-02-26 18:46:47 +00:00
%td
%h2
= link_to site.name, site_path(site)
- if site.invitade? current_usuarie
%span.badge.badge-warning{data: { toggle: 'tooltip' },
title: t('help.sites.invitade')}
= t('.invitade')
2018-02-26 18:46:47 +00:00
%br
.btn-group{role: 'group', 'aria-label': t('sites.actions')}
2018-09-28 15:27:25 +00:00
- if policy(site).show?
2018-02-26 19:59:55 +00:00
= render 'layouts/btn_with_tooltip',
2018-09-28 15:27:25 +00:00
tooltip: t('help.sites.edit_posts'),
type: 'success',
link: site_path(site),
text: t('sites.posts')
- if policy(SiteTranslation.new(site)).edit?
2018-02-26 19:59:55 +00:00
= render 'layouts/btn_with_tooltip',
2018-09-28 15:27:25 +00:00
tooltip: t('help.sites.edit_translations'),
text: t('i18n.edit'),
type: 'info',
link: site_i18n_edit_path(site)
- if policy(site).build?
- if site.enqueued?
= render 'layouts/btn_with_tooltip',
tooltip: t('help.sites.enqueued'),
text: t('sites.enqueued'),
type: 'secondary',
link: nil
- else
= form_tag site_enqueue_path(site), method: :post, class: 'form-inline' do
= button_tag type: 'submit',
class: 'btn btn-success',
title: t('help.sites.enqueue'),
data: { toggle: 'tooltip' } do
= fa_icon 'building'
= t('sites.enqueue')
- if policy(site).build_log?
- if site.failed?
%button.btn.btn-danger= t('sites.failed')
- if site.build_log?
= render 'layouts/btn_with_tooltip',
tooltip: t('help.sites.build_log'),
text: t('sites.build_log'),
type: 'warning',
link: site_build_log_path(site)