Source

lodgeit-main / lodgeit / templates / show_paste.html

Full commit
{% extends "layout.html" %}
{% set page_title = 'Paste #' ~ paste.identifier %}
{% set active_page = 'all' %}
{% block body %}
  <div class="related">
    <h3><a href="javascript:LodgeIt.toggleRelatedBox()">{% trans %}Paste Details{% endtrans %}</a></h3>
    <div class="quick">
      <p><a href="{{ url_for('pastes.new_paste', reply_to=paste.identifier) }}">{% trans %}reply{% endtrans %}</a> |
         <a href="{{ url_for('pastes.raw_paste', identifier=paste.identifier) }}">{% trans %}raw{% endtrans %}</a></p>
    </div>
    <div class="content">
      <p>{% trans pub_date=paste.pub_date|datetimeformat %}posted on {{ pub_date }}{% endtrans %}</p>
      <ul>
        <li><a class="autoclose" href="{{ url_for('pastes.new_paste', reply_to=paste.identifier) }}">{% trans %}reply to this paste{% endtrans %}</a></li>
        {% if paste.parent %}
          <li><a class="autoclose" href="{{ url_for('pastes.compare_paste', new_id=paste.identifier, old_id=paste.parent.identifier) }}">{% trans %}compare it with the parent paste{% endtrans %}</a></li>
          <li><a class="autoclose" href="{{ url_for('pastes.show_paste', identifier=paste.parent.identifier) }}">{% trans %}look at the parent paste{% endtrans %}</a></li>
        {% endif %}
        {% if paste.children %}
          <li>{% trans %}the following pastes replied to this paste:{% endtrans %}
          {% for child in paste.children %}
            <a class="autoclose" href="{{ url_for('pastes.show_paste', identifier=child.identifier) }}">#{{ child.identifier }}</a>
            {%- if not loop.last %},{% endif -%}
          {% endfor %}
          </li>
        {% endif %}
        {% if paste.parent or paste.children %}
          <li><a href="{{ url_for('pastes.show_tree', identifier=paste.identifier) }}">{% trans %}show paste tree{% endtrans %}</a></li>
        {% endif %}
        <li><a href="{{ url_for('pastes.raw_paste', identifier=paste.identifier) }}">{% trans %}download paste{% endtrans %}</a></li>
        <li>{% trans %}compare with paste{% endtrans %} <form action="{{ url_for('pastes.compare_paste') }}" method="post">
          <input type="hidden" name="old" value="{{ paste.identifier }}">
          <input type="text" name="new" value="#">
          <input type="submit" value="{% trans %}compare{% endtrans %}">
        </form></li>
        <li>{% trans %}select different colorscheme{% endtrans %} <form action="{{ url_for('pastes.set_colorscheme') }}" method="post">
          <select name="style">
          {%- for key, caption in styles|dictsort %}
            <option value="{{ key }}"{% if key == style
              %} selected="selected"{% endif %}>{{ caption }}</option>
          {%- endfor %}
          </select>
          <input type="submit" value="{% trans %}change{% endtrans %}">
        </form></li>
        <li><a href="?linenos={{ linenos and 'no' or 'yes' }}" onclick="LodgeIt.toggleLineNumbers(); return false;">{% trans %}toggle line numbers{% endtrans %}</a></li>
      </ul>
    </div>
  </div>
  <div id="paste" class="lang-{{ paste.language }} code{% if not linenos %} nolinenos{% endif %}">
    {{ paste.parsed_code|safe }}
  </div>
{% endblock %}