[FIX] HORILLA VIEWS: Bulk update, Export modal and empty page in Generic Group by view
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
{% load static i18n generic_template_filters %}
|
||||
<div id="{{view_id|safe}}">
|
||||
<div
|
||||
class="oh-modal"
|
||||
id="bulkUpdateModal{{view_id|safe}}"
|
||||
role="dialog"
|
||||
aria-labelledby="bulkUpdateModal{{view_id|safe}}"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="oh-modal__dialog" id="bulkUpdateModalBody{{view_id|safe}}"></div>
|
||||
</div>
|
||||
{% include "generic/export_fields_modal.html" %}
|
||||
<script>
|
||||
if (!$(".HTV").length) {
|
||||
$("#reloadMessagesButton").click()
|
||||
@@ -40,16 +50,37 @@
|
||||
</span> {% trans "Selected" %}
|
||||
</div>
|
||||
<div
|
||||
id="export_{{view_id}}"
|
||||
class="oh-checkpoint-badge text-info d-none"
|
||||
style="cursor: pointer;"
|
||||
onclick="
|
||||
selectedIds = $('#{{selected_instances_key_id}}').attr('data-ids')
|
||||
window.location.href = '{{export_path}}' + '?ids='+selectedIds
|
||||
"
|
||||
id="export_{{view_id}}"
|
||||
class="oh-checkpoint-badge text-info d-none"
|
||||
style="cursor: pointer;"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#exportFields{{view_id|safe}}"
|
||||
>
|
||||
{% trans "Export" %}
|
||||
</div>
|
||||
{% if bulk_path %}
|
||||
<div
|
||||
id="bulk_udate_{{view_id}}"
|
||||
class="oh-checkpoint-badge text-warning d-none"
|
||||
style="cursor: pointer;"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#bulkUpdateModal{{view_id|safe}}"
|
||||
onclick="
|
||||
ids = $('#{{selected_instances_key_id}}').attr('data-ids')
|
||||
$('#bulk_update_get_form{{view_id}}').closest('form').find('[name=instance_ids]').val(ids);
|
||||
$('#bulk_update_get_form{{view_id}}').click()
|
||||
"
|
||||
>
|
||||
{% trans "Update" %}
|
||||
</div>
|
||||
<form
|
||||
hx-get="/{{bulk_path}}"
|
||||
hx-target="#bulkUpdateModalBody{{view_id|safe}}">
|
||||
<input type="hidden" name="instance_ids">
|
||||
<button type="submit" id="bulk_update_get_form{{view_id}}" hidden>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% for filter in stored_filters %}
|
||||
<div class="oh-hover-btn-container"
|
||||
hx-get="{{request.path}}?{{filter.urlencode}}"
|
||||
@@ -86,6 +117,17 @@
|
||||
</button>
|
||||
{% if show_filter_tags %} {% include "generic/filter_tags.html" %} {% endif %}
|
||||
<div class="oh-card">
|
||||
{% if not groups.paginator.count %}
|
||||
<div class="oh-wrapper" align="center" style="margin-top: 7vh; margin-bottom:7vh;">
|
||||
<div align="center">
|
||||
<img src="{% static "images/ui/search.svg" %}" class="oh-404__image" alt="Page not found. 404.">
|
||||
<h1 class="oh-404__title">{% trans "No Records found" %}</h1>
|
||||
<p class="oh-404__subtitle">
|
||||
{% trans "No records found." %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for group in groups %}
|
||||
<div class="oh-accordion-meta">
|
||||
<div class="oh-accordion-meta__item">
|
||||
|
||||
Reference in New Issue
Block a user