fixed get_bulletins_json of gprs bug
This commit is contained in:
1 parent
7595e20d0c
commit
80abfc80bf
1 file changed
+11
-2
+11
-2
@@ -35,11 +35,20 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
else
|
||||
deadline = I18n.t("no_deadline")
|
||||
end
|
||||
@data[I18n.t("category")][b.bulletin_category.title] = { title: b.title,
|
||||
if @data[I18n.t("category")][b.bulletin_category.title].nil?
|
||||
@data[I18n.t("category")][b.bulletin_category.title] = Array.new
|
||||
@data[I18n.t("category")][b.bulletin_category.title] << { title: b.title,
|
||||
postdate: display_date_time(b.postdate),
|
||||
deadline: deadline,
|
||||
tag: b.sorted_tags.to_a,
|
||||
}
|
||||
}
|
||||
else
|
||||
@data[I18n.t("category")][b.bulletin_category.title] << { title: b.title,
|
||||
postdate: display_date_time(b.postdate),
|
||||
deadline: deadline,
|
||||
tag: b.sorted_tags.to_a,
|
||||
}
|
||||
end
|
||||
end
|
||||
render :json => @data.to_json
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user