Replace counter-arguments with possible answers and unify search inputs.
Models, AI assistant, and UI now show diskussionsfertige Antworten without titles; shared search partial fixes aria-label rendering. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
{% else %}
|
||||
<div class="fk-claim-help">
|
||||
Neue Behauptung anlegen: zuerst Titel und Kurzantwort ausfüllen, dann speichern.
|
||||
Nachweise, Quellen und Gegenargumente können danach ergänzt werden.
|
||||
Nachweise, Quellen und mögliche Antworten können danach ergänzt werden.
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
</div>
|
||||
|
||||
<div class="field-box">
|
||||
<label for="{{ form.counter_arguments_json.id_for_label }}">{{ form.counter_arguments_json.label }}</label>
|
||||
{{ form.counter_arguments_json }}
|
||||
<label for="{{ form.possible_answers_json.id_for_label }}">{{ form.possible_answers_json.label }}</label>
|
||||
{{ form.possible_answers_json }}
|
||||
</div>
|
||||
|
||||
<div class="actions-bar">
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="get" class="row g-2 mb-4" data-live-search data-live-target="#category-results">
|
||||
<form method="get" class="row g-2 mb-4 fk-search-form" data-live-search data-live-target="#category-results">
|
||||
<div class="col-12 col-sm">
|
||||
<input type="search" id="q" name="q" class="form-control form-control-sm" placeholder="Suchen…" value="{{ query }}" autocomplete="off">
|
||||
{% include "claims/partials/search_input.html" with value=query aria_label="Behauptungen durchsuchen" %}
|
||||
</div>
|
||||
<div class="col-12 col-sm-auto">
|
||||
<select id="status" name="status" class="form-select form-select-sm">
|
||||
<select id="status" name="status" class="form-select fk-search-filter">
|
||||
<option value="">Alle Status</option>
|
||||
{% for value, label in status_choices %}
|
||||
<option value="{{ value }}"{% if status == value %} selected{% endif %}>{{ label }}</option>
|
||||
|
||||
@@ -89,24 +89,13 @@
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if claim.counter_arguments.all %}
|
||||
{% if claim.possible_answers.all %}
|
||||
<section class="fk-section">
|
||||
<p class="fk-section-label">Gegenargumente</p>
|
||||
<div class="accordion fk-accordion" id="counterArgs">
|
||||
{% for ca in claim.counter_arguments.all %}
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed py-2 small" type="button"
|
||||
data-bs-toggle="collapse" data-bs-target="#collapse{{ forloop.counter }}">
|
||||
{{ ca.argument }}
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapse{{ forloop.counter }}" class="accordion-collapse collapse"
|
||||
data-bs-parent="#counterArgs">
|
||||
<div class="accordion-body py-2">
|
||||
{{ ca.response|linebreaks }}
|
||||
</div>
|
||||
</div>
|
||||
<p class="fk-section-label">Mögliche Antworten</p>
|
||||
<div class="d-flex flex-column gap-2">
|
||||
{% for item in claim.possible_answers.all %}
|
||||
<div class="fk-card fk-section-body">
|
||||
{{ item.answer|linebreaks }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -6,10 +6,7 @@
|
||||
<header class="mb-4">
|
||||
<h1 class="fk-page-title">Themen</h1>
|
||||
<form method="get" action="{% url 'claims:home' %}" class="mb-2" data-live-search data-live-target="#home-results">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text border-end-0"><i class="bi bi-search"></i></span>
|
||||
<input type="search" name="q" class="form-control border-start-0 ps-0" placeholder="Suchen…" value="{{ query }}" aria-label="Kategorien durchsuchen" autocomplete="off">
|
||||
</div>
|
||||
{% include "claims/partials/search_input.html" with value=query aria_label="Kategorien durchsuchen" %}
|
||||
</form>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<a href="{% url 'claims:search' %}" class="small text-muted text-decoration-none">Alle Behauptungen</a>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="input-group fk-search">
|
||||
<span class="input-group-text border-end-0"><i class="bi bi-search" aria-hidden="true"></i></span>
|
||||
<input type="search"
|
||||
name="{{ name|default:'q' }}"
|
||||
{% if id %}id="{{ id }}"{% else %}id="q"{% endif %}
|
||||
class="form-control fk-search-input border-start-0 ps-0"
|
||||
placeholder="{{ placeholder|default:'Suchen…' }}"
|
||||
value="{{ value|default:'' }}"
|
||||
{% if autofocus %}autofocus{% endif %}
|
||||
autocomplete="off"
|
||||
aria-label="{% firstof aria_label placeholder 'Suchen' %}">
|
||||
</div>
|
||||
@@ -5,13 +5,12 @@
|
||||
{% block content %}
|
||||
<h1 class="fk-page-title">Suche</h1>
|
||||
|
||||
<form method="get" action="{% url 'claims:search' %}" class="row g-2 mb-4" data-live-search data-live-target="#search-results">
|
||||
<form method="get" action="{% url 'claims:search' %}" class="row g-2 mb-4 fk-search-form" data-live-search data-live-target="#search-results">
|
||||
<div class="col-12">
|
||||
<input type="search" id="q" name="q" class="form-control form-control-sm"
|
||||
placeholder="Behauptung suchen…" value="{{ query }}" autofocus autocomplete="off">
|
||||
{% include "claims/partials/search_input.html" with value=query placeholder="Behauptung suchen…" autofocus=True aria_label="Behauptung suchen" %}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="kategorie" name="kategorie" class="form-select form-select-sm">
|
||||
<select id="kategorie" name="kategorie" class="form-select fk-search-filter">
|
||||
<option value="">Alle Themen</option>
|
||||
{% for cat in categories %}
|
||||
<option value="{{ cat.slug }}"{% if category_slug == cat.slug %} selected{% endif %}>{{ cat.name }}</option>
|
||||
@@ -19,7 +18,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="status" name="status" class="form-select form-select-sm">
|
||||
<select id="status" name="status" class="form-select fk-search-filter">
|
||||
<option value="">Alle Status</option>
|
||||
{% for value, label in status_choices %}
|
||||
<option value="{{ value }}"{% if status == value %} selected{% endif %}>{{ label }}</option>
|
||||
|
||||
Reference in New Issue
Block a user