Heavily customized version of smokesignal - https://whtwnd.com/kayrozen.com/3lpwe4ymowg2t
at main 1.7 kB view raw
1<div id="importRecords"> 2 <article class="message"> 3 <div class="message-body"> 4 {% if completed %} 5 <p>{{ t("import-complete") }}</p> 6 {% else %} 7 <button class="button is-link" hx-post="/import" hx-target="#importRecords" hx-swap="outerHTML" 8 hx-vals='{ {% if collection %} "collection": "{{ collection }}", {% endif %}{% if cursor %} "cursor": "{{ cursor }}", {% endif %} "ignore":"this"}'> 9 <span class="icon"> 10 <i class="fas fa-file-import"></i> 11 </span> 12 {% if items_paged %} 13 {% if cursor %} 14 <span>{{ t("import-continue") }}</span> 15 {% else %} 16 <span>{{ t("import-complete") }}</span> 17 {% endif %} 18 {% else %} 19 <span>{{ t("import-start") }}</span> 20 {% endif %} 21 </button> 22 23 {% if collection %} 24 <div class="mt-3"> 25 <p><strong>{{ t("import-current-collection") }}</strong> {{ collection }}</p> 26 {% if cursor %} 27 <p><small>{{ t("import-cursor") }}: {{ cursor }}</small></p> 28 {% endif %} 29 </div> 30 {% endif %} 31 {% endif %} 32 </div> 33 </article> 34 {% if not completed and items_paged %} 35 <div class="box"> 36 <h2 class="title is-5">{{ t("import-imported-items") }}</h2> 37 {% if items %} 38 <ul> 39 {% for item in items %} 40 <li>{{ item }}</li> 41 {% endfor %} 42 </ul> 43 {% else %} 44 <p>{{ t("import-no-items") }}</p> 45 {% endif %} 46 </div> 47 {% endif %} 48</div>