default widget link.
make sure to run rake migrate:make_default_widget_work_config for changing announcement module app
This commit is contained in:
1 parent
a34da20e48
commit
5793f0fe5d
16 files changed
+100
-50
No files matched your search
+13
-1
@@ -354,7 +354,19 @@ namespace :migrate do
|
||||
task :make_default_widget_work_config => :environment do
|
||||
a = ModuleApp.where(:key=>'announcement').first
|
||||
a.widgets[:default_widget] = ['typeA','typeC','typeB_style2','typeB_style3','typeB_style4']
|
||||
a.widget_fields = ["title","bulletin_category","postdate"]
|
||||
a.widget_fields = [
|
||||
["title","announcement.default_widget.title"],
|
||||
["bulletin_category_with_title","announcement.default_widget.bulletin_category_with_title"],
|
||||
["postdate_with_format","announcement.default_widget.postdate_with_format"]
|
||||
]
|
||||
a.get_default_widget = {:query=>'Bulletin.all',:image=> 'image'}
|
||||
a.widget_fields_link_method = {
|
||||
"title"=>{:method => 'panel_announcement_front_end_bulletin_path',
|
||||
:args=>:self},
|
||||
"bulletin_category_with_title"=>{
|
||||
:method => 'panel_announcement_front_end_bulletins_path',
|
||||
:args=>{:category_id => [:bulletin_category,:id]}}
|
||||
}
|
||||
a.save
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user