- New apps/guides app with GuidePage model and audience mapping by wiki path - sync_guides management command: one-way read-only sync from wikijs DB - Read-only wikijs_ro DB role + WIKI_DB_* env config (secrets, gitignored) - Markdown rendering with bleach sanitisation; rewrites internal guide links to the portal help root and wiki image paths to WIKI_PUBLIC_BASE - /portal/help/ (buyer) and /ops/help/ (ops) index + detail views with role-based audience filtering (404 on cross-role guides) - Help nav item added to both portal base templates - Tests: audience filtering, markdown sanitisation, link rewriting, sync command
26 lines
878 B
HTML
26 lines
878 B
HTML
<div class="page-header d-flex justify-content-between align-items-center">
|
|
<h2>Help Centre</h2>
|
|
<span class="text-secondary">User guides</span>
|
|
</div>
|
|
|
|
{% if guides %}
|
|
<div class="row g-3">
|
|
{% for guide in guides %}
|
|
<div class="col-md-6">
|
|
<div class="stat-card h-100">
|
|
<div class="d-flex justify-content-between align-items-start mb-2">
|
|
<h6 class="mb-0"><a class="text-decoration-none" href="{{ help_root }}{{ guide.page_slug }}/">{{ guide.title }}</a></h6>
|
|
<span class="badge bg-light text-secondary border">{{ guide.get_audience_display }}</span>
|
|
</div>
|
|
{% if guide.preview %}
|
|
<p class="text-muted mb-0 small">{{ guide.preview }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="stat-card text-center py-5">
|
|
<p class="text-muted mb-0">No guides available yet.</p>
|
|
</div>
|
|
{% endif %}
|