Right details box is now properly stuck to the top

This commit is contained in:
Christoph Haas 2017-04-19 21:45:17 +02:00
parent 527bc7cd07
commit 5945b71194

View file

@ -5,47 +5,47 @@
h1 =@package.name h1 =@package.name
.row.packagepage .row.packagepage
.small-7.medium-7.columns.packagepage #details.small-7.medium-7.columns.packagepage
p.subtitle = @package.description p.subtitle = @package.description
- if screenshots_visible_to_user(@package).count > 0 - if screenshots_visible_to_user(@package).count > 0
- screenshots_visible_to_user(@package).each do |screenshot| - screenshots_visible_to_user(@package).each do |screenshot|
.row.listview .row.listview
.text-center .text-center
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption) = image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
- if screenshot.description - if screenshot.description
.imgcaption =screenshot.description .imgcaption =screenshot.description
- if screenshot.version.present? - if screenshot.version.present?
.imgcaption .imgcaption
em from version #{screenshot.version} em from version #{screenshot.version}
- if user_signed_in?
.imgcaption
em Admin status: #{screenshot.adminstatus}
// Is the user an admin?
- if user_signed_in? - if user_signed_in?
= render(partial: 'admin_dropdown', locals: {screenshot: screenshot}) .imgcaption
// or does the screenshot belong to the user (determined by session cookie) em Admin status: #{screenshot.adminstatus}
- elsif screenshot.uploaderhash == session[:token]
/ = render(partial: 'user_dropdown', locals: {screenshot: screenshot})
/ Ask the user to add a description if not yet done
- if screenshot.description.blank?
.imgcaption
p Please add a brief description of this screenshot:
= form_tag(update_screenshot_description_path(screenshot.package.name, screenshot.id))
.input-group
= text_field_tag 'description', nil, class: 'input-group-field', maxlength: 80
.input-group-button
=submit_tag 'Save', class: 'button success'
/ Offer to delete the screenshot
a.button.small.alert[
href=delete_screenshot_path(screenshot.id)
onclick="return confirm('Really delete your screenshot again?');"
] Delete your screenshot
// or is the user not related to the screenshot and the screenshot is public? // Is the user an admin?
- elsif screenshot.approved - if user_signed_in?
= render(partial: 'report_dropdown', locals: {screenshot: screenshot}) = render(partial: 'admin_dropdown', locals: {screenshot: screenshot})
// or does the screenshot belong to the user (determined by session cookie)
- elsif screenshot.uploaderhash == session[:token]
/ = render(partial: 'user_dropdown', locals: {screenshot: screenshot})
/ Ask the user to add a description if not yet done
- if screenshot.description.blank?
.imgcaption
p Please add a brief description of this screenshot:
= form_tag(update_screenshot_description_path(screenshot.package.name, screenshot.id))
.input-group
= text_field_tag 'description', nil, class: 'input-group-field', maxlength: 80
.input-group-button
=submit_tag 'Save', class: 'button success'
/ Offer to delete the screenshot
a.button.small.alert[
href=delete_screenshot_path(screenshot.id)
onclick="return confirm('Really delete your screenshot again?');"
] Delete your screenshot
// or is the user not related to the screenshot and the screenshot is public?
- elsif screenshot.approved
= render(partial: 'report_dropdown', locals: {screenshot: screenshot})
- else - else
.row.listview .row.listview
@ -56,7 +56,7 @@
// was not yet cached. // was not yet cached.
#reviews data-package-reviews-url=package_reviews_path(@package.name) #reviews data-package-reviews-url=package_reviews_path(@package.name)
#details.small-5.medium-5.columns data-sticky-container=true .small-5.medium-5.columns data-sticky-container=true
= render(partial: 'details_rightbox', locals: {pkg: @package}) = render(partial: 'details_rightbox', locals: {pkg: @package})
javascript: javascript: