/ = link_to 'Back', :back, class: 'button small' .row.packagepage .small-12.columns h1 =@package.name .row.packagepage .small-7.medium-7.columns.packagepage p.subtitle = @package.description - if screenshots_visible_to_user(@package).count > 0 - screenshots_visible_to_user(@package).each do |screenshot| .row.listview .text-center 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) - if screenshot.description .imgcaption =screenshot.description - if screenshot.version.present? .imgcaption em from version #{screenshot.version} - if user_signed_in? .imgcaption em Admin status: #{screenshot.adminstatus} // Is the user an admin? - if user_signed_in? = 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 .row.listview img src='/images/dummy/no-screenshots-available.svg' width='100%' style='padding: 0 10%' // Load reviews from the Ubuntu API through our own (cached) URL. // Use asynchronous load to keep loading times low if the review // was not yet cached. #reviews data-package-reviews-url=package_reviews_path(@package.name) #details.small-5.medium-5.columns data-sticky-container=true = render(partial: 'details_rightbox', locals: {pkg: @package}) javascript: $( function() { load_reviews() })