2016-07-03 11:46:49 +00:00
|
|
|
<div class='edit-sidebar'>
|
|
|
|
<form autocomplete='off'>
|
2016-09-10 07:57:20 +00:00
|
|
|
<input type='submit' value='Save' class='submit'/>
|
|
|
|
|
|
|
|
<div class='messages'></div>
|
|
|
|
|
2017-03-30 18:50:12 +00:00
|
|
|
<% if (ctx.enableSafety && ctx.canEditPostSafety) { %>
|
2016-08-01 18:07:49 +00:00
|
|
|
<section class='safety'>
|
|
|
|
<label>Safety</label>
|
2016-10-22 10:28:09 +00:00
|
|
|
<div class='radio-wrapper'>
|
|
|
|
<%= 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'}) %>
|
|
|
|
</div>
|
2016-08-01 18:07:49 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 11:46:49 +00:00
|
|
|
|
2016-08-01 18:07:49 +00: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 11:46:49 +00:00
|
|
|
|
2016-08-01 18:07:49 +00: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'),
|
|
|
|
}) %>
|
2018-09-13 19:48:13 +00:00
|
|
|
<%= ctx.makeCheckbox({
|
|
|
|
text: 'Sound',
|
|
|
|
name: 'sound',
|
|
|
|
checked: ctx.post.flags.includes('sound'),
|
|
|
|
}) %>
|
2018-12-27 09:22:36 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if (ctx.canEditPostSource) { %>
|
|
|
|
<section class='post-source'>
|
2020-01-26 22:49:04 +00:00
|
|
|
<%= ctx.makeTextarea({
|
2018-12-27 09:22:36 +00:00
|
|
|
text: 'Source',
|
|
|
|
value: ctx.post.source,
|
|
|
|
}) %>
|
2016-08-01 18:07:49 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-26 18:36:14 +00:00
|
|
|
|
2016-08-01 18:07:49 +00:00
|
|
|
<% if (ctx.canEditPostTags) { %>
|
|
|
|
<section class='tags'>
|
2017-10-01 19:46:53 +00:00
|
|
|
<%= ctx.makeTextInput({}) %>
|
2016-08-01 18:07:49 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 11:46:49 +00:00
|
|
|
|
2016-07-22 11:27:52 +00:00
|
|
|
<% if (ctx.canEditPostNotes) { %>
|
|
|
|
<section class='notes'>
|
2016-08-21 23:25:10 +00:00
|
|
|
<a href class='add'>Add a note</a>
|
2016-07-22 11:27:52 +00:00
|
|
|
<%= ctx.makeTextarea({disabled: true, text: 'Content (supports Markdown)', rows: '8'}) %>
|
2016-08-21 23:25:10 +00:00
|
|
|
<a href class='delete inactive'>Delete selected note</a>
|
2017-08-25 21:53:51 +00:00
|
|
|
<% if (ctx.hasClipboard) { %>
|
|
|
|
<br/>
|
|
|
|
<a href class='copy'>Export notes to clipboard</a>
|
|
|
|
<br/>
|
|
|
|
<a href class='paste'>Import notes from clipboard</a>
|
|
|
|
<% } %>
|
2016-07-22 11:27:52 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
|
|
|
|
2016-08-01 18:07:49 +00:00
|
|
|
<% if (ctx.canEditPostContent) { %>
|
|
|
|
<section class='post-content'>
|
|
|
|
<label>Content</label>
|
|
|
|
<div class='dropper-container'></div>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-27 20:27:33 +00:00
|
|
|
|
2016-08-01 18:07:49 +00:00
|
|
|
<% if (ctx.canEditPostThumbnail) { %>
|
|
|
|
<section class='post-thumbnail'>
|
|
|
|
<label>Thumbnail</label>
|
|
|
|
<div class='dropper-container'></div>
|
2016-08-21 23:25:10 +00:00
|
|
|
<a href>Discard custom thumbnail</a>
|
2016-08-01 18:07:49 +00:00
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-26 17:58:26 +00:00
|
|
|
|
2016-10-22 08:03:38 +00:00
|
|
|
<% if (ctx.canFeaturePosts || ctx.canDeletePosts || ctx.canMergePosts) { %>
|
2016-08-02 08:37:56 +00:00
|
|
|
<section class='management'>
|
|
|
|
<ul>
|
|
|
|
<% if (ctx.canFeaturePosts) { %>
|
2016-08-21 23:25:10 +00:00
|
|
|
<li><a href class='feature'>Feature this post on main page</a></li>
|
2016-08-02 08:37:56 +00:00
|
|
|
<% } %>
|
2016-10-22 08:03:38 +00:00
|
|
|
<% if (ctx.canMergePosts) { %>
|
|
|
|
<li><a href class='merge'>Merge this post with another</a></li>
|
|
|
|
<% } %>
|
2016-08-02 09:05:40 +00:00
|
|
|
<% if (ctx.canDeletePosts) { %>
|
2016-08-21 23:25:10 +00:00
|
|
|
<li><a href class='delete'>Delete this post</a></li>
|
2016-08-02 09:05:40 +00:00
|
|
|
<% } %>
|
2016-08-02 08:37:56 +00:00
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<% } %>
|
2016-07-03 11:46:49 +00:00
|
|
|
</form>
|
|
|
|
</div>
|