correct pic file format
This commit is contained in:
parent
8e33313b13
commit
8815533075
|
@ -177,7 +177,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
theater_link: panel_gallery_back_end_album_image_path(values),
|
||||
description: values.description,
|
||||
title: values.title,
|
||||
file: values.file,
|
||||
file: values.file.as_json[:file],
|
||||
gallery_album_id: values.gallery_album_id,
|
||||
tag_ids: values.tag_ids,
|
||||
tag_names: tags}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||
|
||||
def index
|
||||
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -10,7 +8,6 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
|||
@album.tag_ids.each do |tag|
|
||||
@tags << GalleryTag.find(tag)[I18n.locale]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def get_albums
|
||||
|
@ -61,8 +58,6 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
|||
render :json=>@output.to_json
|
||||
end
|
||||
|
||||
|
||||
|
||||
def imgs
|
||||
@album = GalleryAlbum.find(params[:id])
|
||||
@images = @album.gallery_images.all
|
||||
|
@ -72,9 +67,16 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
|||
values.tag_ids.each do |tag|
|
||||
tags << GalleryTag.find(tag)[I18n.locale]
|
||||
end
|
||||
@output << {"_id"=>values.id,"theater_link"=>theater_panel_gallery_front_end_album_path(values),"description"=>values.description,"title"=>values.title,"file"=>values.file,"gallery_album_id"=>values.gallery_album_id,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
|
||||
@output << {:_id => values.id,
|
||||
:theater_link => theater_panel_gallery_front_end_album_path(values),
|
||||
:description => values.description,
|
||||
:title => values.title,
|
||||
:file => values.file.as_json[:file],
|
||||
:gallery_album_id => values.gallery_album_id,
|
||||
:tag_ids => values.tag_ids,
|
||||
:tag_names => tags}
|
||||
end
|
||||
render :json=>{"images" => @output}.to_json
|
||||
render :json=>{:images => @output}.to_json
|
||||
end
|
||||
|
||||
def images_tags
|
||||
|
@ -99,12 +101,4 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
|||
end
|
||||
@back_link = panel_gallery_front_end_album_path(@albumid)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Reference in New Issue