view share/roundup/templates/jinja2/html/file.index.html @ 7531:913a73b9fab5 2.3.0

Update for 2.3.0 release
author John Rouillard <rouilj@ieee.org>
date Wed, 12 Jul 2023 23:00:25 -0400
parents ee3497c573ab
children
line wrap: on
line source

<h4>{% trans %}Files{% endtrans %}</h4>
<table class='table'>
  <tr>
    <th>{% trans %}File name{% endtrans %}</th>
    <th>{% trans %}Uploaded{% endtrans %}</th>
    <th>{% trans %}Type{% endtrans %}</th>
    <th>{% if context.is_edit_ok() %}{% trans %}Edit{% endtrans %}{% else %}{% trans %}Details{% endtrans %}{% endif %}</th>
    {% if context.is_edit_ok() %}<th>{% trans %}Remove{% endtrans %}</th>{% endif %}
  </tr>
  {% for file in context.files %}
    <tr>
      <td>
        <a class="btn btn-sm btn-outline-primary" href='{{ file.download_url()|u|safe }}'>{{ file.name.plain()|u }}</a>
      </td>
      <td>{{ file.creator.plain()|u }}, {{ file.creation.plain()|u }}</td>
      <td>{{ file.type.plain()|u }}</td>
      <td>
        <a class="btn btn-sm btn-success" href='file{{ file.id }}'>
		  {% if file.is_edit_ok() %}
		  {% trans %}edit{% endtrans %}
		  {% else %}
		  {% trans %}view{% endtrans %}
		  {% endif %}
		</a>
      </td>
      {% if file.is_edit_ok() %}
        <td>
          <form method="POST" action='issue{{ context.id }}'>
            <input type="hidden" name="@remove@files" value='{{ file.id }}'>
            <input name="@csrf" type="hidden" value="{{ utils.anti_csrf_nonce() }}">
            <input type="hidden" name="@action" value="edit">
            <input class="btn btn-sm btn-danger" type="submit" value="{% trans %}remove{% endtrans %}">
          </form>
        </td>
      {% endif %}
    </tr>
  {% endfor %}
</table>

Roundup Issue Tracker: http://roundup-tracker.org/