all of user can get json of gallery from outside
This commit is contained in:
parent
43d969a72b
commit
b4f5a0b04b
|
@ -1,8 +1,7 @@
|
|||
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
include AdminHelper
|
||||
|
||||
# before_filter :force_order_for_visitor,:only=>[:index]
|
||||
before_filter :force_order_for_user#,:except => [:index]
|
||||
before_filter :force_order_for_user, :except => [:index,:imgs]
|
||||
|
||||
def index
|
||||
if is_manager? || is_admin? || is_sub_manager?
|
||||
|
@ -124,7 +123,14 @@ include AdminHelper
|
|||
values.tag_ids.each do |tag|
|
||||
tags << GalleryTag.find(tag)[I18n.locale]
|
||||
end
|
||||
@output << {"_id"=>values.id,"theater_link"=>panel_gallery_back_end_album_image_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: panel_gallery_back_end_album_image_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}
|
||||
end
|
||||
if is_manager? || is_admin? || is_sub_manager?
|
||||
@authenticated = true #turn this value to false for view only
|
||||
|
|
|
@ -16,8 +16,6 @@ Rails.application.routes.draw do
|
|||
match "album_images/#!/:id" => "album_images#show"
|
||||
|
||||
resources :album_images
|
||||
|
||||
|
||||
resources :gallery_categories
|
||||
resources :tags
|
||||
|
||||
|
|
Loading…
Reference in New Issue