new module exam_archive

This commit is contained in:
JiangRu committed 2015-04-08 10:52:35 +08:00
1 parent 736db91cb5
commit 5486b7612f
82 files changed
+2579 -22

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
require "archive_exam/engine"
module ArchiveExam
end
+77
View File
@@ -0,0 +1,77 @@
module ArchiveExam
class Engine < ::Rails::Engine
initializer "archive_exam" do
OrbitApp.registration "ArchiveExam", :type => "ModuleApp" do
module_label "archive_exam.archive_exam"
base_url File.expand_path File.dirname(__FILE__)
taggable "ArchiveExamFile"
categorizable
authorizable
frontend_enabled
side_bar do
head_label_i18n 'archive_exam.archive_exam', icon_class: "icon-building"
available_for "users"
active_for_controllers (['admin/archive_exam_files'])
head_link_path "admin_archive_exam_files_path"
context_link 'all',
:link_path=>"admin_archive_exam_files_path" ,
:priority=>1,
:active_for_action=>{'admin/archive_exam_files'=>"index"},
:available_for => 'users'
context_link 'new_',
:link_path=>"new_admin_archive_exam_file_path" ,
:priority=>2,
:active_for_action=>{'admin/archive_exam_files'=>"new"},
:available_for => 'sub_managers'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive_exam').id}",
:priority=>3,
:active_for_action=>{'admin/archive_exam_files'=>'categories'},
:active_for_category => 'ArchiveExam',
:available_for => 'managers'
context_link 'archive_exam.set_archive_exam_test_types',
:link_path=>"admin_archive_exam_test_types_path" ,
:priority=>4,
:active_for_action=>{'admin/archive_exams'=>'archive_exam_test_types'},
:available_for => 'managers'
context_link 'archive_exam.set_archive_exam_grades',
:link_path=>"admin_archive_exam_grades_path" ,
:priority=>5,
:active_for_action=>{'admin/archive_exams'=>'archive_exam_grades'},
:available_for => 'managers'
context_link 'archive_exam.set_archive_exam_departments',
:link_path=>"admin_archive_exam_departments_path" ,
:priority=>6,
:active_for_action=>{'admin/archive_exams'=>'archive_exam_departments'},
:available_for => 'managers'
context_link 'archive_exam.set_archive_exam_colleges',
:link_path=>"admin_archive_exam_colleges_path" ,
:priority=>7,
:active_for_action=>{'admin/archive_exams'=>'archive_exam_colleges'},
:available_for => 'managers'
context_link 'archive_exam.set_archive_exam_subjects',
:link_path=>"admin_archive_exam_subjects_path" ,
:priority=>8,
:active_for_action=>{'admin/archive_exams'=>'archive_exam_subjects'},
:available_for => 'managers'
context_link 'tags',
:link_path=>"admin_module_app_tags_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive_exam').id}",
:priority=>9,
:active_for_action=>{'admin/archive_exam_files'=>'tags'},
:active_for_tag => 'ArchiveExam',
:available_for => 'managers'
end
end
end
end
end
+3
View File
@@ -0,0 +1,3 @@
module ArchiveExam
VERSION = "0.0.1"
end
+4
View File
@@ -0,0 +1,4 @@
# desc "Explaining what the task does"
# task :archive_exam do
# # Task goes here
# end