Make all WM elements inherit from common templates
This commit is contained in:
@@ -1,28 +1,19 @@
|
||||
<div id="drilldown-widget">
|
||||
<div id="drilldown-widget-{{ unique }}" class="grid-stack-item" gs-w="5" gs-h="15">
|
||||
<div class="grid-stack-item-content">
|
||||
<div class="panel">
|
||||
<p class="panel-heading" style="padding: .2em; line-height: .5em;">
|
||||
<i class="fa-solid fa-arrows-up-down-left-right has-text-grey-light ui-move"></i>
|
||||
<i
|
||||
class="fa-solid fa-xmark has-text-grey-light ui-close"
|
||||
onclick='grid.removeWidget("drilldown-widget-{{ unique }}"); grid.compact();'></i>
|
||||
Drilldown
|
||||
</p>
|
||||
<div class="panel-block is-active">
|
||||
<div class="control">
|
||||
{% include 'window-content/drilldown.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% extends 'wm/widget.html' %}
|
||||
|
||||
<script>
|
||||
var widget_event = new Event('load-widget');
|
||||
document.dispatchEvent(widget_event);
|
||||
// because we remove the element the JS runs in
|
||||
// so we need to run it again here
|
||||
|
||||
{% block widget_options %}
|
||||
gs-w="5" gs-h="15"
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Drilldown
|
||||
{% endblock %}
|
||||
|
||||
{% block panel_content %}
|
||||
{% include 'window-content/drilldown.html' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block custom_script_end %}
|
||||
initTabs("{{ unique }}");
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,58 +1,54 @@
|
||||
{% extends 'wm/widget.html' %}
|
||||
{% load static %}
|
||||
|
||||
<div id="drilldown-widget">
|
||||
<div id="drilldown-widget-results" class="grid-stack-item" gs-w="10" gs-h="30" gs-y="10" gs-x="1">
|
||||
<div class="grid-stack-item-content">
|
||||
<div class="panel">
|
||||
<p class="panel-heading" style="padding: .2em; line-height: .5em;">
|
||||
<i class="fa-solid fa-arrows-up-down-left-right has-text-grey-light ui-move"></i>
|
||||
<i
|
||||
class="fa-solid fa-xmark has-text-grey-light ui-close"
|
||||
onclick='grid.removeWidget("drilldown-widget-results"); //grid.compact();'></i>
|
||||
Results
|
||||
</p>
|
||||
<div class="panel-block is-active">
|
||||
<div class="control">
|
||||
<script src="{% static 'js/column-shifter.js' %}"></script>
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="{{ card }} hits total">
|
||||
<i class="fa-solid fa-chart-mixed"></i>
|
||||
</span>
|
||||
|
||||
{{ table.data|length }} hits in {{ took }}ms
|
||||
{% if exemption is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="God mode">
|
||||
<i class="fa-solid fa-book-bible"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
{% if redacted is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="{{ redacted }} redacted">
|
||||
<i class="fa-solid fa-mask"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if delay is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="delayed by {{ delay }} days">
|
||||
<i class="fa-solid fa-clock"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if randomised is True %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="integer fields randomised">
|
||||
<i class="fa-solid fa-shuffle"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% include 'ui/drilldown/table_results_partial.html' %}
|
||||
{% include 'ui/drilldown/sentiment_partial.html' %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block widget_options %}
|
||||
gs-w="10" gs-h="30" gs-y="10" gs-x="1"
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
{% block heading %}
|
||||
Results
|
||||
{% endblock %}
|
||||
|
||||
{% block close_button %}
|
||||
<i
|
||||
class="fa-solid fa-xmark has-text-grey-light ui-close"
|
||||
onclick='grid.removeWidget("drilldown-widget-{{ unique }}"); //grid.compact();'></i>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel_content %}
|
||||
<script src="{% static 'js/column-shifter.js' %}"></script>
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="{{ card }} hits total">
|
||||
<i class="fa-solid fa-chart-mixed"></i>
|
||||
</span>
|
||||
|
||||
{{ table.data|length }} hits in {{ took }}ms
|
||||
{% if exemption is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="God mode">
|
||||
<i class="fa-solid fa-book-bible"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
{% if redacted is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="{{ redacted }} redacted">
|
||||
<i class="fa-solid fa-mask"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if delay is not None %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="delayed by {{ delay }} days">
|
||||
<i class="fa-solid fa-clock"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if randomised is True %}
|
||||
<span class="icon has-tooltip-bottom" data-tooltip="integer fields randomised">
|
||||
<i class="fa-solid fa-shuffle"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% include 'ui/drilldown/table_results_partial.html' %}
|
||||
{% include 'ui/drilldown/sentiment_partial.html' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block custom_script %}
|
||||
grid.removeWidget("drilldown-widget-results");
|
||||
var widget_event = new Event('load-widget');
|
||||
document.dispatchEvent(widget_event);
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user