Merge branch 'sidebar_config' into ntu
Conflicts: app/controllers/admin/object_auths_new_interface_controller.rb app/controllers/orbit_backend_controller.rb app/controllers/orbit_widget_controller.rb app/models/module_app.rb app/views/admin/page_parts/_module_widget.html.erb config/locales/zh_tw.yml lib/parsers/parser_common.rb lib/parsers/parser_front_end.rb
This commit is contained in:
commit
76296ab29b
160 files changed
+8659
-1037
No files matched your search
@@ -11,33 +11,21 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
@default_widget = @page_part.module_app.get_default_widget
|
||||
@widget_image_field = @default_widget[:image]
|
||||
data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3)
|
||||
@data = eval(@default_widget[:query]).limit(data_limit).includes(@widget_image_field)
|
||||
@data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field)
|
||||
|
||||
@fields = @page_part.widget_field
|
||||
|
||||
case params[:type]
|
||||
when "typeA"
|
||||
@tag_class = 'defulat_widget_typeA'
|
||||
render "typeA"
|
||||
when /typeB_/
|
||||
@tag_class = "defulat_widget_#{params[:type]}"
|
||||
render "typeB"
|
||||
when "typeC"
|
||||
@tag_class = 'defulat_widget_typeC'
|
||||
render "typeC"
|
||||
end
|
||||
|
||||
|
||||
|
||||
# {"inner"=>"true",
|
||||
# "category_id"=>"false",
|
||||
# "tag_id"=>"",
|
||||
# "page"=>"",
|
||||
# "search_query"=>"",
|
||||
# "part_title"=>"",
|
||||
# "part_id"=>"50ac426f83e75219d20000a7",
|
||||
# "controller"=>"default_widget",
|
||||
# "action"=>"default_widget",
|
||||
# "type"=>"typeA"}
|
||||
when "typeA"
|
||||
@tag_class = 'defulat_widget_typeA'
|
||||
render "typeA"
|
||||
when /typeB_/
|
||||
@tag_class = "defulat_widget_#{params[:type]}"
|
||||
render "typeB"
|
||||
when "typeC"
|
||||
@tag_class = 'defulat_widget_typeC'
|
||||
render "typeC"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user