New upload review process partly finished

This commit is contained in:
Christoph Haas 2017-01-18 21:30:14 +01:00
parent 821364483e
commit 34d7eb649c
5 changed files with 70 additions and 24 deletions

View file

@ -8,7 +8,7 @@
' You are about to upload a screenshot for the #{@package.name}
' package. Thanks for your contribution.
= form_for :screenshot, url: upload_image_path, html: { multipart: true, id: 'file-form' } do |f|
= form_for :screenshot, url: upload_review_path, html: { multipart: true, id: 'file-form' } do |f|
.row
.small-6.columns
@ -30,16 +30,15 @@
.small-up-1.medium-up-3.large-up-4.grid-thumbnails
- @package.screenshots.all.each do |ss|
a.black.fancybox href=ss.image.url(:large, timestamp: false) rel='fancybox-thumb' title=ss.caption
= image_tag(ss.image.url(:thumb, timestamp: false), alt: ss.caption, class: 'thumbnail')
.column
a.black.fancybox href=ss.image.url(:large, timestamp: false) rel='fancybox-thumb' title=ss.caption
= image_tag(ss.image.url(:thumb, timestamp: false), alt: ss.caption, class: 'thumbnail')
// = render partial: 'packages/grid_thumbnail', locals: { pkg: pkg }
//- else
// ' There are no screenshots yet for #{@package.name}. Your upload will
// ' be the first.
// >>>>>>> 652c2d4126c628403bb8223ffd5f6fb633da95de
.small-5.columns.bigpanel

View file

@ -0,0 +1,50 @@
.row
h1 Your uploaded images
.row
p
' Thanks for your upload. Please check the images and add
' short one-line descriptions that describe each of the images.
- if @invalid_images.any?
.callout.warning
p
' However the following screenshots were not accepted:
ul
- @invalid_images.each do |image|
li
' #{image.image_file_name} (#{image.errors[:image].join(' and ')})
- if @valid_images.any?
= form_for :screenshot, url: upload_review2_path do |f|
- @valid_images.each do |screenshot|
.row
.small-4.columns
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) title='Uploaded image'
= image_tag(screenshot.image.url(:large, timestamp: false), alt: 'Uploaded image')
.small-8.columns
em Your file name:
p
= screenshot.image_file_name
em Description:
p
= text_field_tag "description-#{screenshot.id}"
em Delete this image?
p
= check_box "delete-#{screenshot.id}", "Delete this image"
.row
button.button type="submit" id="file-submit"
= fa_stacked_icon "check", base: "circle-thin"
' Proceed
- else
.row
a.button href=upload_path Back to upload form