fixed get_bulletins_json of gprs bug
This commit is contained in:
parent
7595e20d0c
commit
80abfc80bf
|
@ -35,11 +35,20 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
else
|
else
|
||||||
deadline = I18n.t("no_deadline")
|
deadline = I18n.t("no_deadline")
|
||||||
end
|
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),
|
postdate: display_date_time(b.postdate),
|
||||||
deadline: deadline,
|
deadline: deadline,
|
||||||
tag: b.sorted_tags.to_a,
|
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
|
end
|
||||||
render :json => @data.to_json
|
render :json => @data.to_json
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue