Merge branch 'master' into 'master'

# Conflicts:
#   app/controllers/galleries_controller.rb
This commit is contained in:
wmcheng 2019-11-05 23:53:44 +08:00
commit e76fb42be6
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class GalleriesController < ApplicationController
tags << tag0
tags << tag1
end
def index
albums = Album.filter_by_categories.filter_by_tags.asc(:order)
galleries = albums.collect do |a|
@ -60,6 +61,7 @@ class GalleriesController < ApplicationController
albums = Album.filter_by_widget_categories.filter_by_tags(tags)
params = OrbitHelper.params
counts = OrbitHelper.widget_data_count
images = []
total_images = 0
if !albums.blank?
@ -127,7 +129,9 @@ class GalleriesController < ApplicationController
}
render :json => {"data" => data}.to_json
end
private
def show_desc?
tags = OrbitHelper.page_tags if tags.blank?
tags = [tags].flatten.uniq