aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif/dashboard.rb
diff options
context:
space:
mode:
authorLuc Donnet2017-10-16 23:52:06 +0200
committerLuc Donnet2017-10-16 23:52:06 +0200
commitf480ad0739e5c0ec2c0c8bb890344b9c4777ba35 (patch)
treea19bc6b43449b8b978a53c33476fb3eb571d4dda /lib/stif/dashboard.rb
parentb611a84ed724036c4929bd4c3eaa7e23ea314f45 (diff)
parent51a1ea5b141032121913f807a162d305828bec54 (diff)
downloadchouette-core-f480ad0739e5c0ec2c0c8bb890344b9c4777ba35.tar.bz2
Merge branch 'master' into staging
Diffstat (limited to 'lib/stif/dashboard.rb')
-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