Updated image json with albums
This commit is contained in:
parent
e0e5dd7a3f
commit
8af5112d24
|
@ -107,11 +107,17 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
image.tag_ids.each do |tag|
|
image.tag_ids.each do |tag|
|
||||||
tags << get_tags.include?(tag)
|
tags << get_tags.include?(tag)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if image.file.theater.present?
|
||||||
|
@image_file = image.file.theater.url
|
||||||
|
else
|
||||||
|
@image_file = image.file.url
|
||||||
|
end
|
||||||
|
|
||||||
output << {
|
output << {
|
||||||
image_title: image.title,
|
image_title: image.title,
|
||||||
image_description: image.description,
|
image_description: image.description,
|
||||||
image_file: { url: "http://#{request.host_with_port}#{image.file.url}",
|
image_file: { url: "http://#{request.host_with_port}#{@image_file}",
|
||||||
thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"},
|
thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"},
|
||||||
image_tag_names: tags}
|
image_tag_names: tags}
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue