Updated gallery data api

This commit is contained in:
saurabhbhatia 2013-11-19 22:16:54 +08:00
parent 9178ebd793
commit 2325086776
2 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
<div class="controls">
<%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
<span class="help-block">API Is available for Mobile Apps</span>
<span class="help-block">Make API available for Mobile Apps</span>
</div>
</div>

View File

@ -1,5 +1,5 @@
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
open_for_visitor :only => [:index, :show]
open_for_visitor :only => [:index, :show, :get_album_json, :get_imgs_json, :imgs]
open_for_manager :except => [:index,:show,:update]
open_for_sub_manager :except => [:index, :show]
@ -78,7 +78,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
tag_names = Array.new
album.tag_ids.each do |tag|
tag_names << GalleryTag.find(tag)[I18n.locale]
tag_names << get_tags.include?(tag)
end
if album.cover_path
cover_path = album.cover_path
@ -105,7 +105,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
tags = Array.new
image.tag_ids.each do |tag|
tags << GalleryTag.find(tag)[I18n.locale]
tags << get_tags.include?(tag)
end
output << {
@ -127,7 +127,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
@images.each do |values|
tags = Array.new
values.tag_ids.each do |tag|
tags << GalleryTag.find(tag)[I18n.locale]
tags << get_tags.include?(tag)
end
@output << { _id: values.id,
theater_link: panel_gallery_back_end_album_image_path(values),