Skip to content
Snippets Groups Projects
Commit d5c3416b authored by N.Geisler & B. Hättasch's avatar N.Geisler & B. Hättasch
Browse files

hide edit links when event is not active

parent 55310a00
No related branches found
No related tags found
No related merge requests found
...@@ -222,6 +222,10 @@ msgstr "Neuer AK" ...@@ -222,6 +222,10 @@ msgstr "Neuer AK"
msgid "Edit Person Info" msgid "Edit Person Info"
msgstr "Personen-Info bearbeiten" msgstr "Personen-Info bearbeiten"
#: templates/AKSubmission/submission_overview.html:62
msgid "This event is not active. You cannot add or change AKs"
msgstr "Dieses Event is nicht aktiv. Es können keine AKs hinzugefügt oder bearbeitet werden"
#: templates/AKSubmission/submission_overview.html:53 #: templates/AKSubmission/submission_overview.html:53
msgid "Current AKs" msgid "Current AKs"
msgstr "Aktuelle AKs" msgstr "Aktuelle AKs"
......
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
{% if ak.link != "" %} {% if ak.link != "" %}
<a href="{{ ak.link }}" class="btn btn-info">{% fontawesome_icon 'external-link-alt' %}</a> <a href="{{ ak.link }}" class="btn btn-info">{% fontawesome_icon 'external-link-alt' %}</a>
{% endif %} {% endif %}
{% if ak.event.active %}
<a href="{% url 'submit:ak_edit' event_slug=ak.event.slug pk=ak.pk %}" <a href="{% url 'submit:ak_edit' event_slug=ak.event.slug pk=ak.pk %}"
class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a> class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a>
</div> {% endif %} </div>
<h2>{% if ak.wish %}{% trans "AK Wish" %}: {% endif %}{{ ak.name }}</h2> <h2>{% if ak.wish %}{% trans "AK Wish" %}: {% endif %}{{ ak.name }}</h2>
...@@ -88,9 +89,11 @@ ...@@ -88,9 +89,11 @@
</tbody> </tbody>
</table> </table>
{% if ak.event.active %}
<div class=""> <div class="">
<a href="{% url 'submit:akslot_add' event_slug=ak.event.slug pk=ak.pk %}" <a href="{% url 'submit:akslot_add' event_slug=ak.event.slug pk=ak.pk %}"
class="btn btn-success">{% fontawesome_icon 'plus' %} {% trans "Add another slot" %}</a> class="btn btn-success">{% fontawesome_icon 'plus' %} {% trans "Add another slot" %}</a>
</div> </div>
{% endif %}
{% endblock %} {% endblock %}
...@@ -19,10 +19,12 @@ ...@@ -19,10 +19,12 @@
<td> <td>
<b>{{ ak.name }}</b> <b>{{ ak.name }}</b>
{% if ak.present %} {% if ak.present %}
<span class="badge badge-dark badge-pill" title="{% trans 'present this AK' %}">{% fontawesome_icon "bullhorn" %}</span> <span class="badge badge-dark badge-pill"
title="{% trans 'present this AK' %}">{% fontawesome_icon "bullhorn" %}</span>
{% endif %} {% endif %}
{% if ak.reso %} {% if ak.reso %}
<span class="badge badge-dark badge-pill" title="{% trans 'Reso' %}">{% fontawesome_icon "scroll" %}</span> <span class="badge badge-dark badge-pill"
title="{% trans 'Reso' %}">{% fontawesome_icon "scroll" %}</span>
{% endif %} {% endif %}
</td> </td>
<td> <td>
...@@ -35,11 +37,15 @@ ...@@ -35,11 +37,15 @@
<td>{% category_linked_badge ak.category event.slug %}</td> <td>{% category_linked_badge ak.category event.slug %}</td>
<td>{% tag_list ak.tags.all event.slug %}</td> <td>{% tag_list ak.tags.all event.slug %}</td>
<td class="text-right"> <td class="text-right">
<a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" class="btn btn-primary">{% fontawesome_icon 'info' %}</a> <a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}"
class="btn btn-primary">{% fontawesome_icon 'info' %}</a>
{% if ak.link %} {% if ak.link %}
<a href="{{ ak.link }}" class="btn btn-info">{% fontawesome_icon 'external-link-alt' %}</a> <a href="{{ ak.link }}" class="btn btn-info">{% fontawesome_icon 'external-link-alt' %}</a>
{% endif %} {% endif %}
<a href="{% url 'submit:ak_edit' event_slug=event.slug pk=ak.pk %}" class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a> {% if event.active %}
<a href="{% url 'submit:ak_edit' event_slug=event.slug pk=ak.pk %}"
class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a>
{% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
{% blocktrans %}On this page you can see a list of current AKs, change them and add new ones.{% endblocktrans %} {% blocktrans %}On this page you can see a list of current AKs, change them and add new ones.{% endblocktrans %}
{% if event.active %}
<div class="jumbotron" style="margin-top:20px;"> <div class="jumbotron" style="margin-top:20px;">
<form method="POST" action="#" class="form-row"> <form method="POST" action="#" class="form-row">
{% csrf_token %} {% csrf_token %}
...@@ -56,7 +57,11 @@ ...@@ -56,7 +57,11 @@
/> />
</form> </form>
</div> </div>
{% else %}
<div class="alert alert-warning" style="margin-top:20px;margin-bottom: 20px;">
{% trans "This event is not active. You cannot add or change AKs" %}
</div>
{% endif %}
<h2>{% trans "Current AKs" %}</h2> <h2>{% trans "Current AKs" %}</h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment