Blob Blame Raw
{% extends "repo_master.html" %}

{% block title %}Issues - {{ repo.name }}{% endblock %}
{%block tag %}home{% endblock %}


{% block repo %}

<div class="inline">
  <h2>
    {% if status and status != 'Open' %}
    Closed
    {% endif %}
    Issues ({{ issues|count }})
  </h2>
    {% if status and status != 'Open' %}
      <a href="{{ url_for('view_issues', username=username,
                 repo=repo.name) }}">
      (Open)</a>
    {% else %}
      <a href="{{ url_for('view_issues', username=username,
                 repo=repo.name) }}?status=Closed">
      (Closed)</a>
    {% endif %}

    <a class="btn_create" href="{{ url_for('new_issue', username=username, repo=repo.name) }}">
      <button>Create new issue</button>
    </a>
</div>

<table class="list issues">
    <thead>
        <tr>
            <th>#</th>
            <th>Title</th>
            <th class="open_by">Opened by</th>
            <th class="open_date">Opened on</th>
        </tr>
    </thead>
    <tfoot>
    </tfoot>
    <tbody>
    {% for issue in issues %}
        <tr>
            <td>#{{ issue[1] }}</td>
            <td>
                <a href="{{ url_for('view_issue', username=username,
                    repo=repo.name, issueid=issue[1]) }}">
                    {{ issue[0].title }}
                </a>
            </td>
            <td>
                <a href="{{ url_for('view_user', username=issue[0].user.user) }}">
                    {{ issue[0].user.user | avatar(16) | safe }}
                    {{issue[0].user.user}}
                </a>
            </td>
            <td>
                {{ issue[0].date_created.strftime('%Y-%m-%d %H:%M') }}
            </td>

            </td>
        </tr>
    {% else %}
        <tr>
            <td colspan="4" class="noresult">No issues found</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

{% endblock %}