status for widget
This commit is contained in:
parent
013c8c46cf
commit
dfe13c1ffb
|
@ -47,10 +47,17 @@ class FaqsController < ApplicationController
|
||||||
|
|
||||||
def widget
|
def widget
|
||||||
faqs = Qa.filter_by_widget_categories.collect do |qa|
|
faqs = Qa.filter_by_widget_categories.collect do |qa|
|
||||||
|
statuses = qa.statuses_with_classname.collect do |status|
|
||||||
|
{
|
||||||
|
"status" => status["name"],
|
||||||
|
"status-class" => "status-#{status['classname']}"
|
||||||
|
}
|
||||||
|
end
|
||||||
{
|
{
|
||||||
"link_to_show" => OrbitHelper.widget_item_url(qa.to_param),
|
"link_to_show" => OrbitHelper.widget_item_url(qa.to_param),
|
||||||
"title" => qa.title,
|
"title" => qa.title,
|
||||||
"postdate" => qa.created_at.strftime('%Y-%m-%d %H:%M')
|
"postdate" => qa.created_at.strftime('%Y-%m-%d %H:%M'),
|
||||||
|
"statuses" => statuses
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue