mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-28 18:22:05 +00:00
Replace pages' use of the options call with directly building the HTML components using templates, as the syntax is much nicer. Use a common set of data provided to all modules via pagetemplate.py instead of passing things like web_ui_options around. Closes #153
This commit is contained in:
+18
-16
@@ -7,45 +7,47 @@
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="d-inline-flex gap-1">
|
||||
{% module Template("widgets/filters_display_data_buttons.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("widgets/filters_display_data_buttons.html") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="filters-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/filters_area_header.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("widgets/filters_area_header.html") %}
|
||||
<div class="card-body">
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
<div class="col">
|
||||
{% module Template("cards/dx_continent.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/dx_continent.html") %}
|
||||
<div class="mt-4"></div>
|
||||
{% module Template("cards/duration_limit_alerts.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/duration_limit_alerts.html") %}
|
||||
</div>
|
||||
<div class="col">
|
||||
{% module Template("cards/activities.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/activities.html",
|
||||
activities=[a for a in options["activities"] if a.alerts_possible], include_general_dx=False) %}
|
||||
</div>
|
||||
<div class="col">
|
||||
{% module Template("cards/sources.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/sources.html",
|
||||
sources=options["alert_providers"], sources_enabled_by_default=options["alert_providers"]) %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="display-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/display_area_header.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("widgets/display_area_header.html") %}
|
||||
<div class="card-body">
|
||||
<div id="display-container" class="row row-cols-1 row-cols-md-4 g-4">
|
||||
<div class="col">
|
||||
{% module Template("cards/time_zone.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/time_zone.html") %}
|
||||
</div>
|
||||
<div class="col">
|
||||
{% module Template("cards/number_of_alerts.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/number_of_alerts.html") %}
|
||||
</div>
|
||||
<div class="col">
|
||||
{% module Template("cards/color_scheme.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/color_scheme.html") %}
|
||||
</div>
|
||||
<div class="col">
|
||||
{% module Template("cards/table_columns_alerts.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/table_columns_alerts.html") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,21 +55,21 @@
|
||||
|
||||
{% if web_ui_options["qrz_enabled"] or web_ui_options["hamqth_enabled"] %}
|
||||
<div id="data-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/your_data_area_header.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("widgets/your_data_area_header.html") %}
|
||||
<div class="card-body">
|
||||
<div class="row row-cols-1 row-cols-md-4 g-4">
|
||||
{% if web_ui_options["qrz_enabled"] %}
|
||||
<div class="col">
|
||||
{% module Template("cards/qrz.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/qrz.html") %}
|
||||
</div>
|
||||
{% end %}
|
||||
{% if web_ui_options["hamqth_enabled"] %}
|
||||
<div class="col">
|
||||
{% module Template("cards/hamqth.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/hamqth.html") %}
|
||||
</div>
|
||||
{% end %}
|
||||
<div class="col">
|
||||
{% module Template("cards/wanted_calls.html", web_ui_options=web_ui_options) %}
|
||||
{% module Template("cards/wanted_calls.html") %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +87,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/alerts.js?v=1790344337"></script>
|
||||
<script src="/static/js/alerts.js?v=1790367751"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-alerts").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
Reference in New Issue
Block a user