cloudlog/application/views/accumulate/component_results.php
Peter Goodhall d1446a6c22 Add HTMX component and refactor accumulated UI/JS
Introduce a new partial view and controller endpoint for rendering accumulated-results as an HTMX component, and refactor the accumulated statistics page and JS. Changes include: adding component_accumulated_results() in the Accumulated controller and a new view (accumulate/component_results.php) exposing filter params via data-attributes; updating accumulate/index.php to use a card-based layout, improved form markup, and HTMX attributes to load the results component; and a major rewrite of assets/js/sections/accumulatedstatistics.js to modularize logic (getAwardText, setAccumulateLoading, accumulateRender), improve loading/error handling, rebuild chart/table markup, update DataTables usage, and hook into htmx:afterSwap to render the chart when the component is swapped in. Overall this enables partial updates, better UX, and cleaner client-side code.
2026-04-26 22:05:52 +01:00

18 lines
847 B
PHP

<div class="card shadow-sm">
<div class="card-header d-flex align-items-center justify-content-between">
<h2 class="h5 mb-0">Results</h2>
<span class="badge text-bg-secondary rounded-pill">Updated</span>
</div>
<div class="card-body">
<div id="accumulateParams"
data-band="<?php echo htmlspecialchars($band, ENT_QUOTES, 'UTF-8'); ?>"
data-award="<?php echo htmlspecialchars($award, ENT_QUOTES, 'UTF-8'); ?>"
data-mode="<?php echo htmlspecialchars($mode, ENT_QUOTES, 'UTF-8'); ?>"
data-period="<?php echo htmlspecialchars($period, ENT_QUOTES, 'UTF-8'); ?>"></div>
<div id="accumulateContainer">
<canvas id="myChartAccumulate" width="400" height="150"></canvas>
<div id="accumulateTable"></div>
</div>
</div>
</div>