Add single-calc-button for individual players. Add settings modal-html.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<a class="btn btn-lg btn-outline-secondary text-secondary-emphasis" href="/logout" data-bs-toggle="tooltip" data-bs-title="Abmelden">
|
||||
<i class="bi bi-door-closed"></i>
|
||||
</a>
|
||||
<button class="btn btn-lg btn-outline-secondary text-secondary-emphasis">
|
||||
<button class="btn btn-lg btn-outline-secondary text-secondary-emphasis" data-bs-toggle="modal" data-bs-target="#settingsModal">
|
||||
<i class="bi bi-gear-fill me-2"></i>
|
||||
Einstellungen
|
||||
</button>
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
<!-- Edit Player Modal -->
|
||||
{{ template "edit_player" . }}
|
||||
|
||||
<!-- Settings Modal -->
|
||||
{{ template "settings" . }}
|
||||
|
||||
<script lang="javascript">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
loadClans();
|
||||
|
||||
47
templates/modals/settings.html
Normal file
47
templates/modals/settings.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{{ define "settings" }}
|
||||
|
||||
<div class="modal fade" id="settingsModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-3 text-primary fw-bold" id="settingsModalLabel">Persönliche Einstellungen</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<label class="col-form-label col-form-label-lg" for="games">Aktuelles Spiel:</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<select class="form-select form-select-lg" id="games">
|
||||
<!-- fill dynamically with available games -->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check form-check-inline mt-3 fs-5">
|
||||
<input class="form-check-input" type="checkbox" id="settingsSquadColors" value="squadColors" checked>
|
||||
<label class="form-check-label" for="settingsSquadColors">Squad-Farben aktivieren</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline mt-3 fs-5">
|
||||
<input class="form-check-input" type="checkbox" id="settingsCalcMedian" value="calcMedian">
|
||||
<label class="form-check-label" for="settingsCalcMedian">Median aktivieren</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline mt-3 fs-5">
|
||||
<input class="form-check-input" type="checkbox" id="settingsUseCache" value="useCache" checked>
|
||||
<label class="form-check-label" for="settingsUseCache">Infantryskill-Cache benutzen (empfohlen)</label>
|
||||
</div>
|
||||
<div class="error-message text-danger fs-5 badge" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="submit" class="btn btn-lg btn-primary">Speichern</button>
|
||||
<button type="button" class="btn btn-lg btn-secondary" data-bs-dismiss="modal">Abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script lang="javascript">
|
||||
// TBD
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
@@ -1,11 +1,14 @@
|
||||
<div class="input-group input-group-lg mb-1">
|
||||
<div class="input-group-text py-1 px-2">
|
||||
<input class="form-check-input fs-4 border-secondary mt-0" type="checkbox" value="" onchange="updateSelectedPlayers(this)" data-bs-toggle="tooltip" data-bs-title="In Berechnung einbeziehen">
|
||||
<input class="form-check-input fs-4 border-secondary mt-0" type="checkbox" value="" onchange="updateSelectedPlayers(this)">
|
||||
</div>
|
||||
<span class="form-control py-2 px-3 w-50">%s</span>
|
||||
<span class="form-control py-2 px-3" style="width: 10em">%s</span>
|
||||
<span class="form-control text-center px-1 text-secondary">
|
||||
<i class="bi bi-trophy me-2"></i>%s
|
||||
<i class="bi bi-trophy me-2 text-warning"></i>%s
|
||||
</span>
|
||||
<button type="button" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-calculator text-info"></i>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary text-secondary-emphasis dropdown-toggle py-1" type="button" data-bs-toggle="dropdown"></button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item text-primary fs-5" href="#" data-bs-toggle="modal" data-bs-id="%d" data-bs-target="#editPlayerModal">
|
||||
|
||||
Reference in New Issue
Block a user