szurubooru/src/Views/post-upload.phtml

112 lines
3.5 KiB
PHTML
Raw Normal View History

<?php
2014-02-27 15:04:36 +01:00
CustomAssetViewDecorator::setSubTitle('upload');
CustomAssetViewDecorator::addStylesheet('post-upload.css');
CustomAssetViewDecorator::addScript('post-upload.js');
CustomAssetViewDecorator::addStylesheet('../lib/tagit/jquery.tagit.css');
CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
?>
2013-11-16 18:40:26 +01:00
<div id="sidebar">
<div class="unit">
<h1>file upload</h1>
<p>Use tags to describe uploaded images. Try to specify characters, their look and shows they are from.</p>
<p>Set proper visibility setting if the image isn&rsquo;t safe for work or you&rsquo;re not sure it&rsquo;s 100% <span class="safety-safe">safe</span>.</p>
<p>Only registered users can view <span class="safety-sketchy">sketchy</span> or <span class="safety-unsafe">NSFW</span> content.</p>
<p>Click submit when you&rsquo;re done.</p>
2013-10-07 00:44:17 +02:00
</div>
2013-11-16 18:40:26 +01:00
</div>
<div id="inner-content">
<div id="upload-step1">
2014-02-16 15:08:54 +01:00
<div id="file-handler-wrapper">
2013-11-16 18:40:26 +01:00
<input type=file multiple style="display: none"/>
2014-02-16 15:08:54 +01:00
<div id="file-handler">
Drop files here!<br>
Or just click on this box.
2013-10-25 09:40:33 +02:00
</div>
2013-11-16 18:40:26 +01:00
</div>
2013-10-25 09:40:33 +02:00
2014-02-16 15:08:54 +01:00
<div id="url-handler-wrapper">
<div id="url-handler">
<div class="input-wrapper"><input placeholder="Alternatively, paste an URL here." name="url"/></div>
<button class="submit" type="submit">Add URL</button>
2013-10-07 00:44:17 +02:00
</div>
</div>
2013-11-16 18:40:26 +01:00
<div class="clear"></div>
</div>
2013-11-16 18:40:26 +01:00
<div id="upload-step2" data-redirect-url="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>">
<hr>
2013-10-07 00:44:17 +02:00
2013-11-16 18:40:26 +01:00
<div class="posts">
2013-10-07 00:44:17 +02:00
</div>
2013-11-16 18:40:26 +01:00
<div class="submit-wrapper">
<button id="the-submit" class="submit" type="submit">Submit</button>
2013-11-16 18:40:26 +01:00
</div>
</div>
<div id="post-template" class="post">
<p class="alert alert-error">Some kind of error</p>
2013-10-07 00:44:17 +02:00
2013-11-16 18:40:26 +01:00
<img class="thumbnail" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
2013-11-16 18:40:26 +01:00
<div class="form-wrapper">
<div class="ops">
<a class="move-up-trigger">
move up <span>&uarr;</span>
</a>
2013-10-19 16:16:09 +02:00
2013-11-16 18:40:26 +01:00
<a class="move-down-trigger">
move down <span>&darr;</span>
</a>
2013-10-19 16:16:09 +02:00
2013-11-16 18:40:26 +01:00
<a class="remove-trigger">
remove <span>&times;</span>
</a>
</div>
2014-02-16 16:03:13 +01:00
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
<div class="form-row file-name">
<label>File:</label>
2013-11-16 18:40:26 +01:00
<strong>filename.jpg</strong>
2013-10-19 16:16:09 +02:00
</div>
2013-10-07 00:44:17 +02:00
2014-02-16 16:03:13 +01:00
<div class="form-row safety">
<label>Safety:</label>
<div class="input-wrapper">
<?php $checked = false ?>
<?php foreach (PostSafety::getAll() as $safety): ?>
<label>
<input type="radio" name="safety" value="<?php echo $safety ?>"<?php if (!$checked) echo ' checked="checked"' ?>/>
<?php echo TextHelper::camelCaseToHumanCase(PostSafety::toString($safety), true) ?>
<?php $checked = true ?>
</label>
<?php endforeach ?>
<input type="hidden" name="anonymous" value="0"/>
<label>
2014-02-16 16:03:13 +01:00
<input type="checkbox" name="anonymous" value="1"/>
Upload anonymously
</label>
2014-02-16 16:03:13 +01:00
</div>
2013-11-16 18:40:26 +01:00
</div>
2013-10-07 00:44:17 +02:00
2014-02-16 16:03:13 +01:00
<div class="form-row tags">
<label>Tags:</label>
2013-11-16 18:40:26 +01:00
<div class="input-wrapper"><input type="text" name="tags" placeholder="enter some tags&hellip;"/></div>
</div>
2014-02-16 16:03:13 +01:00
<div class="form-row source">
<label>Source:</label>
2013-11-16 18:40:26 +01:00
<div class="input-wrapper"><input type="text" name="source" placeholder="where did you get this from? (optional)"/></div>
</div>
2013-10-21 23:50:30 +02:00
2013-11-16 18:40:26 +01:00
<input type="hidden" name="submit" value="1"/>
</form>
2013-10-09 00:58:49 +02:00
</div>
2013-10-07 00:44:17 +02:00
</div>
2013-11-16 18:40:26 +01:00
</div>
2014-02-20 21:26:46 +01:00
<img id="lightbox" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Preview"/>