mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 19:26:21 +00:00
Merge branch 'issue-15154' into 'rails'
Issue #15154 See merge request sutty/sutty!249
This commit is contained in:
commit
00df57a096
2 changed files with 34 additions and 32 deletions
|
@ -36,8 +36,7 @@ class SiteUsuariePolicy
|
|||
end
|
||||
|
||||
def accept_invitation?
|
||||
su = site_usuarie
|
||||
(usuarie? || invitade?) && su.usuarie.rol_for_site(su.site).temporal
|
||||
!!site_usuarie.usuarie.rol_for_site(site_usuarie.site)&.temporal
|
||||
end
|
||||
|
||||
def reject_invitation?
|
||||
|
|
|
@ -15,15 +15,18 @@
|
|||
%tbody
|
||||
- @sites.each do |site|
|
||||
- next unless site.jekyll?
|
||||
|
||||
%tr
|
||||
%td
|
||||
%h2
|
||||
- if policy(site).show?
|
||||
= link_to site.title, site_posts_path(site, locale: site.default_locale)
|
||||
= link_to site.title,
|
||||
site_posts_path(site,
|
||||
locale: site.default_locale)
|
||||
- else
|
||||
= site.title
|
||||
%p.lead= site.description
|
||||
%br
|
||||
.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',
|
||||
|
|
Loading…
Reference in a new issue