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

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


{% block repo %}


  <h2 class="p-b-1">
    {% if status and status != 'Open' %}
      {{ issues|count }} Closed Issues
    {% else %}
      {{ issues|count }} Open Issues
    {% endif %}

    <a class="pull-xs-right" href="{{ url_for('new_issue', username=username, repo=repo.name) }}">
      <button class="btn btn-success btn-sm">New Issue</button>
    </a>
  </h2>


<section id="tags">
  <span class="btn-group btn-group-sm issues-tagbar" role="group" aria-label="Basic example">
    {% if status and status != 'Open' %}
      <a class="btn btn-secondary btn-sm" href="{{ url_for('view_issues', username=username,
                 repo=repo.name, tags=tags, author=author, assignee=assignee) }}">Open</a>
      <a class="btn btn-primary btn-sm" href="{{ url_for('view_issues', username=username,
                 repo=repo.name, status='Closed', tags=tags, author=author,
                 assignee=assignee) }}">Closed</a>
    {% else %}
      <a class="btn btn-primary btn-sm" href="{{ url_for('view_issues', username=username,
                 repo=repo.name, tags=tags, author=author, assignee=assignee) }}">Open</a>
      <a class="btn btn-secondary btn-sm" href="{{ url_for('view_issues', username=username,
                 repo=repo.name, status='Closed', tags=tags, author=author,
                 assignee=assignee) }}">Closed</a>
    {% endif %}
  </span>
  <span class="oi m-l-2" data-glyph="tag"></span>
  <span class="btn-group btn-group-sm issues-tagbar" role="group" aria-label="Basic example">
    {% for tag in tag_list %}
      {% if tag.tag in tags %}
        {% if status and status != 'Open' %}
        <a class="btn btn-secondary btn-sm {% if tag.tag in tags%}active{%endif%}" href="{{ url_for('view_issues', username=username,
                 repo=repo.name, status='Closed') }}"
                   title="Filter issues by tag">
         {% else %}
        <a class="btn btn-secondary btn-sm {% if tag.tag in tags%}active{%endif%}" href="{{ url_for('view_issues', username=username,
                 repo=repo.name) }}"
                   title="Filter issues by tag">
         {% endif %}
      {% else %}
        <a class="btn btn-secondary btn-sm {% if tag.tag in tags%}active{%endif%}" href="{{ url_for('view_issues', username=username,
                   repo=repo.name, tags=tag.tag,
                   author=author, assignee=assignee, status=status) }}"
                   title="Filter issues by tag">
      {% endif %}

        {{ tag.tag }}</a>
    {% endfor %}
</span>
</section>
<div class="card m-t-1">
<table id="pagure-issues-list" class="table table-hover table-striped m-b-0">
    <thead class="thead-default">
        <tr>
            <th>#</th>
            <th id="issue-title">Title</th>
            <th class="open_by">
                Reporter&nbsp;(<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</th>
            <th class="assigned">
              Assignee&nbsp;(<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 sorttable_customkey={{issue.id}}>
              #{{ issue.id }}
            </td>
            <td>
              <a href="{{ url_for('view_issue', username=username,
                         repo=repo.name, issueid=issue.id) }}">
                {{ issue.title | noJS("img") | safe }}
              </a>
              {% if issue.private %}
              <span class="oi red-icon" data-glyph="lock-locked" title="Private issue"></span>
              {% endif %}
            </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.default_email | avatar(16) | safe }}
                    {{ issue.user.user }}
                </a>
            </td>
            <td class="td-open_date">
                {{ issue.date_created.strftime('%Y-%m-%d %H:%M:%S') }}
            </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.default_email | 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,
                assignee=0) }}">(unassigned)</a>
              {% endif %}
            </td>
        </tr>
    {% else %}
        <tr>
            <td colspan="5" class="noresult">No issues found</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
</div>
{% endblock %}