intent/templates/features/detail.html

70 lines
2.7 KiB
HTML
Raw Normal View History

{% extends "projects/base.html" %}
{% block page_title %}{{ feature.key }} {{ feature.title }}{% endblock %}
{% block project_content %}
{% include "features/_header.html" %}
{% if feature.status == "withdrawn" %}
<p role="note"><strong>Withdrawn.</strong> This feature is no longer planned.</p>
{% elif feature.status == "superseded" %}
<p role="note"><strong>Superseded</strong> by <a href="{% url 'features:detail' org_slug=project.org.slug project_slug=project.slug feature_key=feature.superseded_by.key %}">{{ feature.superseded_by.key }} {{ feature.superseded_by.title }}</a>.</p>
{% endif %}
<dl>
<dt>Status</dt>
<dd>{{ feature.get_status_display }}</dd>
<dt>Revision</dt>
<dd>
{{ feature.current_revision }}
(<a href="{% url 'features:history' org_slug=project.org.slug project_slug=project.slug feature_key=feature.key %}">history</a>)
</dd>
{% if latest %}
<dt>Last change</dt>
<dd>
<time datetime="{{ latest.created_at|date:'c' }}">{{ latest.created_at|date:"j M Y" }}</time>
by {{ latest.author.username|default:"unknown" }}: {{ latest.note }}
</dd>
{% endif %}
</dl>
{% if access.can_edit %}
<ul>
<li><a href="{% url 'features:edit' org_slug=project.org.slug project_slug=project.slug feature_key=feature.key %}">Edit</a></li>
<li><a href="{% url 'features:create' org_slug=project.org.slug project_slug=project.slug %}?parent={{ feature.key }}">Add a sub-feature</a></li>
</ul>
{% endif %}
<section aria-labelledby="description-heading">
<h2 id="description-heading" class="visually-hidden">Description</h2>
<div class="prose">
{% if feature.description %}{{ description }}{% else %}<p class="muted">No description yet.</p>{% endif %}
</div>
</section>
{% if children %}
<section aria-labelledby="children-heading">
<h2 id="children-heading">Sub-features</h2>
<ul>
{% for child in children %}
<li>
<a href="{% url 'features:detail' org_slug=project.org.slug project_slug=project.slug feature_key=child.key %}">{{ child.key }} {{ child.title }}</a>
{% if child.status != "active" %}<span class="muted">({{ child.get_status_display|lower }})</span>{% endif %}
</li>
{% endfor %}
</ul>
</section>
{% endif %}
{% if supersedes %}
<section aria-labelledby="supersedes-heading">
<h2 id="supersedes-heading">Replaces</h2>
<ul>
{% for old in supersedes %}
<li><a href="{% url 'features:detail' org_slug=project.org.slug project_slug=project.slug feature_key=old.key %}">{{ old.key }} {{ old.title }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}
{% endblock %}