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, tags=tags, author=author, assignee=assignee) }}">
      ({{ oth_issues }} Open)</a>
    {% else %}
      <a href="{{ url_for('view_issues', username=username,
                 repo=repo.name, status='Closed', tags=tags, author=author,
                 assignee=assignee) }}">
      ({{ oth_issues }} Closed)</a>
    {% endif %}

    {% if oth_issues %}
    <div class="addrem_bar issues_pbar">
      {% if (issues | length + oth_issues) %}
        <span style="width: {{ (100.0 * (1 - issues | length / (issues | length + oth_issues)))|round|int }}%">
            {{ (100.0 * (1 - issues | length / (issues | length + oth_issues)))|round|int }}%
        </span>
      {% endif %}
    </div>
    {% endif %}

    <aside id="issue_action">
      <a class="btn_reset" href="{{ url_for('view_issues', username=username,
                 repo=repo.name) }}">
        <button>Reset all filters</button>
      </a>
      <br />
      <a class="btn_create" href="{{ url_for('new_issue', username=username, repo=repo.name) }}">
        <button>Create new issue</button>
      </a>
    </aside>
</div>

<section id="tags">
    Tags:
    {% for tag in tag_list %}
    <a href="{{ url_for('view_issues', username=username,
               repo=repo.name, tags=tag.tag,
               author=author, assignee=assignee, status=status) }}"
               title="Filter issues by tag">
        {{ tag.tag }}</a>{% if not loop.last %},{% endif %}
    {% endfor %}
</section>

<table class="list issues">
    <thead>
        <tr>
            <th>#</th>
            <th>Title</th>
            <th class="open_by">
                Opened by (<a href="{{ url_for('view_issues', username=username,
                repo=repo.name, tags=tags, assignee=assignee,
                status=status) }}">reset</a>)
            </th>
            <th class="open_date">Opened on</th>
            <th class="assigned">
              Assigned to (<a href="{{ url_for('view_issues', username=username,
                repo=repo.name, tags=tags, author=author,
                status=status) }}">reset</a>)
            </th>
        </tr>
    </thead>
    <tfoot>
    </tfoot>
    <tbody>
    {% for issue in issues %}
        <tr>
            <td>#{{ issue.id }}</td>
            <td>
                <a href="{{ url_for('view_issue', username=username,
                    repo=repo.name, issueid=issue.id) }}">
                    {{ issue.title }}
                </a>
            </td>
            <td>
                <a href="{{ url_for('view_issues', username=username,
                    repo=repo.name, author=issue.user.user,
                    tags=tags, assignee=assignee, status=status) }}"
                    title="Filter issues by reporter">
                    {{ issue.user.user | avatar(16) | safe }}
                    {{issue.user.user}}
                </a>
            </td>
            <td>
                {{ issue.date_created.strftime('%Y-%m-%d %H:%M') }}
            </td>
            <td>
              {% if issue.assignee %}
              <a href="{{ url_for('view_issues', username=username,
                repo=repo.name, assignee=issue.assignee.username,
                tags=tags, author=author, status=status) }}"
                title="Filter issues by assignee">
                {{ issue.assignee.user | avatar(16) | safe }}
                {{ issue.assignee.user }}
              </a>
              {% else %}
              <a href="{{ url_for('view_issues', username=username,
                repo=repo.name, tags=tags, author=author, status=status) }}">(unassigned)</a>
              {% endif %}
            </td>
        </tr>
    {% else %}
        <tr>
            <td colspan="5" class="noresult">No issues found</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

{% endblock %}