Handling the grid/list display in the view now
This commit is contained in:
parent
d18e0a165f
commit
2edcee06cd
1 changed files with 1 additions and 10 deletions
|
|
@ -4,24 +4,15 @@ class PackagesController < ApplicationController
|
|||
|
||||
if params[:query]
|
||||
@packages = @packages.text_search(params[:query])
|
||||
#@packages = @packages.text_search(params[:search][:query])
|
||||
end
|
||||
|
||||
#if params[:with_screenshots]=='yes'
|
||||
# # Limit the packages to those that have approved screenshots.
|
||||
# # Also eager-load the screenshots.
|
||||
# @packages = @packages.where("screenshots.approved"=>true)
|
||||
@packages = @packages.where("screenshots.approved"=>true)
|
||||
#end
|
||||
|
||||
@packages = @packages.page(params[:page]).per(12)
|
||||
|
||||
#if params[:search][:display]=='list'
|
||||
#@view='list'
|
||||
#else
|
||||
#@view='grid'
|
||||
#end
|
||||
|
||||
#@view = (params[:display]=='list') ? 'list' : 'grid'
|
||||
end
|
||||
|
||||
def with_screenshots
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue