aboutsummaryrefslogtreecommitdiff
path: root/templates/show_paste.html
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
committerB. Stack <bgstack15@gmail.com>2022-02-11 20:56:59 -0500
commit99f6fb15a5aaa326a729e73974006d1064a5582f (patch)
tree41795c1a447bb88c7521c286840c7d290c0afb8c /templates/show_paste.html
parentadd support for title, and ensure no js (diff)
downloadstackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.gz
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.tar.bz2
stackbin-99f6fb15a5aaa326a729e73974006d1064a5582f.zip
use UUID for paste id, and more js removal
Using uuids means that titles need to be used for displaying "replies," "in response to," and so on.
Diffstat (limited to 'templates/show_paste.html')
-rw-r--r--templates/show_paste.html21
1 files changed, 6 insertions, 15 deletions
diff --git a/templates/show_paste.html b/templates/show_paste.html
index 26273bf..03d57b1 100644
--- a/templates/show_paste.html
+++ b/templates/show_paste.html
@@ -9,7 +9,7 @@
<dd>{{ paste.user.display_name }}
{% endif %}
<dt>Date
- <dd>{{ paste.pub_date.strftime('%Y-%m-%d @ %H:%M') }}
+ <dd>{{ paste.pub_date.strftime('%Y-%m-%dT%H:%M:%SZ') }}
<dt>Actions
<dd>
{% if not paste.is_private %}
@@ -18,27 +18,18 @@
{%- if g.user and paste.user == g.user -%}
, <a href="{{ url_for('delete_paste', paste_id=paste.id) }}">Delete</a>
{% endif %}
- {% if paste.parent_id %}
+ {% if parent %}
<dt>In reply to
- <dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">#{{ paste.parent_id }}</a>
+ <dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">{{ parent.title }}</a>
{% endif %}
- {% if paste.children %}
+ {% if children %}
<dt>Replies
<dd>
- {% for child in paste.children -%}
+ {% for childid,childtitle in children -%}
{%- if not loop.first %},{% endif %}
- <a href="{{ url_for('show_paste', paste_id=child.id) }}">#{{ child.id }}</a>
+ <a href="{{ url_for('show_paste', paste_id=childid) }}">{{ childtitle }}</a>
{%- endfor %}
{% endif %}
</dl>
<div class=code><pre>{{ paste.code }}</pre></div>
- <link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.1.0/styles/default.min.css">
- <script src="//cdn.jsdelivr.net/highlight.js/9.1.0/highlight.min.js"></script>
- <script>
- $(document).ready(function() {
- $('pre').each(function(i, block) {
- hljs.highlightBlock(block);
- });
- });
- </script>
{% endblock %}
bgstack15