mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
export space statistics
This commit is contained in:
parent
05bf899393
commit
cf9181770b
@ -1,6 +1,6 @@
|
||||
class StatisticPolicy < ApplicationPolicy
|
||||
%w(index account event machine project subscription training user space scroll export_subscription export_machine
|
||||
export_training export_event export_account export_project export_global).each do |action|
|
||||
export_training export_event export_account export_project export_space export_global).each do |action|
|
||||
define_method "#{action}?" do
|
||||
user.is_admin?
|
||||
end
|
||||
|
@ -40,7 +40,7 @@ class StatisticsExportService
|
||||
File.open(export.file,"w+b") {|f| f.puts content }
|
||||
end
|
||||
|
||||
%w(account event machine project subscription training).each do |path|
|
||||
%w(account event machine project subscription training space).each do |path|
|
||||
class_eval %{
|
||||
def export_#{path}(export)
|
||||
|
||||
|
@ -15,7 +15,7 @@ class StatisticsExportWorker
|
||||
service = StatisticsExportService.new
|
||||
method_name = "export_#{export.export_type}"
|
||||
|
||||
if %w(account event machine project subscription training global).include?(export.export_type) and service.respond_to?(method_name)
|
||||
if %w(account event machine project subscription training space global).include?(export.export_type) and service.respond_to?(method_name)
|
||||
service.public_send(method_name, export)
|
||||
|
||||
NotificationCenter.call type: :notify_admin_export_complete,
|
||||
|
@ -275,6 +275,7 @@ en:
|
||||
statistics_project: "of statistics about projects"
|
||||
statistics_subscription: "of subscription statistics"
|
||||
statistics_training: "of statistics about trainings"
|
||||
statistics_space: "of statistics about spaces"
|
||||
users_members: "of the members' list"
|
||||
users_subscriptions: "of the subscriptions' list"
|
||||
users_reservations: "of the reservations' list"
|
||||
|
@ -275,6 +275,7 @@ fr:
|
||||
statistics_project: "des statistiques sur les projets"
|
||||
statistics_subscription: "des statistiques d'abonnements"
|
||||
statistics_training: "des statistiques sur les formations"
|
||||
statistics_space: "des statistiques sur les espaces"
|
||||
users_members: "de la liste des membres"
|
||||
users_subscriptions: "de la liste des abonnements"
|
||||
users_reservations: "de la liste des réservations"
|
||||
|
@ -268,6 +268,7 @@ en:
|
||||
statistics_project: "of statistics about projects"
|
||||
statistics_subscription: "of subscription statistics"
|
||||
statistics_training: "of statistics about trainings"
|
||||
statistics_space: "of statistics about spaces"
|
||||
users_members: "of the members' list"
|
||||
users_subscriptions: "of the subscriptions' list"
|
||||
users_reservations: "of the reservations' list"
|
||||
|
@ -268,6 +268,7 @@ fr:
|
||||
statistics_project: "des statistiques sur les projets"
|
||||
statistics_subscription: "des statistiques d'abonnements"
|
||||
statistics_training: "des statistiques sur les formations"
|
||||
statistics_space: "des statistiques sur les espaces"
|
||||
users_members: "de la liste des membres"
|
||||
users_subscriptions: "de la liste des abonnements"
|
||||
users_reservations: "de la liste des réservations"
|
||||
|
Loading…
Reference in New Issue
Block a user