Cruft
This commit is contained in:
parent
9bd01ff30b
commit
aaf22a34fb
1 changed files with 0 additions and 5 deletions
|
|
@ -16,17 +16,12 @@ class PackagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def details
|
def details
|
||||||
# TODO: Get only screenshots visible to the user (admin or owner or approved)
|
|
||||||
@package = Package.find_by(name: params[:name])
|
@package = Package.find_by(name: params[:name])
|
||||||
|
|
||||||
if @package.nil?
|
if @package.nil?
|
||||||
@packagename = params[:name]
|
@packagename = params[:name]
|
||||||
render 'notfound', status: 404
|
render 'notfound', status: 404
|
||||||
else
|
else
|
||||||
|
|
||||||
# The first page of screenshots (if there are multiple at all) shows the
|
|
||||||
# first image twice as large. So the first page contains 5 images while
|
|
||||||
# the second and further page contain 6 images.
|
|
||||||
@page = params[:page]
|
@page = params[:page]
|
||||||
@screenshots = screenshots_visible_to_user(@package).paginate(page: @page, per_page: 6)
|
@screenshots = screenshots_visible_to_user(@package).paginate(page: @page, per_page: 6)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue