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.id }}
      <a href="{{ url_for('view_issue', username=username,
                repo=repo.name, issueid=issue.id) }}">
        {{ issue.title }}
      </a>
      <span> Opened by
      <a href="{{ url_for('view_user', username=issue.user.user) }}">
      {{issue.user.user}}
      </a> on {{ issue.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 %}