kitgit

tirbofish/kitgit

feat/better-search / templates / issues_list.html · 1552 bytes

templates/issues_list.html
{% extends "layout.html" %}

{% block title %}issues · {{ owner.username }}/{{ repo.name }} — kitgit{% endblock %}

{% block content %}
<section class="kg-section">
  <h1 class="kg-title">
    <a href="/{{ owner.username }}/{{ repo.name }}">{{ owner.username }}/{{ repo.name }}</a>
    · issues
  </h1>
  {% let tab = "issues" %}
  {% let archive_ref = repo.default_branch %}
  {% include "partials/repo_tabs.html" %}

  <div class="kg-actions">
    <a class="kg-btn kg-btn--ghost" href="/{{ owner.username }}/{{ repo.name }}/issues?state=open"{% if state_filter == "open" %} aria-current="page"{% endif %}>open</a>
    <a class="kg-btn kg-btn--ghost" href="/{{ owner.username }}/{{ repo.name }}/issues?state=closed"{% if state_filter == "closed" %} aria-current="page"{% endif %}>closed</a>
    {% if viewer.is_some() %}
      <a class="kg-btn" href="/{{ owner.username }}/{{ repo.name }}/issues/new">new issue</a>
    {% endif %}
  </div>

  {% if issues.is_empty() %}
    <p class="kg-muted">No {{ state_filter }} issues.</p>
  {% else %}
    <ul class="kg-list">
      {% for issue in issues %}
      <li>
        <span>
          <span class="kg-badge {% if issue.state == "open" %}kg-badge--open{% else %}kg-badge--closed{% endif %}">{{ issue.state }}</span>
          <a href="/{{ owner.username }}/{{ repo.name }}/issues/{{ issue.number }}">#{{ issue.number }} {{ issue.title }}</a>
        </span>
        <span class="kg-meta">{{ issue.updated_at }}</span>
      </li>
      {% endfor %}
    </ul>
  {% endif %}
</section>
{% endblock %}