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
  </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 %}
</div>

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

<section class="issues_list">
  {% if issues %}
  <ul>
    {% for issue in issues %}
    <li>
      #{{ issue[1] }}
      <a href="{{ url_for('view_issue', username=username,
                repo=repo.name, issueid=issue[1]) }}">
        {{ issue[0].title }}
      </a>
      <span> Opened by
      <a href="{{ url_for('view_user', username=issue[0].user.user) }}">
      {{issue[0].user.user}}
      </a> on {{ issue[0].date_created.strftime('%Y-%m-%d %H:%M') }}</span>
    </li>
    {% endfor %}
  </ul>
  {% else %}
  <p>
    No issues have been opened for this project.
  </p>
  {% endif %}
</section>

{% endblock %}