5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 12:56:21 +00:00

Merge branch 'blazer' into panel.sutty.nl

This commit is contained in:
f 2022-07-15 14:18:30 -03:00
commit d3cac78693
3 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -3,7 +3,7 @@
# Registran cuándo fue la última recolección de datos.
class Stat < ApplicationRecord
# 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
COLUMNS = %i[http_referer geoip2_data_country_name].freeze

View file

@ -15,6 +15,9 @@
- 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'