Projects under organizations with fixed URL name and feature ID prefix, three visibility levels, open contribution, per-project roles, settings and typed-confirmation delete. Hidden projects 404. Leaving an org drops its project roles. Project access rules live in intent/access.py alongside org access. Features numbered per project (INT-12) in a tree. Every change is a revision with a required note; history, old revisions, and side-by-side field and line diffs between any two. Cycles and superseded-without-replacement are rejected. Markdown renders safely with source-line attributes for Phase 3 line comments and headings shifted below the page h1. Server-side preview works without JS. Structural accessibility check runs on every page in tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
{% extends "projects/base.html" %}
|
|
|
|
{% block page_title %}{% if feature %}Edit {{ feature.key }}{% else %}New feature{% endif %}{% endblock %}
|
|
|
|
{% block project_content %}
|
|
{% if feature %}
|
|
<h1>Edit <span class="muted">{{ feature.key }}</span> {{ feature.title }}</h1>
|
|
<p>Saving creates revision {{ feature.current_revision|add:1 }}.</p>
|
|
{% else %}
|
|
<h1>New feature</h1>
|
|
{% endif %}
|
|
|
|
{% if preview %}
|
|
<section aria-labelledby="preview-heading">
|
|
<h2 id="preview-heading">Preview</h2>
|
|
<div class="prose preview">{{ preview }}</div>
|
|
<p class="muted">Not saved yet.</p>
|
|
</section>
|
|
{% elif preview is not None %}
|
|
<p class="muted">Nothing to preview: the description is empty.</p>
|
|
{% endif %}
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
{{ form }}
|
|
<p>
|
|
{# Save comes first so pressing Enter in a text field saves rather than previews. #}
|
|
<button type="submit">{% if feature %}Save revision{% else %}Create feature{% endif %}</button>
|
|
<button type="submit" name="preview" value="1">Preview description</button>
|
|
</p>
|
|
</form>
|
|
{% endblock %}
|