mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 05:26:22 +00:00
Merge branch 'issue-15154' of 0xacab.org:sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
66045beb1c
2 changed files with 29 additions and 29 deletions
|
@ -36,8 +36,7 @@ class SiteUsuariePolicy
|
||||||
end
|
end
|
||||||
|
|
||||||
def accept_invitation?
|
def accept_invitation?
|
||||||
su = site_usuarie
|
!!site_usuarie.usuarie.rol_for_site(site_usuarie.site)&.temporal
|
||||||
(usuarie? || invitade?) && su.usuarie.rol_for_site(su.site).temporal
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def reject_invitation?
|
def reject_invitation?
|
||||||
|
|
|
@ -24,30 +24,31 @@
|
||||||
= site.title
|
= site.title
|
||||||
%p.lead= site.description
|
%p.lead= site.description
|
||||||
%br
|
%br
|
||||||
= link_to t('.visit'), site.url, class: 'btn btn-secondary'
|
.d-flex.flex-row
|
||||||
- if current_usuarie.rol_for_site(site).temporal?
|
= link_to t('.visit'), site.url, class: 'btn btn-secondary'
|
||||||
= render 'components/btn_base',
|
- if current_usuarie.rol_for_site(site).temporal?
|
||||||
text: t('sites.invitations.accept'),
|
= render 'components/btn_base',
|
||||||
path: site_usuaries_accept_invitation_path(site),
|
text: t('sites.invitations.accept'),
|
||||||
title: t('help.sites.invitations.accept'),
|
path: site_usuaries_accept_invitation_path(site),
|
||||||
class: 'btn-secondary'
|
title: t('help.sites.invitations.accept'),
|
||||||
= render 'components/btn_base',
|
class: 'btn-secondary'
|
||||||
text: t('sites.invitations.reject'),
|
= render 'components/btn_base',
|
||||||
path: site_usuaries_reject_invitation_path(site),
|
text: t('sites.invitations.reject'),
|
||||||
title: t('help.sites.invitations.reject'),
|
path: site_usuaries_reject_invitation_path(site),
|
||||||
class: 'btn-secondary'
|
title: t('help.sites.invitations.reject'),
|
||||||
- else
|
class: 'btn-secondary'
|
||||||
- if policy(site).show?
|
- else
|
||||||
= render 'layouts/btn_with_tooltip',
|
- if policy(site).show?
|
||||||
tooltip: t('help.sites.edit_posts'),
|
= render 'layouts/btn_with_tooltip',
|
||||||
type: 'success',
|
tooltip: t('help.sites.edit_posts'),
|
||||||
link: site_path(site),
|
type: 'success',
|
||||||
text: t('sites.posts')
|
link: site_path(site),
|
||||||
= render 'sites/build', site: site
|
text: t('sites.posts')
|
||||||
= render 'sites/moderation_queue', site: site
|
= render 'sites/build', site: site
|
||||||
- if policy(SiteUsuarie.new(site, current_usuarie)).index?
|
= render 'sites/moderation_queue', site: site
|
||||||
= render 'layouts/btn_with_tooltip',
|
- if policy(SiteUsuarie.new(site, current_usuarie)).index?
|
||||||
tooltip: t('usuaries.index.help.self'),
|
= render 'layouts/btn_with_tooltip',
|
||||||
text: t('usuaries.index.title'),
|
tooltip: t('usuaries.index.help.self'),
|
||||||
type: 'info',
|
text: t('usuaries.index.title'),
|
||||||
link: site_usuaries_path(site)
|
type: 'info',
|
||||||
|
link: site_usuaries_path(site)
|
||||||
|
|
Loading…
Reference in a new issue