update
This commit is contained in:
62
AzA march 2026/intern_portal/templates/search.html
Normal file
62
AzA march 2026/intern_portal/templates/search.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{% extends "layout.html" %}
|
||||
{% set active = 'search' %}
|
||||
{% block page_title %}Suche – AzA Intern{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h2>Suche</h2>
|
||||
</div>
|
||||
|
||||
<form method="get" action="/search" class="search-bar">
|
||||
<input type="text" name="q" value="{{ query }}" placeholder="Aufgaben, Dateien, Dokumente, Notizen…" autofocus>
|
||||
<button type="submit" class="btn btn-primary">Suchen</button>
|
||||
</form>
|
||||
|
||||
{% if query %}
|
||||
<div class="grid-3">
|
||||
<div class="card">
|
||||
<h3>Dokumente ({{ results.documents|length }})</h3>
|
||||
{% if results.documents %}
|
||||
<ul style="list-style:none">
|
||||
{% for d in results.documents %}
|
||||
<li style="margin-bottom:0.5rem">
|
||||
<span class="tag">Dokument</span>
|
||||
<a href="/documents/{{ d.id }}">{{ d.title }}</a>
|
||||
<small>({{ d.category or '–' }})</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}<p class="empty-state">Keine Treffer.</p>{% endif %}
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Aufgaben ({{ results.tasks|length }})</h3>
|
||||
{% if results.tasks %}
|
||||
<ul style="list-style:none">
|
||||
{% for t in results.tasks %}
|
||||
<li style="margin-bottom:0.5rem"><a href="/tasks/{{ t.id }}">{{ t.title }}</a> <small>({{ t.status }})</small></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}<p class="empty-state">Keine Treffer.</p>{% endif %}
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Dateien ({{ results.files|length }})</h3>
|
||||
{% if results.files %}
|
||||
<ul style="list-style:none">
|
||||
{% for f in results.files %}
|
||||
<li style="margin-bottom:0.5rem"><a href="/files/{{ f.id }}/download">{{ f.original_filename }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}<p class="empty-state">Keine Treffer.</p>{% endif %}
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Notizen ({{ results.notes|length }})</h3>
|
||||
{% if results.notes %}
|
||||
<ul style="list-style:none">
|
||||
{% for n in results.notes %}
|
||||
<li style="margin-bottom:0.5rem"><a href="/notes/{{ n.id }}/edit">{{ n.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}<p class="empty-state">Keine Treffer.</p>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user