From f7cda73ddfdae0b23936333e2252c83f08022ca5 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 28 Aug 2022 20:26:15 +0100 Subject: [PATCH] Implement floating drilldown modals --- app/urls.py | 1 + core/templates/base.html | 24 ++- core/templates/modals/drilldown.html | 100 +--------- core/templates/panels/context.html | 114 +++++++++++ core/templates/panels/context_table.html | 177 ++++++++++++++++++ core/templates/panels/drilldown.html | 99 ++++++++++ core/templates/partials/magnet.html | 10 + core/templates/partials/panel.html | 17 ++ core/templates/ui/drilldown/drilldown.html | 2 + .../ui/drilldown/table_results_partial.html | 12 ++ core/templates/windows/drilldown.html | 9 + core/views/ui/drilldown.py | 4 +- 12 files changed, 470 insertions(+), 99 deletions(-) create mode 100644 core/templates/panels/context.html create mode 100644 core/templates/panels/context_table.html create mode 100644 core/templates/panels/drilldown.html create mode 100644 core/templates/partials/magnet.html create mode 100644 core/templates/partials/panel.html create mode 100644 core/templates/windows/drilldown.html diff --git a/app/urls.py b/app/urls.py index a9c599b..49552ba 100644 --- a/app/urls.py +++ b/app/urls.py @@ -95,6 +95,7 @@ urlpatterns = [ ## # path("drilldown/", Drilldown.as_view(), name="drilldown"), path("modal/", ThresholdInfoModal.as_view(), name="modal_drilldown"), + path("modal//", ThresholdInfoModal.as_view(), name="modal_drilldown"), path("context/", DrilldownContextModal.as_view(), name="modal_context"), path("context_table/", DrilldownContextModal.as_view(), name="modal_context_table"), ## diff --git a/core/templates/base.html b/core/templates/base.html index 73df687..14f217e 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -25,6 +25,7 @@ + #} - + \ No newline at end of file diff --git a/core/templates/panels/context.html b/core/templates/panels/context.html new file mode 100644 index 0000000..2db476c --- /dev/null +++ b/core/templates/panels/context.html @@ -0,0 +1,114 @@ +{% load index %} +{% load static %} + + + + + + + diff --git a/core/templates/panels/context_table.html b/core/templates/panels/context_table.html new file mode 100644 index 0000000..16dded2 --- /dev/null +++ b/core/templates/panels/context_table.html @@ -0,0 +1,177 @@ + + + \ No newline at end of file diff --git a/core/templates/panels/drilldown.html b/core/templates/panels/drilldown.html new file mode 100644 index 0000000..a93cbee --- /dev/null +++ b/core/templates/panels/drilldown.html @@ -0,0 +1,99 @@ +{% load index %} +{% load static %} + +
+
+

Channels for {{ nick }} on {{ net }}

+ {% for channel in chans %} + + + + + {{ channel }} + {% if nick in num_chans %} + + {{ num_users|index:channel }} + + {% endif %} + + {% endfor %} +
+
+

Users on {{ channel }} for {{ net }}

+ {% for user in users %} + + + + + {{ user }} + {% if channel in num_users %} + + {{ num_chans|index:user }} + + {% endif %} + + {% endfor %} +
+
+

Users sharing channels with {{ nick }} on {{ net }}

+ {% for user in inter_users %} + + + + + {{ user }} + {% if channel in num_users %} + + {{ num_chans|index:user }} + + {% endif %} + + {% endfor %} +
+
+

Channels sharing users with {{ channel }} on {{ net }}

+ {% for channel in inter_chans %} + + + + + {{ channel }} + {% if nick in num_chans %} + + {{ num_users|index:channel }} + + {% endif %} + + {% endfor %} +
+
+ diff --git a/core/templates/partials/magnet.html b/core/templates/partials/magnet.html new file mode 100644 index 0000000..baddf8f --- /dev/null +++ b/core/templates/partials/magnet.html @@ -0,0 +1,10 @@ + + {% extends 'partials/panel.html' %} + + {% block heading %} + {% endblock %} + + {% block panel_content %} + {% endblock %} + + \ No newline at end of file diff --git a/core/templates/partials/panel.html b/core/templates/partials/panel.html new file mode 100644 index 0000000..0fe0c75 --- /dev/null +++ b/core/templates/partials/panel.html @@ -0,0 +1,17 @@ + + diff --git a/core/templates/ui/drilldown/drilldown.html b/core/templates/ui/drilldown/drilldown.html index 9a0fce6..8b85ed0 100644 --- a/core/templates/ui/drilldown/drilldown.html +++ b/core/templates/ui/drilldown/drilldown.html @@ -88,6 +88,8 @@
+
+