Files
devplacepy/devplacepy/templates/issue_detail.html
T
retoor 8e9d3fad98 Add the trust and safety subsystem and the App Store compliance work
Implements the moderation and consent obligations a social platform carries,
so the web version and any client that speaks to it enforce the same rules.

Moderation core (services/moderation/, database/moderation.py): a reportable
target registry, the content filter and its choke points, the report queue with
atomic resolution, enforcement actions, consent tracking, maturity gating, and
account deletion with a grace window.

Surfaces: POST /reports plus the member report list, /admin/moderation and the
per-report admin view, /workspaces, terms acceptance at /auth/terms, consent and
account deletion under /profile, the report button and dialog partials, the
maturity gate, and the moderation stylesheet and ReportDialog client.

Every user-generated surface stays reportable by construction: new content tables
are registered in REPORTABLE_TARGETS or listed in UNREPORTABLE_TABLES with a
reason, and the registry test fails the suite on anything left unclassified.

Docs: community guidelines, content moderation, intellectual property, privacy,
terms, contact, and the admin-only moderation operations page, plus the
moderation API group and the Devii moderation actions.

Compliance record: applecomp.md is the requirement register, applechanges.md the
gap analysis against this codebase, and appleimpl.md the implementation design
they resolve to.

Tests cover the report flow, admin moderation, consent, account deletion, terms
acceptance, workspaces, and the registry invariant across the unit, api, and e2e
tiers.
2026-08-09 00:18:20 +02:00

98 lines
5.1 KiB
HTML

{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/issues.css') }}">
{% endblock %}
{% block content %}
<div class="issues-layout issue-detail">
<div class="issue-detail-nav">
<a href="/issues" class="issue-back">&#x2190; All issues</a>
{% if issue.html_url %}<a href="{{ issue.html_url }}" class="issue-gitea-link" target="_blank" rel="noopener noreferrer">View on Gitea</a>{% endif %}
</div>
<div class="card issue-detail-card">
<div class="issue-detail-header">
<span class="issue-number">#{{ issue.number }}</span>
<h1 class="issue-detail-title">{{ render_title(issue.title) }}</h1>
<span class="issue-status {{ issue.state }}"><span class="sr-only">Status: </span>{{ issue.state }}</span>
</div>
<div class="issue-meta">
{% if issue.is_local_author %}
{% set _user = {'username': issue.author_username, 'avatar_seed': issue.author_avatar_seed} %}{% set _size = 24 %}{% set _size_class = "sm" %}{% include "_avatar_link.html" %}
{% endif %}
<span class="issue-author">{{ issue.author_username }}</span>
<span class="issue-dot">&middot;</span>
<span class="issue-date">{{ local_dt(issue.created_at) }}</span>
</div>
{% if viewer_is_admin %}
<div class="issue-admin-actions">
{% if issue.state == 'open' %}
<form method="POST" action="/issues/{{ issue.number }}/status">
<input type="hidden" name="status" value="closed">
<button type="submit" class="btn btn-secondary btn-sm"><span class="btn-spinner" aria-hidden="true"></span>Close ticket</button>
</form>
{% else %}
<form method="POST" action="/issues/{{ issue.number }}/status">
<input type="hidden" name="status" value="open">
<button type="submit" class="btn btn-secondary btn-sm"><span class="btn-spinner" aria-hidden="true"></span>Reopen ticket</button>
</form>
{% endif %}
</div>
{% endif %}
<div class="issue-detail-actions">
{% set _type = "issue" %}{% set _uid = issue.number|string %}{% set _owner = "" %}{% set _owner_name = "" %}{% set _class = "btn btn-secondary btn-sm" %}{% include "_report_button.html" %}
</div>
<div class="issue-detail-body rendered-content">{{ render_content(body) }}</div>
{% if attachments %}
{% set _attachments = attachments %}{% set _delete_base = "/issues/" ~ issue.number ~ "/attachments" %}{% include "_issue_attachments.html" %}
{% endif %}
{% if can_attach %}
<form class="issue-attach-form" data-issue-attach data-action="/issues/{{ issue.number }}/attachments">
{% include "_attachment_form.html" %}
<button type="submit" class="btn btn-secondary btn-sm"><span class="btn-spinner" aria-hidden="true"></span>Attach files</button>
</form>
{% endif %}
</div>
<section class="comments-section">
<h3>Updates &amp; comments</h3>
{% for comment in comments %}
<div class="issue-comment">
<div class="issue-comment-head">
{% if comment.is_local_author %}
{% set _user = {'username': comment.author_username, 'avatar_seed': comment.author_avatar_seed} %}{% set _size = 20 %}{% set _size_class = "sm" %}{% include "_avatar_link.html" %}
{% else %}
<span class="issue-comment-badge"><span class="sr-only">Developer reply from </span>dev</span>
{% endif %}
<span class="issue-author">{{ comment.author_username }}</span>
<span class="issue-dot">&middot;</span>
<span class="issue-date">{{ local_dt(comment.created_at) }}</span>
</div>
<div class="issue-comment-body rendered-content">{{ render_content(comment.body) }}</div>
{% if comment.attachments %}
{% set _attachments = comment.attachments %}{% set _delete_base = "/issues/" ~ issue.number ~ "/comments/" ~ comment.id ~ "/attachments" %}{% include "_issue_attachments.html" %}
{% endif %}
</div>
{% else %}
<p class="no-comments-msg">No updates yet.</p>
{% endfor %}
{% if can_comment %}
<form method="POST" action="/issues/{{ issue.number }}/comment" class="comment-form issue-comment-form">
<textarea name="body" required aria-required="true" maxlength="5000" placeholder="Add a comment (posted to the tracker)..." class="min-h-120" data-mention aria-label="Add a comment"></textarea>
<div class="issue-comment-form-footer">
{% include "_attachment_form.html" %}
<button type="submit" class="btn btn-primary btn-sm"><span class="btn-spinner" aria-hidden="true"></span>Comment</button>
</div>
</form>
{% else %}
<p class="no-comments-msg"><a href="/auth/login">Log in</a> to comment.</p>
{% endif %}
</section>
</div>
{% endblock %}