Merge branch 'master' into 'master'

return subtitle and image for templates

add subtitle and image to return value(hash)

See merge request !4
This commit is contained in:
EricTYL 2019-11-04 12:27:13 +08:00
commit 56822ed38c
2 changed files with 53 additions and 51 deletions

View File

@ -342,10 +342,12 @@ class AnnouncementsController < ApplicationController
"bulletin_links" => links,
"data" => {
"title" => announcement.title,
"subtitle_ann" => announcement.subtitle,
"update_user" => update_user,
"updated_at" => announcement.postdate.strftime('%Y-%m-%d %H:%M'),
"body" =>announcement.text,
"image" => announcement.image.url,
"img_src" => announcement.image.thumb.url || "/assets/announcement-default.jpg",
"alt_title" => desc
},
"impressionist" => (announcement.is_preview ? nil : announcement),