Add media management
This commit is contained in:
16
slices/admin/views/photos/index.rb
Normal file
16
slices/admin/views/photos/index.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
module Admin
|
||||
module Views
|
||||
module Photos
|
||||
class Index < Admin::View
|
||||
|
||||
MEDIA_DIR = "public/media/".freeze
|
||||
|
||||
expose :photos_buckets do
|
||||
Dir["#{MEDIA_DIR}*"].each_with_object({}) do |root, memo|
|
||||
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user