2022-03-10 02:11:18 +00:00
|
|
|
module ApplicationForm
|
|
|
|
class Engine < ::Rails::Engine
|
2022-05-21 13:48:39 +00:00
|
|
|
initializer "application_form" do
|
|
|
|
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
|
|
|
|
require File.expand_path('../../../app/models/application_form_setting', __FILE__)
|
|
|
|
if defined?(ApplicationFormSetting)
|
|
|
|
s = ApplicationFormSetting.get_one
|
|
|
|
end
|
|
|
|
end
|
2022-03-10 02:11:18 +00:00
|
|
|
OrbitApp.registration "ApplicationForm", :type => "ModuleApp" do
|
|
|
|
module_label "application_form.application_form"
|
|
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
|
|
authorizable
|
|
|
|
categorizable
|
|
|
|
frontend_enabled
|
|
|
|
data_count 1..20
|
|
|
|
widget_methods ["widget"]
|
|
|
|
widget_settings [{"data_count"=>30}]
|
|
|
|
side_bar do
|
|
|
|
head_label_i18n 'application_form.application_form', icon_class: "icon-globe"
|
|
|
|
available_for "users"
|
|
|
|
active_for_controllers (['admin/application_forms'])
|
|
|
|
head_link_path "admin_application_forms_path"
|
|
|
|
|
|
|
|
context_link 'list_',
|
|
|
|
:link_path=>"admin_application_forms_path" ,
|
|
|
|
:priority=>1,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'index'},
|
|
|
|
:available_for => 'users'
|
|
|
|
context_link 'new_',
|
|
|
|
:link_path=>"new_admin_application_form_path" ,
|
|
|
|
:priority=>2,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'new'},
|
|
|
|
:available_for => 'managers'
|
|
|
|
context_link 'categories',
|
|
|
|
:link_path=>"admin_module_app_categories_path" ,
|
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'application_form').id}",
|
|
|
|
:priority=>3,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'categories'},
|
|
|
|
:active_for_category => 'ApplicationForm',
|
|
|
|
:available_for => 'managers'
|
2022-08-13 03:35:29 +00:00
|
|
|
# context_link 'application_form.set_application_form_items',
|
|
|
|
# :link_path=>"admin_application_form_items_path" ,
|
|
|
|
# :priority=>4,
|
|
|
|
# :active_for_action=>{'admin/application_forms'=>'application_form_items'},
|
|
|
|
# :available_for => 'managers'
|
2022-03-10 02:11:18 +00:00
|
|
|
context_link 'application_form.set_application_form_agreements',
|
|
|
|
:link_path=>"admin_application_form_agreements_path" ,
|
2022-05-21 13:48:39 +00:00
|
|
|
:priority=>5,
|
2022-03-10 02:11:18 +00:00
|
|
|
:active_for_action=>{'admin/application_forms'=>'application_form_agreements'},
|
|
|
|
:available_for => 'managers'
|
2022-08-13 03:35:29 +00:00
|
|
|
# context_link 'application_form.enquiry_for_applicants',
|
|
|
|
# :link_path=>"admin_application_form_enquiry_for_applicants_path" ,
|
|
|
|
# :priority=>6,
|
|
|
|
# :active_for_action=>{'admin/application_forms'=>'enquiry_for_applicants'},
|
|
|
|
# :available_for => 'users'
|
2023-05-21 09:16:16 +00:00
|
|
|
context_link 'application_form.ticket_status',
|
|
|
|
:link_path=>"ticket_status_admin_application_forms_path" ,
|
|
|
|
:priority=>6,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'ticket_status'},
|
|
|
|
:available_for => 'managers'
|
2022-05-21 13:48:39 +00:00
|
|
|
context_link 'application_form.setting',
|
|
|
|
:link_path=>"setting_admin_application_forms_path" ,
|
|
|
|
:priority=>7,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'setting'},
|
|
|
|
:available_for => 'managers'
|
|
|
|
context_link 'application_form.print_setting',
|
|
|
|
:link_path=>"print_setting_admin_application_forms_path" ,
|
|
|
|
:priority=>8,
|
|
|
|
:active_for_action=>{'admin/application_forms'=>'print_setting'},
|
|
|
|
:available_for => 'sub_managers'
|
2022-03-10 02:11:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|