debshots/app/views/packages/upload.slim

77 lines
2.9 KiB
Text

= render 'receive_upload'
h1 = "Upload screenshots for #{@package.name}"
.grid-x
.small-7.cell
p.subtitle = @package.description
p
' You are about to upload a screenshot for the #{@package.name}
' package. Thanks for your contribution.
= form_for :screenshot, url: upload_receive_path, html: { multipart: true, id: 'file-form' } do |f|
.grid-x
.small-6.cell
input.hidden-inputfile type="file" name="file[]" id="file" multiple=true
label for="file"
a.button id="file-select-button"
= fa_stacked_icon "image", base: "circle-thin"
span id="file-label"
' Select screenshot file(s)
.small-6.cell
button.button type="submit" id="file-submit"
= fa_stacked_icon "upload", base: "circle-thin"
' Start upload
p
- if @package.screenshots.any?
' Just for your information - these screenshots have already been uploaded.
.small-up-1.medium-up-3.large-up-4.grid-thumbnails
- @package.screenshots.all.each do |ss|
.column
a.black.fancybox href=rails_representation_url(ss.image.variant(resize_to_limit: "800x600")) rel='fancybox-thumb' title=ss.caption
= image_tag(ss.image.variant(resize_to_limit: "160x120"), 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.
.small-5.cell.bigpanel
p.subtitle Your upload…
ul
li
' should contain a typical scene when working with it.
li
' should show the actual application and not just
' your whole desktop (unless the screenshot is meant for a window manager).
li
' must be in PNG format.
li
' can be multiple images at once.
li
' needs to be approved by the moderators first before it is publicly visible.
li
' will be reduced if it is lager than 800x600 pixels.
' So don't try to capture too much detail in a screenshot. It may become
' unreadable. Shrink the application's window if possible.
li
' will be made public and can freely be used by anyone.
li
' can be taken by screenshot tools like shutter, ksnapshot (KDE),
' gimp, xwd or scrot. See the
a href='http://wiki.debian.org/ScreenShots' Debian wiki
' for more information on how to make screenshots under Debian.
li
' should preferably show the application in english.
' If you don't use english by default please start your application
' from a shell using after setting "export LANG=C".
javascript:
// Hide the submit button unless images are selected for upload
$(document).ready(upload_form_init);
// TODO: Move into javascripts/packages/upload...