debshots/app/views/packages/_receive_upload.slim

25 lines
850 B
Text

/ Render this callout on top of the package's details page
/ if images have just been uploaded.
// Make variables accessible by the JS that handles uploads
#data-js-upload-form data-upload-url=upload_receive_json_path
- if (@valid_images and @valid_images.any?) or (@invalid_images and @invalid_images.any?)
.callout.warning
- if @invalid_images.any?
= fa_icon 'exclamation-circle 2x pull-left'
p These images were not accepted:
ul
- @invalid_images.each do |image|
li
' #{image.image_file_name} (#{image.errors[:image].join(' and the image ')})
- if @valid_images.any?
= fa_icon 'check-circle 2x pull-left'
p
' #{pluralize(@valid_images.length, 'screenshot')} received successfully.
' Please review the images and add a description for each image. Thanks.