85 lines
3 KiB
Text
85 lines
3 KiB
Text
// Package list
|
|
//.small-4.columns
|
|
//.rating
|
|
// TODO: use actual rating
|
|
//.progress.radius
|
|
//span.meter style="width: #{rand(100)}%" Rating
|
|
|
|
.row.packagepage
|
|
.small-12.columns
|
|
h1 =@package.name
|
|
|
|
.small-7.medium-7.columns
|
|
p.subtitle = @package.description
|
|
|
|
ul.small-block-grid-1.medium-block-grid-2.large-block-grid-2
|
|
- @package.screenshots.each do |screenshot|
|
|
li
|
|
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)
|
|
.imgcaption =screenshot.caption
|
|
// TODO: Enable button only if admin or uploader
|
|
a.button.tiny.alert[
|
|
href=delete_screenshot_path(@package.name, screenshot.id)
|
|
onclick="return confirm('Really delete the screenshot?');"
|
|
] Delete screenshot
|
|
|
|
// Upload image
|
|
li
|
|
= form_for :screenshot, url: upload_image_path, html: { multipart: true } do |f|
|
|
= image_tag("/images/dummy/upload.svg", style: "width: 100%", id: 'upload-image')
|
|
= f.file_field :image, id: 'fileupload', multiple: true, style: 'display: none'
|
|
|
|
// TODO: Enable comments in a later version
|
|
// = partial '/package/comments'
|
|
|
|
.small-5.medium-5.columns
|
|
.bigpanel
|
|
// Use action long description
|
|
// TODO: Use actual description instead of placeholder text
|
|
p
|
|
' Mail client suitable for free distribution. It supports different mail
|
|
' accounts (POP, IMAP, Gmail), has an integrated learning Spam filter, and
|
|
' offers easy organization of mails with tagging and virtual folders. Also,
|
|
' more features can be added by installing extensions.
|
|
|
|
p
|
|
' The goal of Icedove is to produce a cross platform standalone mail
|
|
' application using the XUL user interface language.
|
|
|
|
//a.button.radius.expand href=upload_package_by_name_path(name: @package.name) Upload a new screenshot
|
|
|
|
//javascript:
|
|
// $(function () {
|
|
// $('#fileupload').fileupload({
|
|
// dataType: 'json',
|
|
// done: function (e, data) {
|
|
// $.each(data.result.files, function (index, file) {
|
|
// $('<p/>').text(file.name).appendTo(document.body);
|
|
// });
|
|
// }
|
|
// });
|
|
// });
|
|
|
|
// TODO: Enable comment form
|
|
//javascript:
|
|
// $('#comment-summary').on( 'input', function() {
|
|
// //$('#comment-content,#comment-author').fadeIn();
|
|
// $('form.comment > *').fadeIn();
|
|
// });
|
|
|
|
javascript:
|
|
$(function () {
|
|
// If the image button is clicked then imitate a click on the file
|
|
// select button that is hidden.
|
|
$("#upload-image").click( function () {
|
|
$("#fileupload").click();
|
|
});
|
|
|
|
// Files have been selected. Tell the user what's going on and
|
|
// submit the upload form.
|
|
$('#fileupload').change( function () {
|
|
$('#upload-image').attr('src', '/images/dummy/please-wait.svg');
|
|
$('form').submit();
|
|
});
|
|
});
|