mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 19:31:41 +00:00
botón de estadísticas más arriba
This commit is contained in:
parent
03d2914ec6
commit
091ceac788
2 changed files with 5 additions and 3 deletions
|
@ -35,6 +35,8 @@ class PostsController < ApplicationController
|
|||
|
||||
# Filtrar los posts que les invitades no pueden ver
|
||||
@usuarie = site.usuarie? current_usuarie
|
||||
|
||||
@site_stat = SiteStat.new(site)
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
- else
|
||||
%td= link_to t('posts.filter'), site_posts_path(@site, **@filter_params.merge(layout: layout.value)), class: 'btn btn-secondary btn-sm'
|
||||
|
||||
- if policy(@site_stat).index?
|
||||
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn'
|
||||
|
||||
- if policy(@site).edit?
|
||||
= link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn'
|
||||
|
||||
- if policy(@site).private?
|
||||
= link_to t('sites.private'), '../private/' + @site.name, class: 'btn', target: '_blank', rel: 'noopener'
|
||||
|
||||
- if policy(SiteStat.new(@site)).index?
|
||||
= link_to t('stats.index.title'), site_stats_path(@site), class: 'btn'
|
||||
|
||||
- if policy(SiteUsuarie.new(@site, current_usuarie)).index?
|
||||
= render 'layouts/btn_with_tooltip',
|
||||
tooltip: t('usuaries.index.help.self'),
|
||||
|
|
Loading…
Reference in a new issue