Updated gallery data api
This commit is contained in:
parent
9178ebd793
commit
2325086776
|
@ -135,7 +135,7 @@
|
||||||
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
|
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
|
<%= 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
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_manager :except => [:index,:show,:update]
|
||||||
open_for_sub_manager :except => [:index, :show]
|
open_for_sub_manager :except => [:index, :show]
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
tag_names = Array.new
|
tag_names = Array.new
|
||||||
|
|
||||||
album.tag_ids.each do |tag|
|
album.tag_ids.each do |tag|
|
||||||
tag_names << GalleryTag.find(tag)[I18n.locale]
|
tag_names << get_tags.include?(tag)
|
||||||
end
|
end
|
||||||
if album.cover_path
|
if album.cover_path
|
||||||
cover_path = album.cover_path
|
cover_path = album.cover_path
|
||||||
|
@ -105,7 +105,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
tags = Array.new
|
tags = Array.new
|
||||||
|
|
||||||
image.tag_ids.each do |tag|
|
image.tag_ids.each do |tag|
|
||||||
tags << GalleryTag.find(tag)[I18n.locale]
|
tags << get_tags.include?(tag)
|
||||||
end
|
end
|
||||||
|
|
||||||
output << {
|
output << {
|
||||||
|
@ -127,7 +127,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
@images.each do |values|
|
@images.each do |values|
|
||||||
tags = Array.new
|
tags = Array.new
|
||||||
values.tag_ids.each do |tag|
|
values.tag_ids.each do |tag|
|
||||||
tags << GalleryTag.find(tag)[I18n.locale]
|
tags << get_tags.include?(tag)
|
||||||
end
|
end
|
||||||
@output << { _id: values.id,
|
@output << { _id: values.id,
|
||||||
theater_link: panel_gallery_back_end_album_image_path(values),
|
theater_link: panel_gallery_back_end_album_image_path(values),
|
||||||
|
|
Loading…
Reference in New Issue