2016-07-03 13:46:49 +02:00
|
|
|
<div class='edit-sidebar'>
|
|
|
|
<form autocomplete='off'>
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostSafety) { %>
|
|
|
|
<section class='safety'>
|
|
|
|
<label>Safety</label>
|
|
|
|
<%= ctx.makeRadio({
|
|
|
|
name: 'safety',
|
|
|
|
class: 'safety-safe',
|
|
|
|
value: 'safe',
|
|
|
|
selectedValue: ctx.post.safety,
|
|
|
|
text: 'Safe'}) %>
|
|
|
|
<%= ctx.makeRadio({
|
|
|
|
name: 'safety',
|
|
|
|
class: 'safety-sketchy',
|
|
|
|
value: 'sketchy',
|
|
|
|
selectedValue: ctx.post.safety,
|
|
|
|
text: 'Sketchy'}) %>
|
|
|
|
<%= ctx.makeRadio({
|
|
|
|
name: 'safety',
|
|
|
|
value: 'unsafe',
|
|
|
|
selectedValue: ctx.post.safety,
|
|
|
|
class: 'safety-unsafe',
|
|
|
|
text: 'Unsafe'}) %>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 13:46:49 +02:00
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostRelations) { %>
|
|
|
|
<section class='relations'>
|
|
|
|
<%= ctx.makeTextInput({
|
|
|
|
text: 'Relations',
|
|
|
|
name: 'relations',
|
|
|
|
placeholder: 'space-separated post IDs',
|
|
|
|
pattern: '^[0-9 ]*$',
|
|
|
|
value: ctx.post.relations.map(rel => rel.id).join(' '),
|
|
|
|
}) %>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 13:46:49 +02:00
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostFlags && ctx.post.type === 'video') { %>
|
|
|
|
<section class='flags'>
|
|
|
|
<label>Miscellaneous</label>
|
|
|
|
<%= ctx.makeCheckbox({
|
|
|
|
text: 'Loop video',
|
|
|
|
name: 'loop',
|
|
|
|
checked: ctx.post.flags.includes('loop'),
|
|
|
|
}) %>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-26 20:36:14 +02:00
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostTags) { %>
|
|
|
|
<section class='tags'>
|
|
|
|
<%= ctx.makeTextInput({
|
|
|
|
value: ctx.post.tags.join(' '),
|
|
|
|
}) %>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 13:46:49 +02:00
|
|
|
|
2016-07-22 13:27:52 +02:00
|
|
|
<% if (ctx.canEditPostNotes) { %>
|
|
|
|
<section class='notes'>
|
|
|
|
<a class='add'>Add a note</a>
|
|
|
|
<%= ctx.makeTextarea({disabled: true, text: 'Content (supports Markdown)', rows: '8'}) %>
|
|
|
|
<a class='delete inactive'>Delete selected note</a>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostContent) { %>
|
|
|
|
<section class='post-content'>
|
|
|
|
<label>Content</label>
|
|
|
|
<div class='dropper-container'></div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-27 22:27:33 +02:00
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<% if (ctx.canEditPostThumbnail) { %>
|
|
|
|
<section class='post-thumbnail'>
|
|
|
|
<label>Thumbnail</label>
|
|
|
|
<div class='dropper-container'></div>
|
|
|
|
<a>Discard custom thumbnail</a>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-26 19:58:26 +02:00
|
|
|
|
2016-08-02 10:37:56 +02:00
|
|
|
<% if (ctx.canFeaturePosts) { %>
|
|
|
|
<section class='management'>
|
|
|
|
<ul>
|
|
|
|
<% if (ctx.canFeaturePosts) { %>
|
|
|
|
<li><a class='feature'>Feature this post on main page</a></li>
|
|
|
|
<% } %>
|
2016-08-02 11:05:40 +02:00
|
|
|
<% if (ctx.canDeletePosts) { %>
|
|
|
|
<li><a class='delete'>Delete this post</a></li>
|
|
|
|
<% } %>
|
2016-08-02 10:37:56 +02:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
|
2016-07-03 13:46:49 +02:00
|
|
|
<div class='messages'></div>
|
|
|
|
|
2016-08-01 20:07:49 +02:00
|
|
|
<input type='submit' value='Submit' class='submit'/>
|
2016-07-03 13:46:49 +02:00
|
|
|
</form>
|
|
|
|
</div>
|