From 2325086776c47fda6600fa8ef918c551ccb2c3d1 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Tue, 19 Nov 2013 22:16:54 +0800 Subject: [PATCH] Updated gallery data api --- app/views/admin/sites/preference.html.erb | 2 +- .../panel/gallery/back_end/albums_controller.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb index 6cd1f289..3fe7fd95 100644 --- a/app/views/admin/sites/preference.html.erb +++ b/app/views/admin/sites/preference.html.erb @@ -135,7 +135,7 @@
<%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %> - API Is available for Mobile Apps + Make API available for Mobile Apps
diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb index fd27850d..a67581eb 100644 --- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb +++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb @@ -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),