added widget and engine settings
This commit is contained in:
parent
cc527b069c
commit
f97ccb0436
|
@ -33,4 +33,18 @@ class FaqsController < ApplicationController
|
|||
"faqs_files" => faqs_files
|
||||
}
|
||||
end
|
||||
|
||||
def widget
|
||||
faqs = Qa.filter_by_widget_categories.collect do |qa|
|
||||
{
|
||||
"link_to_show" => OrbitHelper.url_to_show(qa.to_param),
|
||||
"title" => qa.title,
|
||||
"postdate" => qa.created_at.strftime('%Y-%m-%d %H:%M')
|
||||
}
|
||||
end
|
||||
{
|
||||
"faqs" => faqs,
|
||||
"extras" => {"widget-title"=>"Faqs"}
|
||||
}
|
||||
end
|
||||
end
|
|
@ -4,7 +4,8 @@ module Faq
|
|||
OrbitApp.registration "Faq", :type => "ModuleApp" do
|
||||
module_label "faq.faq"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
|
||||
widget_methods ['widget']
|
||||
widget_settings [{"data_count"=>10}]
|
||||
taggable "Qa"
|
||||
categorizable
|
||||
authorizable
|
||||
|
|
Loading…
Reference in New Issue