aboutsummaryrefslogtreecommitdiff
path: root/templates/show_paste.html
blob: 03d57b1c59d7315c21fcfb64c2b7fb2d411da2ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% extends "layout.html" %}
{% block title %}{{ paste.title }}{% endblock %}
{% block body %}
  {# <h2>Paste #{{ paste.id }}</h2> #}
  <h2>{{ paste.title }}</h2>
  <dl>
    {% if paste.user %}
    <dt>Author
    <dd>{{ paste.user.display_name }}
    {% endif %}
    <dt>Date
    <dd>{{ paste.pub_date.strftime('%Y-%m-%dT%H:%M:%SZ') }}
    <dt>Actions
    <dd>
      {% if not paste.is_private %}
        <a href="{{ url_for('new_paste', reply_to=paste.id) }}">Reply</a>
      {% endif %}
      {%- if g.user and paste.user == g.user -%}
      , <a href="{{ url_for('delete_paste', paste_id=paste.id) }}">Delete</a>
      {% endif %}
    {% if parent %}
    <dt>In reply to
    <dd><a href="{{ url_for('show_paste', paste_id=paste.parent_id) }}">{{ parent.title }}</a>
    {% endif %}
    {% if children %}
    <dt>Replies
    <dd>
      {% for childid,childtitle in children -%}
        {%- if not loop.first %},{% endif %}
        <a href="{{ url_for('show_paste', paste_id=childid) }}">{{ childtitle }}</a>
      {%- endfor %}
    {% endif %}
  </dl>
  <div class=code><pre>{{ paste.code }}</pre></div>
{% endblock %}
bgstack15