Compare commits
5 Commits
master
...
thumb_widt
Author | SHA1 | Date |
---|---|---|
JiangRu | 958e801fc7 | |
Harry Bomrah | 5f848cbffa | |
manson | 54b33b5fc3 | |
manson | a0768d5076 | |
manson | 5f5acf9b6d |
|
@ -1,6 +1,12 @@
|
||||||
class GalleriesController < ApplicationController
|
class GalleriesController < ApplicationController
|
||||||
def index
|
def index
|
||||||
albums = Album.filter_by_categories
|
# albums = Album.filter_by_categories
|
||||||
|
|
||||||
|
params = OrbitHelper.params
|
||||||
|
|
||||||
|
albums = Album.filter_by_categories([],false).filter_by_tags.sample(OrbitHelper.page_data_count)
|
||||||
|
albums = Kaminari.paginate_array(albums).page(params[:page]).per(OrbitHelper.page_data_count)
|
||||||
|
|
||||||
galleries = albums.collect do |a|
|
galleries = albums.collect do |a|
|
||||||
{
|
{
|
||||||
"album-name" => a.name,
|
"album-name" => a.name,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class GalleryUploader < CarrierWave::Uploader::Base
|
||||||
# end
|
# end
|
||||||
|
|
||||||
version :thumb do
|
version :thumb do
|
||||||
process :resize_to_fill => [200, 200]
|
process :resize_to_limit => [200, nil]
|
||||||
end
|
end
|
||||||
|
|
||||||
version :theater do
|
version :theater do
|
||||||
|
|
Loading…
Reference in New Issue