summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2012-06-25 15:38:18 +0200
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2012-06-25 15:38:18 +0200
commit71080d4ff14a06604a3c8471f8062f88aed3bf77 (patch)
treef3cfc091f8c13a1f61f4b400f21785dca0dc8a32
downloadecs_campusconnect_template-71080d4ff14a06604a3c8471f8062f88aed3bf77.tar.gz
ecs_campusconnect_template-71080d4ff14a06604a3c8471f8062f88aed3bf77.zip
CampusConnect template.
Creates several ECS resources. It's executed as an initializer.
-rw-r--r--ecs_campusconnect.rb58
1 files changed, 58 insertions, 0 deletions
diff --git a/ecs_campusconnect.rb b/ecs_campusconnect.rb
new file mode 100644
index 0000000..e72a863
--- /dev/null
+++ b/ecs_campusconnect.rb
@@ -0,0 +1,58 @@
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+# Heiko Bernloehr (FreeIT.de).
+#
+# This file is part of ECS.
+#
+# ECS is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of
+# the License, or (at your option) any later version.
+#
+# ECS is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License along with ECS. If not, see <http://www.gnu.org/licenses/>.
+
+
+initializer 'ecs_campusconnect.rb', <<-CODE
+## CampusConnect resources
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'courselinks',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","courselinks").nil?
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'course_members',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","course_members").nil?
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'courses',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","courses").nil?
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'terms',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","terms").nil?
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'directory_trees',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","directory_trees").nil?
+Ressource.create \
+ :namespace => 'campusconnect',
+ :ressource => 'organisation_units',
+ :postroute => true,
+ :events => true \
+ if Ressource.find_by_namespace_and_ressource("campusconnect","organisation_units").nil?
+CODE