diff --git a/web/templates/import_result.html b/web/templates/import_result.html index 931609c..6b4637a 100644 --- a/web/templates/import_result.html +++ b/web/templates/import_result.html @@ -1,58 +1,105 @@ {% extends "base.html" %} {% block body_class %}themed-bg{% endblock %} + {% block content %} -
+
+
-

{{ dry_run|yesno:"Dry-run Preview,Import Result" }}

-

{{ report }}

+

Import Results

- {% if errors %} -

Errors (first {{ errors|length }})

-
    - {% for e in errors %} -
  • {{ e }}
  • - {% endfor %} -
+ {% if dry_run %} +
Dry run only — no changes were saved.
{% endif %} - {% if rows %} -

Preview (first {{ rows|length }})

-
Truncated fields shown for readability.
- - - - - - - - - - {% for rownum, r in rows %} - - - - - - - - - - - - - - {% endfor %} - -
#SubjectIllustrationApplicationScriptureSourceTalk TitleTalk #CodeDateDate Edited
{{ rownum }}{{ r.Subject }}{{ r.Illustration }}{{ r.Application }}{{ r.Scripture }}{{ r.Source }}{{ r."Talk Title" }}{{ r."Talk Number" }}{{ r.Code }}{{ r.Date }}{{ r."Date Edited" }}
- {% endif %} - -
-
-
- Back to Import - Close + {% if report.header_ok is defined and not report.header_ok %} +
+ The first row didn’t match the expected header; a clean header was injected automatically.
+ {% endif %} + +
+ {% if report.total_rows is not None %} +
+
Total Rows
+
{{ report.total_rows }}
+
+ {% endif %} + {% if report.created is not None %} +
+
Created
+
{{ report.created }}
+
+ {% endif %} + {% if report.updated is not None %} +
+
Updated
+
{{ report.updated }}
+
+ {% endif %} + {% if report.skipped is not None %} +
+
Skipped
+
{{ report.skipped }}
+
+ {% endif %} + {% if report.errors is not None %} +
+
Errors
+
{{ report.errors }}
+
+ {% endif %}
+ + {% if report.columns and report.preview %} +
+

Preview

+
+ Showing up to {{ report.preview|length }} rows. +
+ +
+ + + + {% for c in report.columns %} + + {% endfor %} + + + + {% for row in report.preview %} + + {% for cell in row %} + + {% endfor %} + + {% endfor %} + +
{{ c }}
{{ cell }}
+
+
+ {% else %} +
+

No preview rows to display.

+
+ {% endif %} + + {% if report.problems %} +
+

Problems

+
    + {% for p in report.problems %} +
  • {{ p }}
  • + {% endfor %} +
+
+ {% endif %} + + +
{% endblock %} \ No newline at end of file