modified chinese status class problem
This commit is contained in:
parent
ae93ba9309
commit
5946031125
|
@ -3,10 +3,10 @@ class AnnouncementsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_categories
|
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_categories
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
statuses = a.statuses.collect do |status|
|
statuses = a.statuses_with_classname.collect do |status|
|
||||||
{
|
{
|
||||||
"status" => status,
|
"status" => status["name"],
|
||||||
"status-class" => "status-#{status.downcase}"
|
"status-class" => "status-#{status['classname']}"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
|
@ -30,10 +30,10 @@ class AnnouncementsController < ApplicationController
|
||||||
def widget
|
def widget
|
||||||
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_widget_categories
|
announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.order_by(:created_at=>'desc').filter_by_widget_categories
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
statuses = a.statuses.collect do |status|
|
statuses = a.statuses_with_classname.collect do |status|
|
||||||
{
|
{
|
||||||
"status" => status,
|
"status" => status["name"],
|
||||||
"status-class" => "status-#{status.downcase}"
|
"status-class" => "status-#{status['classname']}"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue