Block A — Externe Links:
- projekt_datei.extern_url: eine "Datei" kann Upload (BLOB) ODER Link sein
- Link-Route /cockpit/projekt/<id>/link, Werkstatt-UI mit Link-Feld
- Katalog + Detail rendern Links als "Oeffnen ↗", Uploads als Download
- Upload-Limit 30 -> 60 MB (grosse Bambu-3MF); darueber: externer Link
Block B — Power-User-Rolle:
- profil.rolle ('schueler'|'power'); Login setzt Session-Rolle
- Decorator power_oder_admin; ist_power-Helper
- Login-Kacheln: Power mit 🔧 statt Tier; Admin-Profilanlage mit Rollen-Dropdown
(Tier nur bei schueler Pflicht, Power kriegt Platzhalter-Slug 'power')
- Cockpit: kein Check-In fuer Power, stattdessen "Power-Werkzeuge"-Karte
- Power-Projekt-Regeln: mehrere parallel erlaubt, Abschluss direkt 'freigegeben'
- Rechte power_oder_admin: Drucker-Verwaltung, Software-Katalog,
Slot-fuer-SuS, inline-edit (beschraenkt auf drucker+software_seite)
- Bleibt admin-only: SuS-Profile, Projekt-Freigaben, Admin-Dashboard
- Power-relevante Admin-Templates: Zurueck-Link rollenabhaengig (Cockpit statt Dashboard)
Block C — PAROL6-Demo:
- scripts/seed_demo_parol6.py: Power-Profil 'Herb' + PAROL6-Roboterarm-Projekt
- GitHub-Repo als Link, Bauanleitung-PDF als BLOB, Cover aus 3MF-Render
- abgeschlossen+freigegeben -> im Katalog, als Vorlage waehlbar
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
2.0 KiB
HTML
56 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Login — 3D-Druck-AG{% endblock %}
|
|
|
|
{% block content %}
|
|
<div style="text-align: center; margin-bottom: 1.5rem;">
|
|
<h1>Wer bist du?</h1>
|
|
<p style="color: var(--text-light);">Such dein Profil und klick drauf.</p>
|
|
</div>
|
|
|
|
{% if profile %}
|
|
<div class="grid" style="grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto;">
|
|
{% for p in profile %}
|
|
<a href="{{ url_for('profil.login_pin', profil_id=p.id) }}"
|
|
class="card profil-kachel{% if p.rolle == 'power' %} profil-power{% endif %}">
|
|
{% if p.rolle == 'power' %}
|
|
<div style="font-size: 3rem;">🔧</div>
|
|
<div style="font-weight: 600; margin-top: 0.3rem;">{{ p.vorname }}</div>
|
|
<div style="font-size: 0.8rem; color: var(--text-light);">Power-User</div>
|
|
{% else %}
|
|
<div style="font-size: 3rem;">{{ tier_emoji(p.tier) }}</div>
|
|
<div style="font-weight: 600; margin-top: 0.3rem;">{{ p.vorname }}</div>
|
|
<div style="font-size: 0.8rem; color: var(--text-light);">{{ tier_name(p.tier) }}</div>
|
|
{% endif %}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="card" style="max-width: 600px; margin: 2rem auto; text-align: center;">
|
|
<h2>Noch keine Profile angelegt</h2>
|
|
<p>Der Lehrer muss erst Profile anlegen. Sag Herb oder Herr Rechmann Bescheid.</p>
|
|
<p style="margin-top: 1rem;"><a href="{{ url_for('admin.admin_login') }}" class="btn btn-secondary">Admin-Login</a></p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<style>
|
|
.profil-kachel {
|
|
text-decoration: none;
|
|
color: inherit;
|
|
text-align: center;
|
|
padding: 1.5rem 0.8rem;
|
|
transition: transform 0.15s, box-shadow 0.15s;
|
|
cursor: pointer;
|
|
}
|
|
.profil-kachel:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 6px 20px rgba(0,0,0,0.12);
|
|
}
|
|
.profil-power {
|
|
border-color: var(--primary);
|
|
background: linear-gradient(180deg, #fff, #EBF5FB);
|
|
}
|
|
</style>
|
|
{% endblock %}
|