Add Library filter to Stats
All checks were successful
/ release (push) Successful in 1m7s

This commit is contained in:
speatzle 2024-10-08 11:30:04 +02:00
parent 9d2519c085
commit 7d037be106
4 changed files with 58 additions and 21 deletions

View file

@ -1,5 +1,12 @@
{{template "head"}}
<h2>Stats</h2>
<label for="library">Library:</label>
<select id="library" name="library" onchange="setLibrary(this.value)" class="short-button">
<option {{if e .SelectedLibrary "" }} selected {{end}}value="">ALL</option>
{{range $l := .Libraries}}
<option {{if e .SelectedLibrary $l.ID }} selected {{end}}value="{{$l.ID}}">{{$l.Name}}</option>
{{end}}
</select>
<div class="stats">
{{range $c := .Charts}}
{{$c.Element}} {{$c.Script}}