{% extends "base.html" %}
{% block title %}Backlog {{ item.id }} — ABREKA{% endblock %}

{% block breadcrumb %}
<div class="breadcrumb"><a href="/">Dashboard</a> / <a href="/backlog">Backlog</a> / {{ item.id }}</div>
{% endblock %}

{% block content %}
<h1 style="margin-bottom: 16px;">Backlog {{ item.id }}</h1>

<div class="card">
  <h3>Details</h3>
  <table>
    <tbody>
      <tr><td style="width: 140px; font-weight: 600;">Title</td><td>{{ item.title }}</td></tr>
      <tr><td style="font-weight: 600;">Status</td><td><span class="badge" style="background: {{ item.status.value | backlog_status_color }};">{{ item.status.value }}</span></td></tr>
      <tr><td style="font-weight: 600;">Priority</td><td>{{ item.priority }}</td></tr>
      <tr><td style="font-weight: 600;">Created</td><td class="text-muted">{{ item.created_at.isoformat()[:19] }}</td></tr>
      <tr><td style="font-weight: 600;">Updated</td><td class="text-muted">{{ item.updated_at.isoformat()[:19] }}</td></tr>
      {% if item.tags %}
      <tr>
        <td style="font-weight: 600;">Tags</td>
        <td>
          {% for t in item.tags %}
          <span style="background: #e2e5ea; padding: 1px 6px; border-radius: 4px; font-size: 11px;">{{ t }}</span>
          {% endfor %}
        </td>
      </tr>
      {% endif %}
      {% if item.source_exp %}
      <tr><td style="font-weight: 600;">Source Exp</td><td><a href="/experiments/{{ item.source_exp }}" class="text-mono">{{ item.source_exp }}</a></td></tr>
      {% endif %}
      {% if item.resolved_exp %}
      <tr><td style="font-weight: 600;">Resolved Exp</td><td><a href="/experiments/{{ item.resolved_exp }}" class="text-mono">{{ item.resolved_exp }}</a></td></tr>
      {% endif %}
      {% if item.dismiss_reason %}
      <tr><td style="font-weight: 600;">Dismiss Reason</td><td>{{ item.dismiss_reason }}</td></tr>
      {% endif %}
    </tbody>
  </table>
</div>

{% if item.description %}
<div class="card">
  <h3>Description</h3>
  <div class="md-content">{{ item.description | md }}</div>
</div>
{% endif %}
{% endblock %}
