bifroest/app/templates/hugin_import.html
2026-10-27 08:34:17 +01:00

39 lines
2.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Aus .hugin.yaml · {{ workspace.name }}{% endblock %}
{% block content %}
{% set wbase = '/workspaces/' ~ workspace.id %}
<div class="stack stack-sm">
<h1>Vorschlag aus .hugin.yaml</h1>
</div>
{% include "_flash.html" %}
<section class="card">
<div class="card-body stack">
<p class="text-sm text-muted">Pakete aus der Datei <code>.hugin.yaml</code> im Ziel-Branch der verbundenen Repositorys. Gewählte Einträge kommen in die Auswahl des Workspace; gelten erst nach <em>Abgleichen</em> und <em>Übernehmen</em>. Die Datei selbst bleibt unverändert, und spätere Änderungen daran wirken nicht von allein.</p>
{% if proposals %}
<form method="post" action="{{ wbase }}/hugin/import" class="stack">
<input type="hidden" name="_csrf" value="{{ p.csrf }}">
{% for pr in proposals %}
<div class="stack stack-sm">
<h2 class="text-base">Quelle <code>{{ pr.source }}</code></h2>
{% if pr.server and pr.server.rstrip('/') != (host.url if host else '') %}<p class="text-xs text-muted">Die Datei nennt den Server <code>{{ pr.server }}</code>; Bifröst nutzt <code>{{ host.url if host else '–' }}</code>.</p>{% endif %}
{% if pr.error %}<p class="text-sm text-danger">{{ pr.error }}</p>{% endif %}
{% for entry in pr.packages %}{% set pid = entry.split('@')[0] %}{% set spec = entry.split('@')[1] if '@' in entry else 'stable' %}
<label class="cluster text-sm">
<input type="checkbox" name="package" value="{{ entry }}" {% if chosen.get(pid) != spec %}checked{% endif %}>
<code>{{ pid }}</code> {{ spec }}
{% if chosen.get(pid) == spec %}<span class="badge badge-success">schon gewählt</span>{% elif pid in chosen %}<span class="badge badge-warning">gewählt als {{ chosen[pid] }}</span>{% endif %}
</label>
{% else %}{% if not pr.error %}<p class="text-muted text-sm">Keine Pakete eingetragen.</p>{% endif %}{% endfor %}
{% if pr.unsubscribed %}<p class="text-xs text-muted">Abbestellt (in Bifröst nicht übernommen): {{ pr.unsubscribed|join(', ') }}</p>{% endif %}
</div>
{% endfor %}
<div class="cluster">
<button class="btn btn-primary btn-sm" type="submit">In die Auswahl übernehmen</button>
<a class="btn btn-ghost btn-sm" href="{{ wbase }}/settings?tab=hugin">Zurück</a>
</div>
</form>
{% elif not error %}<p class="text-muted text-sm">In keinem verbundenen Repository gibt es eine <code>.hugin.yaml</code>.</p>
<p><a class="btn btn-ghost btn-sm" href="{{ wbase }}/settings?tab=hugin">Zurück</a></p>{% endif %}
</div>
</section>
{% endblock %}