add custom field feature and fix some error
This commit is contained in:
1 parent
262a78f602
commit
f3bd5f4941
17 files changed
+1116
-65
No files matched your search
@@ -1,6 +1,18 @@
|
||||
module Ask
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "ask" do
|
||||
begin
|
||||
require File.expand_path('../../../app/models/ask_setting', __FILE__)
|
||||
require File.expand_path('../../../app/models/ask_setting_index', __FILE__)
|
||||
if defined? AskSetting && AskSetting.first.nil?
|
||||
AskSetting.create()
|
||||
end
|
||||
if defined? AskSettingIndex && AskSettingIndex.first.nil?
|
||||
AskSettingIndex.create()
|
||||
end
|
||||
rescue => e
|
||||
puts ['AskSetting not found',e]
|
||||
end
|
||||
OrbitApp.registration "Ask", :type => "ModuleApp" do
|
||||
module_label "ask.ask"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
@@ -23,6 +35,11 @@ module Ask
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/asks'=>'index'},
|
||||
:available_for => 'users'
|
||||
context_link 'ask.setting',
|
||||
:link_path=>"setting_admin_asks_path" ,
|
||||
:priority=>5,
|
||||
:active_for_action=>{'admin/asks'=>'setting'},
|
||||
:available_for => 'managers'
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'ask').id}",
|
||||
|
||||
Reference in new issue
Block a user