/ If images were just uploaded then show upload success/errors / in a callout. = render 'receive_upload' .packagepage h1 = @package.name h2 = @package.description .grid-x.grid-margin-x .small-7.medium-7.cell / Left column contains images - if screenshots_visible_to_user(@package).count > 0 .grid-x.grid-margin-y.grid-margin-x.align-middle - screenshots_visible_to_user(@package).each_with_index do |screenshot, idx| / Display the first screenshot as a large image - if idx==0 .small-12.medium-12.cell .margin-bottom-3 / TODO: de-duplicate a href =url_for(screenshot.large_image_watermarked) rel='fancybox-thumb' title=screenshot.caption data-fancybox='gallery' data-caption=screenshot_caption(screenshot) .image-with-zoom-icon = image_tag(url_for(screenshot.medium_image), alt: screenshot.caption, class: 'thumbnail') .magnifying-glass-icon i.fa.fa-search /.imgcaption =screenshot_caption(screenshot) .imgcaption = screenshot.description / Display further screenshots as smaller images - else .small-12.medium-6.cell .margin-bottom-3 a href =url_for(screenshot.large_image_watermarked) rel='fancybox-thumb' title=screenshot.caption data-fancybox='gallery' data-caption=screenshot_caption(screenshot) .image-with-zoom-icon = image_tag(url_for(screenshot.medium_image), alt: screenshot.caption, class: 'thumbnail') .magnifying-glass-icon i.fa.fa-search /.imgcaption =screenshot_caption(screenshot) .imgcaption = screenshot.description // Has the unmoderated screenshot been uploaded by the current user? - if screenshot_uploaded_by_current_user?(screenshot) span.label.warning | Uploaded by you - unless screenshot.approved | (but not public yet) - if user_signed_in? and current_user.is_admin? .imgcaption span.label.secondary #{screenshot.adminstatus} // Show detailed information about the screenshot object when in dev mode / - if Rails.env == 'development' / p / tt / = screenshot.inspect // Is the user an admin? // TODO: fix dropdowns – do not enforce javascript / - if user_signed_in? and current_user.is_admin? / = render(partial: 'admin_dropdown', locals: {screenshot: screenshot}) // or does the screenshot belong to the user (determined by session cookie) / - elsif user_signed_in? and screenshot.user == current_user / = render(partial: 'user_dropdown', locals: {screenshot: screenshot}) // or is the user not related to the screenshot and the screenshot is public? // TODO: Move to a seperate page with a form //- elsif screenshot.approved // = render(partial: 'report_dropdown', locals: {screenshot: screenshot}) - else /.listview img src='/images/dummy/no-screenshots-available.svg' width='100%' style='padding: 0 10%' #metadata.small-5.medium-5.cell / Right column contains metadata about the package. / #metadata is the anchor for this sticky container. = render(partial: 'details_rightbox', locals: {pkg: @package})