2024-07-12 17:22:17 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
{% block content %}
|
2024-07-13 14:38:42 +02:00
|
|
|
<h3>Questions</h3>
|
2024-07-12 17:22:17 +02:00
|
|
|
<form action="/questions" method="get" id="search_q_form">
|
|
|
|
|
<div id="question-search-field" class="row mb-5 mt-5">
|
2024-07-13 10:19:49 +02:00
|
|
|
<div class="col-12 p-0">
|
|
|
|
|
<div class="form-group border rounded p-3 bg-secondary">
|
2024-07-12 17:22:17 +02:00
|
|
|
<div class="input-group">
|
2024-07-13 10:19:49 +02:00
|
|
|
{# {% csrf_token %} #}
|
2024-07-12 17:22:17 +02:00
|
|
|
<input type="text" name="term" class="form-control p-2 bg-light" placeholder="Search for ..." value="{{ request.GET.term }}" />
|
|
|
|
|
<span class="input-group-text">
|
|
|
|
|
<i class="fa fa-search" onclick="document.getElementById('search_q_form').submit();"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<div id="question-list" class="mt-2">
|
|
|
|
|
{% if items %}
|
|
|
|
|
<div class="row text-capitalize text-light bg-secondary border rounded p-2">
|
|
|
|
|
<div class="col-1">#</div>
|
|
|
|
|
<div class="col-3">Name</div>
|
|
|
|
|
<div class="col-3">Question</div>
|
|
|
|
|
<div class="col-1">Files</div>
|
|
|
|
|
<div class="col-1">Labels</div>
|
2024-07-13 14:38:42 +02:00
|
|
|
<div class="col-1"><i class="fa fa-download"></i></div>
|
2024-07-12 17:22:17 +02:00
|
|
|
</div>
|
|
|
|
|
{% for q in items %}
|
|
|
|
|
<div class="row p-2">
|
|
|
|
|
<div class="col-1">{{ q.id }}</div>
|
|
|
|
|
<div class="col-3">{{ q.name }}</div>
|
|
|
|
|
<div class="col-3">{{ q.question }}</div>
|
|
|
|
|
<div class="col-1">{{ q.medias.all | length }}</div>
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
{% for l in q.labels.all %}
|
|
|
|
|
{{ l.name }}
|
|
|
|
|
{% if not forloop.last %},{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
2024-07-13 14:38:42 +02:00
|
|
|
<div class="col-1">
|
|
|
|
|
<a href="/questions/{{ q.id }}/csv" target="_blank">CSV</a>
|
|
|
|
|
</div>
|
2024-07-12 17:22:17 +02:00
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|