forked from indico/indico
/
survey_list.html
68 lines (66 loc) · 2.99 KB
/
survey_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% extends 'events/display/conference/base.html' if event.type == 'conference' else 'layout/meeting_page_base.html' %}
{% block title %}
{{- page_title -}}
{% endblock %}
{% block content %}
<table id="survey-list" class="i-table-widget">
<thead>
<tr>
<th>{% trans %}Survey{% endtrans %}</th>
<th>{% trans %}Available from{% endtrans %}</th>
<th>{% trans %}Deadline{% endtrans %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for survey in surveys %}
<tr>
<td>
{% if event.can_manage(session.user, 'surveys') %}
<a href="{{ url_for('.manage_survey', survey) }}">{{ survey.title }}</a>
{% else %}
{{ survey.title }}
{% endif %}
</td>
<td>{{ survey.start_dt | format_datetime(timezone=event.display_tzinfo) if survey.start_dt else _('Not started') }}</td>
<td>{{ survey.end_dt | format_datetime(timezone=event.display_tzinfo) if survey.end_dt else _('No deadline') }}</td>
<td class="survey-actions">
{% if was_survey_submitted(survey) %}
<a class="i-button highlight disabled"
title="{% trans %}Survey already filled out{% endtrans %}">
{%- trans %}Fill out{% endtrans -%}
</a>
{% elif not survey.is_active %}
<a class="i-button highlight disabled"
title="{% trans %}Survey is closed{% endtrans %}">
{%- trans %}Fill out{% endtrans -%}
</a>
{% elif is_submission_in_progress(survey) %}
<a href="{{ url_for('.display_survey_form', survey) }}"
class="i-button text-color highlight outline">
{%- trans %}Continue{% endtrans -%}
</a>
{% else %}
<a href="{{ url_for('.display_survey_form', survey) }}" class="i-button highlight">
{%- trans %}Fill out{% endtrans -%}
</a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="4">
{%- trans %}No surveys available for this event{% endtrans -%}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if event.type != 'conference' %}
<p>
<a href="{{ event.url }}" class="i-button">
{%- trans %}Back to the event{% endtrans -%}
</a>
</p>
{% endif %}
{% endblock %}