2017-01-06 14:05:54 +01:00
|
|
|
<li class='uploadable-container'>
|
2016-09-10 16:13:57 +02:00
|
|
|
<div class='thumbnail-wrapper'>
|
2016-08-20 22:40:25 +02:00
|
|
|
<% if (['image'].includes(ctx.uploadable.type)) { %>
|
|
|
|
|
2016-09-10 16:13:57 +02:00
|
|
|
<a href='<%= ctx.uploadable.previewUrl %>'>
|
|
|
|
<%= ctx.makeThumbnail(ctx.uploadable.previewUrl) %>
|
|
|
|
</a>
|
2016-08-24 13:29:29 +02:00
|
|
|
|
|
|
|
<% } else if (['video'].includes(ctx.uploadable.type)) { %>
|
|
|
|
|
|
|
|
<div class='thumbnail'>
|
2016-09-10 16:13:57 +02:00
|
|
|
<a href='<%= ctx.uploadable.previewUrl %>'>
|
|
|
|
<video id='video' nocontrols muted>
|
|
|
|
<source type='<%- ctx.uploadable.mimeType %>' src='<%- ctx.uploadable.previewUrl %>'/>
|
|
|
|
</video>
|
|
|
|
</a>
|
2016-08-24 13:29:29 +02:00
|
|
|
</div>
|
2016-08-20 22:40:25 +02:00
|
|
|
|
|
|
|
<% } else { %>
|
|
|
|
|
|
|
|
<%= ctx.makeThumbnail(null) %>
|
|
|
|
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
|
2017-01-06 14:05:54 +01:00
|
|
|
<div class='uploadable'>
|
|
|
|
<header>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
<li><a href class='move-up'><i class='fa fa-chevron-up'></i></a></li>
|
|
|
|
<li><a href class='move-down'><i class='fa fa-chevron-down'></i></a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
<li><a href class='remove'><i class='fa fa-remove'></i></a></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2016-08-20 22:40:25 +02:00
|
|
|
|
2017-01-06 14:05:54 +01:00
|
|
|
<span class='filename'><%= ctx.uploadable.name %></span>
|
|
|
|
</header>
|
2016-08-20 22:40:25 +02:00
|
|
|
|
2017-01-06 14:05:54 +01:00
|
|
|
<div class='body'>
|
|
|
|
<div class='safety'>
|
|
|
|
<% for (let safety of ['safe', 'sketchy', 'unsafe']) { %>
|
|
|
|
<%= ctx.makeRadio({
|
|
|
|
name: 'safety-' + ctx.uploadable.key,
|
|
|
|
value: safety,
|
|
|
|
text: safety[0].toUpperCase() + safety.substr(1),
|
|
|
|
selectedValue: ctx.uploadable.safety,
|
|
|
|
}) %>
|
|
|
|
<% } %>
|
2016-11-11 22:35:58 +01:00
|
|
|
</div>
|
|
|
|
|
2017-01-06 14:05:54 +01:00
|
|
|
<div class='options'>
|
|
|
|
<% if (ctx.canUploadAnonymously) { %>
|
|
|
|
<div class='anonymous'>
|
|
|
|
<%= ctx.makeCheckbox({
|
|
|
|
text: 'Upload anonymously',
|
|
|
|
name: 'anonymous',
|
|
|
|
checked: ctx.uploadable.anonymous,
|
|
|
|
}) %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if (['video'].includes(ctx.uploadable.type)) { %>
|
|
|
|
<div class='loop-video'>
|
|
|
|
<%= ctx.makeCheckbox({
|
|
|
|
text: 'Loop video',
|
|
|
|
name: 'loop-video',
|
|
|
|
checked: ctx.uploadable.flags.includes('loop'),
|
|
|
|
}) %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
2016-11-11 22:35:58 +01:00
|
|
|
</div>
|
2017-01-06 14:05:54 +01:00
|
|
|
|
|
|
|
<div class='messages'></div>
|
|
|
|
</div>
|
2016-11-11 22:35:58 +01:00
|
|
|
</div>
|
2016-08-20 22:40:25 +02:00
|
|
|
</li>
|