aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlban Peignier2017-09-30 14:17:28 +0200
committerAlban Peignier2017-09-30 14:46:09 +0200
commitfda2b7b07349fd20cc70d68bf1544a7f51841f70 (patch)
tree87772ddf673bcee1861ad5d54d9b26cfaed7fea9 /lib
parent1ae15e06f2a56f9a83d670ad9c785a74cb6af43e (diff)
downloadchouette-core-fda2b7b07349fd20cc70d68bf1544a7f51841f70.tar.bz2
Create DashboardController with STIF implementation. Refs #4655
Diffstat (limited to 'lib')
-rw-r--r--lib/stif/dashboard.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/stif/dashboard.rb b/lib/stif/dashboard.rb
new file mode 100644
index 000000000..fafddec62
--- /dev/null
+++ b/lib/stif/dashboard.rb
@@ -0,0 +1,15 @@
+module Stif
+ class Dashboard < ::Dashboard
+ def workbench
+ @workbench ||= current_organisation.workbenches.find_by(name: "Gestion de l'offre")
+ end
+
+ def referentials
+ @referentials ||= @workbench.all_referentials
+ end
+
+ def calendars
+ @calendars ||= Calendar.where('organisation_id = ? OR shared = ?', current_organisation.id, true)
+ end
+ end
+end