summaryrefslogtreecommitdiff
path: root/client/html
diff options
context:
space:
mode:
authorraku-cat <raku@raku.party>2018-12-27 03:22:36 -0600
committerShyam Sunder <sgsunder1@gmail.com>2019-02-08 16:43:38 -0500
commit3e6b98df92a9e723a7d1b33e28b7d6b057981783 (patch)
tree32895b3c98d4556d8c4168bb1e40f0d92b883e2c /client/html
parent2fdd8cb3ab4f45796a4e9dd858caaaf215d19ef3 (diff)
client: Reimplement post source functionality
Diffstat (limited to 'client/html')
-rw-r--r--client/html/post_edit_sidebar.tpl10
-rw-r--r--client/html/post_readonly_sidebar.tpl8
2 files changed, 18 insertions, 0 deletions
diff --git a/client/html/post_edit_sidebar.tpl b/client/html/post_edit_sidebar.tpl
index a66a375..78e90aa 100644
--- a/client/html/post_edit_sidebar.tpl
+++ b/client/html/post_edit_sidebar.tpl
@@ -58,6 +58,16 @@
</section>
<% } %>
+ <% if (ctx.canEditPostSource) { %>
+ <section class='post-source'>
+ <%= ctx.makeTextInput({
+ text: 'Source',
+ name: 'source',
+ value: ctx.post.source,
+ }) %>
+ </section>
+ <% } %>
+
<% if (ctx.canEditPostTags) { %>
<section class='tags'>
<%= ctx.makeTextInput({}) %>
diff --git a/client/html/post_readonly_sidebar.tpl b/client/html/post_readonly_sidebar.tpl
index 401ce20..78e92fb 100644
--- a/client/html/post_readonly_sidebar.tpl
+++ b/client/html/post_readonly_sidebar.tpl
@@ -38,6 +38,14 @@
<a href class='fit-both'>both</a>
</section>
+ <% if (ctx.post.source) { %>
+ <section class='source'>
+ Source: <a href='<%- ctx.post.source %>' title='<%- ctx.post.source %>'>
+ <%- ctx.post.prettyPrintSource() %>
+ </a>
+ </section>
+ <% } %>
+
<section class='search'>
Search on
<a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> &middot;