Update web/templates/import_result.html

This commit is contained in:
Joshua Laymon 2025-08-22 00:14:14 +00:00
parent 2d6289b030
commit ecf04ef12b

View File

@ -1,23 +1,58 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Import Result - Illustrations DB{% endblock %} {% block body_class %}themed-bg{% endblock %}
{% block content %} {% block content %}
<div class="panel"> <div class="container">
<h2 style="margin-top:0;">Import {{ "Preview" if dry_run else "Result" }}</h2> <div class="card">
<ul> <h1 class="page-title">{{ dry_run|yesno:"Dry-run Preview,Import Result" }}</h1>
<li>Total rows: <strong>{{ report.rows }}</strong></li> <p>{{ report }}</p>
<li>Inserted: <strong>{{ report.inserted }}</strong></li>
<li>Updated: <strong>{{ report.updated }}</strong></li> {% if errors %}
<li>Skipped: <strong>{{ report.skipped }}</strong></li> <h3>Errors (first {{ errors|length }})</h3>
<li>Scripture parsed: <strong>{{ report.scripture_parsed }}</strong></li> <ul class="small">
<li>Scripture failed: <strong>{{ report.scripture_failed }}</strong></li> {% for e in errors %}
</ul> <li>{{ e }}</li>
{% if report.errors and report.errors|length %} {% endfor %}
<h3>Errors</h3> </ul>
<pre>{{ report.errors|join("\n") }}</pre>
{% endif %} {% endif %}
<div style="margin-top:16px;">
<a class="btn" href="/import/">Run again</a> {% if rows %}
<a class="btn" href="/search/">Done</a> <h3 style="margin-top:10px;">Preview (first {{ rows|length }})</h3>
<div class="small muted">Truncated fields shown for readability.</div>
<table class="table" style="margin-top:8px;">
<thead>
<tr>
<th>#</th>
<th>Subject</th><th>Illustration</th><th>Application</th><th>Scripture</th>
<th>Source</th><th>Talk Title</th><th>Talk #</th><th>Code</th><th>Date</th><th>Date Edited</th>
</tr>
</thead>
<tbody>
{% for rownum, r in rows %}
<tr>
<td>{{ rownum }}</td>
<td>{{ r.Subject }}</td>
<td>{{ r.Illustration }}</td>
<td>{{ r.Application }}</td>
<td>{{ r.Scripture }}</td>
<td>{{ r.Source }}</td>
<td>{{ r."Talk Title" }}</td>
<td>{{ r."Talk Number" }}</td>
<td>{{ r.Code }}</td>
<td>{{ r.Date }}</td>
<td>{{ r."Date Edited" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="result-toolbar" style="margin-top:12px;">
<div class="rt-left"></div>
<div class="rt-right">
<a class="btn btn-primary" href="{% url 'import_wizard' %}">Back to Import</a>
<a class="btn btn-secondary" href="{% url 'settings_home' %}">Close</a>
</div>
</div> </div>
</div> </div>
{% endblock %} </div>
{% endblock %}