diff options
| author | rr- <rr-@sakuya.pl> | 2016-08-01 20:07:49 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2016-08-02 12:27:01 +0200 |
| commit | 51ea06d8378936acbc0dacff22cc2bfb161c2a56 (patch) | |
| tree | adc8afa856af634ea83b71ca3f8d5fe214d43a75 /client/html/post_edit_sidebar.tpl | |
| parent | b9f2db1c634e6489d9537316359c97a680433f38 (diff) | |
client/posts: add expanders to edit sidebar
Diffstat (limited to 'client/html/post_edit_sidebar.tpl')
| -rw-r--r-- | client/html/post_edit_sidebar.tpl | 139 |
1 files changed, 65 insertions, 74 deletions
diff --git a/client/html/post_edit_sidebar.tpl b/client/html/post_edit_sidebar.tpl index b19896e..83744d8 100644 --- a/client/html/post_edit_sidebar.tpl +++ b/client/html/post_edit_sidebar.tpl @@ -1,86 +1,77 @@ <div class='edit-sidebar'> <form autocomplete='off'> - <div class='input'> - <% 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> - <% } %> + <% 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> + <% } %> - <% 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> - <% } %> + <% 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> + <% } %> - <% if (ctx.canEditPostTags) { %> - <section class='tags'> - <%= ctx.makeTextInput({ - text: 'Tags', - value: ctx.post.tags.join(' '), - }) %> - </section> - <% } %> + <% 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> + <% } %> - <% if (ctx.canEditPostFlags && ctx.post.type === 'video') { %> - <section class='flags'> - <label>Miscellaneous</label> + <% if (ctx.canEditPostTags) { %> + <section class='tags'> + <%= ctx.makeTextInput({ + value: ctx.post.tags.join(' '), + }) %> + </section> + <% } %> - <%= ctx.makeCheckbox({ - text: 'Loop video', - name: 'loop', - checked: ctx.post.flags.includes('loop'), - }) %> - </section> - <% } %> + <% if (ctx.canEditPostContent) { %> + <section class='post-content'> + <label>Content</label> + <div class='dropper-container'></div> + </section> + <% } %> - <% if (ctx.canEditPostContent) { %> - <section class='post-content'> - <label>Content</label> - - <div class='dropper-container'></div> - </section> - <% } %> - - <% if (ctx.canEditPostThumbnail) { %> - <section class='post-thumbnail'> - <label>Thumbnail</label> - - <div class='dropper-container'></div> - - <a>Discard custom thumbnail</a> - </section> - <% } %> - </div> + <% if (ctx.canEditPostThumbnail) { %> + <section class='post-thumbnail'> + <label>Thumbnail</label> + <div class='dropper-container'></div> + <a>Discard custom thumbnail</a> + </section> + <% } %> <div class='messages'></div> - <div class='buttons'> - <input class='encourage' type='submit' value='Submit' class='submit'/> - </div> + <input type='submit' value='Submit' class='submit'/> </form> </div> |