Blob Blame Raw
{% extends "repo_master.html" %}
{% from "_formhelper.html" import render_field_in_list %}

{% block title %}Issue #{{ issue.id}} - {{ repo.name }}{% endblock %}
{%block tag %}home{% endblock %}


{% block repo %}

<h2>Issue #{{ issue.id }}</h2>

{% if authenticated and form %}
<section class="issue_action">
  <form action="{{ url_for('view_issue', username=username,
                   repo=repo.name, issueid=issue.id) }}" method="post">
  <ul class="inline">
    <li>
      <a href="{{ url_for('edit_issue', username=username,
                  repo=repo.name, issueid=issue.id) }}">
        Edit</a>
    </li>
    {{ render_field_in_list(form.status) }}
    <li>
      <input type="submit" class="submit positive button" value="Update">
    </li>
  </ul>
  {{ form.csrf_token }}
  </form>
</section>
{% endif %}

<section class="issue_info">
  <h3>
    {{ issue.title }}
  </h3>

  <span class="issue_body">
    {% autoescape false %}
      {{ issue.content | rst2html }}
    {% endautoescape %}
  </span>
  <p>
      Opened by
      <a href="{{ url_for('view_user', username=issue.user.user)}}">
        {{ issue.user.user }}
      </a>
      on {{ issue.date_created | humanize}}
    </p>
</section>

{% if issue.comments %}
<div class="sep"></div>

<section class="issue_comments">
  {% for comment in issue.comments %}
  <span class="comment_body">
    {% autoescape false %}
      {{ comment.comment | rst2html }}
    {% endautoescape %}
    <p>
      <a href="{{ url_for('view_user', username=comment.user.user)}}">
        {{ comment.user.user }}
      </a>
      on {{ comment.date_created | humanize}}
    </p>
  </span>
  {% endfor %}
</section>

{% endif %}

<div class="sep"></div>

{% if authenticated %}
<section class="add_comment">
  <form action="{{ url_for('add_comment_issue', username=username,
                   repo=repo.name, issueid=issue.id) }}" method="post">
    <div>
      <textarea id="comment" name="comment" title="comment"></textarea>
    </div>
  {{ form_comment.csrf_token }}
  <input type="submit" class="submit positive button" value="Comment">
  </form>
</section>
{% else %}
<p><a href="{{ url_for('auth_login') }}">Login</a> to comment on this ticket.</p>
{% endif %}

{% endblock %}