Files
Sternsinger/CMBNet/templates/gruppen.html
T

152 lines
7.1 KiB
HTML

{% extends "base.html" %}
{% block title %}Gruppen View - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
{% block body_class %}mobile-page{% endblock %}
{% block head %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="manifest" href="{{ url_for('views.manifest', tenant=session.tenant_code) }}">
<meta name="theme-color" content="#2563eb">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="{{ APP_TITLE }}">
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/apple-touch-icon.png') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/pico.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/mobile.css') }}">
{% endblock %}
{% block logo %}{% endblock %}
{% block content %}
<div class="mobile-app">
<header class="mobile-header">
<div class="mobile-header-row">
<div class="mobile-group-name" id="groupNameDisplay">Gruppe</div>
<button type="button" id="mobileInstallBtn" class="mobile-icon-btn" aria-label="App installieren" title="App installieren" hidden>📲</button>
<button type="button" id="mobileLogout" class="mobile-icon-btn" aria-label="Abmelden" title="Abmelden">⏻</button>
</div>
</header>
<nav class="mobile-tabs" role="tablist">
<button type="button" class="mobile-tab active" data-tab="map" role="tab" aria-selected="true">Karte</button>
<button type="button" class="mobile-tab" data-tab="chat" role="tab" aria-selected="false">Chat</button>
</nav>
<main class="mobile-main">
<section id="tab-map" class="mobile-tab-panel active" role="tabpanel">
<div id="mobileMap" class="mobile-map"></div>
<button type="button" id="mobileSendPositionBtn" class="mobile-position-btn"
title="Eigenposition jetzt senden" aria-label="Eigenposition jetzt senden" hidden>Position senden</button>
<button type="button" id="mobileTodoBtn" class="mobile-fab" title="ToDo-Liste" aria-label="ToDo-Liste">📋</button>
<button type="button" id="mobileSettingsBtn" class="mobile-fab mobile-fab-secondary" title="Einstellungen" aria-label="Einstellungen">⚙</button>
<button type="button" id="mobileWorkBtn" class="mobile-work-btn" title="Straße bearbeiten" aria-label="Straße bearbeiten">Bearbeiten</button>
</section>
<section id="tab-chat" class="mobile-tab-panel" role="tabpanel">
<div id="mobileChatMessages" class="mobile-chat-messages"></div>
<form id="mobileChatForm" class="mobile-chat-form">
<input type="text" id="mobileChatInput" class="mobile-chat-input" placeholder="Nachricht senden ..." autocomplete="off">
<button type="submit" class="mobile-chat-send">Senden</button>
</form>
</section>
</main>
</div>
<dialog id="mobileStreetSelectDialog">
<article>
<header>
<h3>Zugeteilte Straßen</h3>
</header>
<div class="dialog-body">
<p class="mobile-dialog-hint">Wähle eine Straße aus, um sie auf der Karte zu bearbeiten.</p>
<ul id="mobileStreetList" class="mobile-street-list"></ul>
</div>
<footer>
<button type="button" class="secondary" onclick="closeMobileStreetSelect()">Schließen</button>
</footer>
</article>
</dialog>
<dialog id="mobileStreetStateDialog">
<article>
<header>
<h3 id="mobileStreetStateTitle">Straße bearbeiten</h3>
</header>
<div class="dialog-body">
<label>Status
<select id="mobileStreetStateSelect">
<option value="unbearbeitet">unbearbeitet</option>
<option value="zugewiesen">zugewiesen</option>
<option value="erledigt">erledigt</option>
</select>
</label>
<label id="mobileStreetGroupLabel">Gruppe
<select id="mobileStreetGroupSelect"></select>
</label>
</div>
<footer>
<button type="button" class="secondary" onclick="closeMobileStreetState()">Abbrechen</button>
<button type="button" onclick="saveMobileStreetState()">Speichern</button>
</footer>
</article>
</dialog>
<dialog id="mobileSettingsDialog">
<article>
<header>
<h3>Einstellungen</h3>
</header>
<div class="dialog-body">
<label>Opazität <output id="mobileOpacityValue">0.70</output>
<input id="mobileOpacitySlider" type="range" min="0" max="1" step="0.05" value="0.7">
</label>
<label>Linienbreite (m) <output id="mobileWeightValue">20 m</output>
<input id="mobileWeightSlider" type="range" min="1" max="100" step="1" value="20">
</label>
<label>Hintergrundkarte
<select id="mobileBaseLayerSelect">
<option value="osm">OpenStreetMap</option>
<option value="aerial">Luftbild</option>
</select>
</label>
<div class="mobile-settings-row">
<span>Eigenposition automatisch senden</span>
<input type="checkbox" id="mobileAutoPositionToggle" role="switch"
aria-label="Eigenposition automatisch senden" checked>
</div>
<p class="mobile-dialog-hint">
Ist die automatische Versendung deaktiviert, kann die Position
über den Button in der Karte einmalig gesendet werden.
</p>
<div class="mobile-settings-row">
<span>Benachrichtigungen</span>
<button type="button" id="mobileNotifyBtn" class="secondary mobile-settings-button">Aktivieren</button>
</div>
</div>
<footer>
<button type="button" onclick="closeMobileSettings()">Schließen</button>
</footer>
</article>
</dialog>
{% include "_pwa_install_dialog.html" %}
{% endblock %}
{% block scripts %}
<script>
window.CMBNET_TENANT = {{ session.tenant_code|tojson }};
window.CMBNET_ACCOUNT_ID = {{ session.account_id|tojson }};
window.CMBNET_ROLE = {{ session.role|tojson }};
window.CMBNET_LOGOUT_URL = {{ url_for('auth.logout', tenant=session.tenant_code)|tojson }};
window.CMBNET_SW_URL = {{ url_for('service_worker')|tojson }};
window.CMBNET_MANIFEST_URL = {{ url_for('views.manifest', tenant=session.tenant_code)|tojson }};
window.CMBNET_ICON_URL = {{ url_for('static', filename='img/icon-192.png')|tojson }};
window.CMBNET_VIEW_MODE = 'mobile_group';
</script>
<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
<script src="{{ url_for('static', filename='js/str2pl.js') }}"></script>
<script src="{{ url_for('static', filename='js/views/mobile.js') }}"></script>
{% endblock %}