Orbit/vendor/built_in_modules/dictionary/init.rb

89 lines
3.4 KiB
Ruby
Raw Normal View History

2013-08-22 06:49:38 +00:00
module Dictionary
OrbitApp.registration "Dictionary",:type=> 'ModuleApp' do
2013-08-22 08:34:18 +00:00
module_label 'dictionary.dictionary'
2013-08-22 06:49:38 +00:00
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
version "0.1"
organization "Rulingcom"
author "RD dep"
intro "I am intro"
update_info 'some update_info'
front_end do
2013-08-22 09:08:56 +00:00
app_page 'dictionary_vocabs' do
frontend_i18n "dictionary.frontend.dictionary"
2013-08-22 06:49:38 +00:00
end
end
2013-08-22 08:34:18 +00:00
category ["DictionaryVocabCategory"]
2013-08-22 06:49:38 +00:00
taggable
widgets do
# default_widget do
# query 'ArchiveFile.all'
# field :category
# link_field :title,{:method => 'panel_archive_front_end_archive_file_path',:args=>:self}
# link_field :archive_file_category_with_title,{:method => 'panel_archive_front_end_archive_files_path',:args=>{:category_id => [:archive_file_category,:id]}}
# end
2013-08-22 08:34:18 +00:00
# categories_query 'ArchiveFileCategory.all'
# tags_query 'ArchiveTag.all'
2013-08-22 06:49:38 +00:00
2013-08-22 08:34:18 +00:00
# customize_widget "index" do
# widget_i18n "archive.widget.index"
# style ["1"]
# end
2013-08-22 06:49:38 +00:00
2013-08-25 06:16:56 +00:00
customize_widget "dictionary_search_block" do
widget_i18n "dictionary.widget.search"
end
2013-08-22 06:49:38 +00:00
# item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"]
# item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links"
end
side_bar do
2013-08-22 07:24:11 +00:00
head_label_i18n 'dictionary.dictionary',:icon_class=>"icons-book"
2013-08-22 06:49:38 +00:00
available_for [:admin,:guest,:manager,:sub_manager]
2013-08-22 07:24:11 +00:00
active_for_controllers ({ :private => ['dictionary_vocab_categorys', 'dictionary_vocabs'] })
active_for_object_auth ['DictionaryVocabCategory']
2013-08-22 06:49:38 +00:00
2013-08-22 07:24:11 +00:00
head_link_path "panel_dictionary_back_end_dictionary_vocabs_path"
2013-08-22 06:49:38 +00:00
context_link 'all',
2013-08-22 08:13:21 +00:00
:link_path=>"panel_dictionary_back_end_dictionary_vocabs_path" ,
2013-08-22 06:49:38 +00:00
:priority=>1,
2013-08-22 08:13:21 +00:00
:active_for_action=>{:dictionary_vocabs=>:index},
2013-08-22 06:49:38 +00:00
:available_for => [:all]
context_link 'add',
2013-08-22 07:24:11 +00:00
:link_path => "new_panel_dictionary_back_end_dictionary_vocab_path",
2013-08-22 07:06:09 +00:00
:priority => 2,
:active_for_action => { :dictionary_vocabs => :new },
:available_for => [:sub_manager]
2013-08-22 06:49:38 +00:00
context_link 'categories',
2013-08-22 08:13:53 +00:00
:link_path => "panel_dictionary_back_end_dictionary_vocab_categorys_path" ,
:priority => 3,
:active_for_action => { :dictionary_vocab_categorys => :index },
2013-08-22 06:49:38 +00:00
:available_for => [:manager]
# context_link 'tags',
# :link_path=>"admin_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Archive'}))" ,
# :priority=>4,
# # :active_for_action=>{:bulletin_categorys=>:index},
# :available_for => [:manager]
context_link 'module_authorization',
2013-08-22 08:13:53 +00:00
:link_path => "admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Dictionary'}))",
:priority => 6,
:active_for_app_auth => 'Dictionary'
2013-08-22 06:49:38 +00:00
end
end
end