michal/tit

Browse tree · Show commit · Download archive

Blob: templates/issues.html

Raw · Blame

{% extends "base.html" %}
{% block title %}Issues · {{ owner }}/{{ repository }} · tit{% endblock %}
{% block content %}
  <header class="repository-header">
    <h1><a href="/{{ owner }}/{{ repository }}">{{ owner }}/{{ repository }}</a></h1>
{% include "repository-nav.html" %}
  </header>

  <h2>Issues</h2>
  <p><a href="/{{ owner }}/{{ repository }}/issues/atom.xml">Issue Atom</a> · <a href="/{{ owner }}/{{ repository }}/issues/rss.xml">Issue RSS</a></p>
{% if issues.is_empty() %}
  <p>This repository has no issues.</p>
{% else %}
  <ol class="issue-list">
{% for issue in issues %}
    <li><a href="/{{ owner }}/{{ repository }}/issues/{{ issue.number }}">#{{ issue.number }} {{ issue.title }}</a> — {{ issue.state }}, opened by {{ issue.author }}, updated <time>{{ issue.updated_at }}</time></li>
{% endfor %}
  </ol>
{% endif %}

{% if can_create %}
  <section aria-labelledby="new-issue-heading">
    <h2 id="new-issue-heading">Create an issue</h2>
    <form method="post" action="/{{ owner }}/{{ repository }}/issues">
      <input type="hidden" name="csrf" value="{{ csrf }}">
      <div class="field">
        <label for="issue-title">Title</label>
        <input id="issue-title" name="title" maxlength="200" required>
      </div>
      <div class="field">
        <label for="issue-body">Description (Markdown)</label>
        <textarea id="issue-body" name="body" maxlength="262144" rows="10"></textarea>
      </div>
      <button type="submit">Create issue</button>
    </form>
  </section>
{% else %}
  <p><a href="/login">Log in</a> to create an issue.</p>
{% endif %}
{% endblock %}