5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 22:36:22 +00:00
panel/app/views/sites/index.haml

57 lines
2.3 KiB
Text
Raw Permalink Normal View History

%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,
2024-05-02 19:25:20 +00:00
class: 'btn btn-secondary'
2018-02-26 19:59:55 +00:00
%section.col
2020-02-11 17:23:38 +00:00
- if @sites.empty?
:markdown
#{t('.welcome')}
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|
- next unless site.jekyll?
2024-05-02 19:25:20 +00:00
2024-03-21 21:12:12 +00:00
%tr
%td
%h2
- if policy(site).show?
2024-05-02 19:25:20 +00:00
= link_to site.title,
site_posts_path(site,
locale: site.default_locale)
- else
2024-03-21 21:12:12 +00:00
= site.title
%p.lead= site.description
.d-flex.flex-row
= link_to t('.visit'), site.url, class: 'btn btn-secondary'
- if current_usuarie.rol_for_site(site).temporal?
= render 'components/btn_base',
2024-05-02 19:25:20 +00:00
text: t('sites.invitations.accept'),
path: site_usuaries_accept_invitation_path(site),
title: t('help.sites.invitations.accept'),
class: 'btn-secondary'
= render 'components/btn_base',
2024-05-02 19:25:20 +00:00
text: t('sites.invitations.reject'),
path: site_usuaries_reject_invitation_path(site),
title: t('help.sites.invitations.reject'),
class: 'btn-secondary'
- else
2020-05-11 20:28:38 +00:00
- if policy(site).show?
= render 'layouts/btn_with_tooltip',
2024-05-02 19:25:20 +00:00
tooltip: t('help.sites.edit_posts'),
type: 'success',
link: site_path(site),
text: t('sites.posts')
= render 'sites/build', site: site
= render 'sites/moderation_queue', site: site
- if policy(SiteUsuarie.new(site, current_usuarie)).index?
= render 'layouts/btn_with_tooltip',
2024-05-02 19:25:20 +00:00
tooltip: t('usuaries.index.help.self'),
text: t('usuaries.index.title'),
type: 'info',
link: site_usuaries_path(site)