Update web/templates/stats.html
This commit is contained in:
parent
e549547465
commit
87bb1bb679
@ -161,6 +161,31 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tool-card">
|
||||
<h4 style="margin:0 0 6px;">Subject Normalizer</h4>
|
||||
<p class="small muted" style="margin:0 0 8px;">
|
||||
Normalize the <strong>Subject</strong> field so individual subjects are comma-separated.
|
||||
Preserves multi-word subjects; lightly fixes separators like “;” and spaced dashes.
|
||||
Uses your <code>subjects.txt</code> catalog when available.
|
||||
</p>
|
||||
|
||||
<form method="get" action="{% url 'normalize_subjects' %}" style="display:inline;">
|
||||
<input type="number" min="0" name="limit"
|
||||
placeholder="Preview limit (optional)"
|
||||
style="border:1px solid var(--border); border-radius:8px; padding:6px 8px;">
|
||||
<button class="btn">Dry-run Preview</button>
|
||||
</form>
|
||||
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
<form method="post" action="{% url 'normalize_subjects' %}" style="display:inline; margin-left:8px;">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-danger"
|
||||
onclick="return confirm('Apply subject normalization to all entries? This cannot be undone. Make a backup first.')">
|
||||
Apply to All
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user