Handle unlimited Imports

This commit is contained in:
Giebisch 2022-12-20 21:32:58 +01:00
parent 3295d419bf
commit 8f9ac82094

View file

@ -15,11 +15,12 @@
{% endif %}
{% if site.imports_enabled %}
<div class="notification">
<p>Currently you are allowed to import {{ import_size_limit }} books every {{ import_limit_reset }} days.</p>
<p>You have {{ allowed_imports }} left.</p>
</div>
{% if import_size_limit and import_limit_reset %}
<div class="notification">
<p>Currently you are allowed to import {{ import_size_limit }} books every {{ import_limit_reset }} days.</p>
<p>You have {{ allowed_imports }} left.</p>
</div>
{% endif %}
{% if recent_avg_hours or recent_avg_minutes %}
<div class="notification">
<p>
@ -95,7 +96,7 @@
</div>
</div>
</div>
{% if allowed_imports > 0 %}
{% if not import_limit_reset and not import_size_limit or allowed_imports > 0 %}
<button class="button is-primary" type="submit">{% trans "Import" %}</button>
{% else %}
<button class="button is-primary is-disabled" type="submit">{% trans "Import" %}</button>