diff options
| author | Alban Peignier | 2017-09-30 14:17:28 +0200 |
|---|---|---|
| committer | Alban Peignier | 2017-09-30 14:46:09 +0200 |
| commit | fda2b7b07349fd20cc70d68bf1544a7f51841f70 (patch) | |
| tree | 87772ddf673bcee1861ad5d54d9b26cfaed7fea9 /lib | |
| parent | 1ae15e06f2a56f9a83d670ad9c785a74cb6af43e (diff) | |
| download | chouette-core-fda2b7b07349fd20cc70d68bf1544a7f51841f70.tar.bz2 | |
Create DashboardController with STIF implementation. Refs #4655
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/stif/dashboard.rb | 15 |
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 |
