mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 15:06:22 +00:00
Merge branch 'blazer' into panel.sutty.nl
This commit is contained in:
commit
d3cac78693
3 changed files with 6 additions and 1 deletions
|
@ -35,6 +35,8 @@ class PostsController < ApplicationController
|
||||||
|
|
||||||
# Filtrar los posts que les invitades no pueden ver
|
# Filtrar los posts que les invitades no pueden ver
|
||||||
@usuarie = site.usuarie? current_usuarie
|
@usuarie = site.usuarie? current_usuarie
|
||||||
|
|
||||||
|
@site_stat = SiteStat.new(site)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Registran cuándo fue la última recolección de datos.
|
# Registran cuándo fue la última recolección de datos.
|
||||||
class Stat < ApplicationRecord
|
class Stat < ApplicationRecord
|
||||||
# XXX: Los intervalos van en orden de mayor especificidad a menor
|
# XXX: Los intervalos van en orden de mayor especificidad a menor
|
||||||
INTERVALS = %i[day month year].freeze
|
INTERVALS = %i[day].freeze
|
||||||
RESOURCES = %i[builds space_used build_time].freeze
|
RESOURCES = %i[builds space_used build_time].freeze
|
||||||
COLUMNS = %i[http_referer geoip2_data_country_name].freeze
|
COLUMNS = %i[http_referer geoip2_data_country_name].freeze
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
- else
|
- else
|
||||||
%td= link_to t('posts.filter'), site_posts_path(@site, **@filter_params.merge(layout: layout.value)), class: 'btn btn-secondary btn-sm'
|
%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?
|
- if policy(@site).edit?
|
||||||
= link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn'
|
= link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue