Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • konstantin/akplanning
  • matedealer/akplanning
  • kif/akplanning
  • mirco/akplanning
  • lordofthevoid/akplanning
  • voidptr/akplanning
  • xayomer/akplanning-fork
  • mollux/akplanning
  • neumantm/akplanning
  • mmarx/akplanning
  • nerf/akplanning
  • felix_bonn/akplanning
  • sebastian.uschmann/akplanning
13 results
Select Git revision
Show changes
Showing
with 238 additions and 170 deletions
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
<script> <script>
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
data: { data: {
}, },
success: function (response) { success: function (response) {
btn.html('{% fa5_icon 'check' 'fas' %}'); btn.html('{% fa6_icon 'check' 'fas' %}');
btn.off('click'); btn.off('click');
}, },
error: function (response) { error: function (response) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% if forloop.counter0 > 0 %} {% if forloop.counter0 > 0 %}
,&nbsp; ,&nbsp;
{% endif %} {% endif %}
<a href="{% url 'submit:ak_detail' event_slug=slug pk=ak.pk %}">{{ ak }}</a> <a href="{{ ak.detail_url }}">{{ ak }}</a>
{% empty %} {% empty %}
- -
{% endfor %} {% endfor %}
{% load i18n %} {% load i18n %}
<div class="float-right"> <div class="float-end">
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'submit:ak_list' event_slug=event.slug %}">{% trans "All AKs" %}</a> <a class="nav-link" href="{% url 'submit:ak_list' event_slug=event.slug %}">{% trans "All AKs" %}</a>
</li> </li>
{% if event.aktrack_set.count > 0 %} {% if event.aktrack_set.count > 0 %}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Tracks" %}</a> aria-expanded="false">{% trans "Tracks" %}</a>
<div class="dropdown-menu" style=""> <div class="dropdown-menu" style="">
{% for track in event.aktrack_set.all %} {% for track in event.aktrack_set.all %}
...@@ -18,6 +18,19 @@ ...@@ -18,6 +18,19 @@
</div> </div>
</li> </li>
{% endif %} {% endif %}
{% if show_types %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{% trans "Types" %}</a>
<div class="dropdown-menu" style="">
{% for type in event.aktype_set.all %}
<a class="dropdown-item"
href="{% url 'submit:ak_list_by_type' event_slug=event.slug type_slug=type.slug %}">
{{ type }}</a>
{% endfor %}
</div>
</li>
{% endif %}
</ul> </ul>
</div> </div>
...@@ -30,7 +43,7 @@ ...@@ -30,7 +43,7 @@
<ul class="nav nav-tabs" style="margin-bottom:15px"> <ul class="nav nav-tabs" style="margin-bottom:15px">
{% for category, _ in categories_with_aks %} {% for category, _ in categories_with_aks %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link {% if category.name == active_category %}active{% endif %}" data-toggle="tab" <a class="nav-link {% if category.name == active_category %}active{% endif %}" data-bs-toggle="tab"
href="#category_{{ category.pk }}">{{ category.name }}</a> href="#category_{{ category.pk }}">{{ category.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
......
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tags_AKSubmission %} {% load tags_AKSubmission %}
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
{% endblock %} {% endblock %}
{% block imports %} {% block imports %}
<style>
/* Prevent wrapping of buttons in AK table */
.table td:nth-child(5) {
white-space: nowrap;
}
</style>
{% include "AKSubmission/ak_interest_script.html" %} {% include "AKSubmission/ak_interest_script.html" %}
{% endblock %} {% endblock %}
...@@ -32,8 +25,8 @@ ...@@ -32,8 +25,8 @@
{% block content %} {% block content %}
{% if event.active %} {% if event.active %}
<a class="btn btn-success float-right" href="{% url 'submit:submission_overview' event_slug=event.slug %}"> <a class="btn btn-success float-end" href="{% url 'submit:submission_overview' event_slug=event.slug %}">
{% fa5_icon 'plus' 'fas' %} {% trans "Add AK" %} {% fa6_icon 'plus' 'fas' %} {% trans "Add AK" %}
</a> </a>
{% endif %} {% endif %}
......
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load tags_AKSubmission %} {% load tags_AKSubmission %}
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<th>{% trans "Name" %}</th> <th>{% trans "Name" %}</th>
<th>{% trans "Who?" %}</th> <th>{% trans "Who?" %}</th>
<th>{% trans 'Category' %}</th> <th>{% trans 'Category' %}</th>
<th>{% trans "Tags" %}</th> {% if show_types %}
<th>{% trans 'Types' %}</th>
{% endif %}
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -17,45 +19,51 @@ ...@@ -17,45 +19,51 @@
{% for ak in AKs %} {% for ak in AKs %}
<tr> <tr>
<td> <td>
<a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" <a href="{{ ak.detail_url }}"
class="text-dark text-decoration-none font-weight-bold"> class="text-dark text-decoration-none font-weight-bold">
{{ ak.name }} {{ ak.name }}
</a> </a>
{% if ak.present %} {% if ak.present %}
<span class="badge badge-dark badge-pill" <span class="badge bg-dark rounded-pill"
title="{% trans 'Present results of this AK' %}">{% fa5_icon "bullhorn" 'fas' %}</span> title="{% trans 'Present results of this AK' %}">{% fa6_icon "bullhorn" 'fas' %}</span>
{% endif %} {% endif %}
{% if ak.reso %} {% if ak.reso %}
<span class="badge badge-dark badge-pill" <span class="badge bg-dark rounded-pill"
title="{% trans 'Intends to submit a resolution' %}">{% fa5_icon "scroll" 'fas' %}</span> title="{% trans 'Intends to submit a resolution' %}">{% fa6_icon "scroll" 'fas' %}</span>
{% endif %} {% endif %}
</td> </td>
<td> <td>
{% if ak.wish %} {% if ak.wish %}
<span class="badge badge-dark badge-pill">{% trans "AK Wish" %}</span> <span class="badge bg-dark rounded-pill">{% trans "AK Wish" %}</span>
{% else %} {% else %}
{% include "AKSubmission/owners_list.html" with owners=ak.owners %} {% include "AKSubmission/owners_list.html" with owners=ak.owners %}
{% endif %} {% endif %}
</td> </td>
<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> {% if show_types %}
<td class="text-right"> <td>
<a href="{% url 'submit:ak_detail' event_slug=ak.event.slug pk=ak.pk %}" data-toggle="tooltip" {% for aktype in ak.types.all %}
{% type_linked_badge aktype event.slug %}
{% endfor %}
</td>
{% endif %}
<td class="text-end" style="white-space: nowrap;">
<a href="{{ ak.detail_url }}" data-bs-toggle="tooltip"
title="{% trans 'Details' %}" title="{% trans 'Details' %}"
class="btn btn-primary">{% fa5_icon 'info' 'fas' %}</a> class="btn btn-primary">{% fa6_icon 'info' 'fas' %}</a>
{% if ak.link %} {% if ak.link %}
<a href="{{ ak.link }}" data-toggle="tooltip" <a href="{{ ak.link }}" data-bs-toggle="tooltip"
title="{% trans 'Open external link' %}" title="{% trans 'Open external link' %}"
class="btn btn-info">{% fa5_icon 'external-link-alt' 'fas' %}</a> class="btn btn-info">{% fa6_icon 'external-link-alt' 'fas' %}</a>
{% endif %} {% endif %}
{% if event.active %} {% if event.active %}
<a href="{% url 'submit:ak_edit' event_slug=event.slug pk=ak.pk %}" data-toggle="tooltip" <a href="{{ ak.edit_url }}" data-bs-toggle="tooltip"
title="{% trans 'Edit' %}" title="{% trans 'Edit' %}"
class="btn btn-success">{% fa5_icon 'pencil-alt' 'fas' %}</a> class="btn btn-success">{% fa6_icon 'pencil-alt' 'fas' %}</a>
{% if interest_indication_active %} {% if interest_indication_active %}
<span data-ak_id="{{ ak.pk }}" data-toggle="tooltip" <span data-ak_id="{{ ak.pk }}" data-bs-toggle="tooltip"
title="{% trans 'Show Interest' %}" title="{% trans 'Show Interest' %}"
class="btn btn-primary btn-interest" style="cursor: pointer">{% fa5_icon 'thumbs-up' 'fas' %}</span> class="btn btn-primary btn-interest" style="cursor: pointer">{% fa6_icon 'thumbs-up' 'fas' %}</span>
{% endif %} {% endif %}
{% endif %} {% endif %}
</td> </td>
......
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load bootstrap4 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% block title %}{% trans "AKs" %}: {{ event.name }} -
{% trans "Add confidential message to organizers" %}{% endblock %} {% trans "Add confidential message to organizers" %}{% endblock %}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li> href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li>
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> href="{{ ak.detail_url }}">{{ ak.short_name }}</a></li>
<li class="breadcrumb-item active">{% trans "Add confidential message to organizers" %}</li> <li class="breadcrumb-item active">{% trans "Add confidential message to organizers" %}</li>
{% endblock %} {% endblock %}
...@@ -23,18 +23,16 @@ ...@@ -23,18 +23,16 @@
{% endblock %} {% endblock %}
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{% bootstrap_form form %} {% bootstrap_form form %}
{% buttons %} <button type="submit" class="save btn btn-primary float-end">
<button type="submit" class="save btn btn-primary float-right"> {% fa6_icon "check" 'fas' %} {% trans "Send" %}
{% fa5_icon "check" 'fas' %} {% trans "Send" %} </button>
</button>
<button type="reset" class="btn btn-danger"> <button type="reset" class="btn btn-danger">
{% fa5_icon "undo-alt" 'fas' %} {% trans "Reset Form" %} {% fa6_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
</button> </button>
<a href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}" class="btn btn-secondary"> <a href="{{ ak.detail_url }}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
{% endbuttons %}
</form> </form>
{% endblock %} {% endblock %}
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load bootstrap4 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Owner" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Owner" %}{% endblock %}
...@@ -19,17 +19,15 @@ ...@@ -19,17 +19,15 @@
{% endblock %} {% endblock %}
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{% bootstrap_form form %} {% bootstrap_form form %}
{% buttons %} <button type="submit" class="save btn btn-primary float-end">
<button type="submit" class="save btn btn-primary float-right"> {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} </button>
</button> <button type="reset" class="btn btn-danger">
<button type="reset" class="btn btn-danger"> {% fa6_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
{% fa5_icon "undo-alt" 'fas' %} {% trans "Reset Form" %} </button>
</button>
<a href="{% url 'submit:submission_overview' event_slug=event.slug %}" class="btn btn-secondary"> <a href="{% url 'submit:submission_overview' event_slug=event.slug %}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
{% endbuttons %}
</form> </form>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load bootstrap4 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li> href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li>
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> href="{{ ak.detail_url }}">{{ ak.short_name }}</a></li>
<li class="breadcrumb-item active">{% trans "AK Duration(s)" %}</li> <li class="breadcrumb-item active">{% trans "AK Duration(s)" %}</li>
{% endblock %} {% endblock %}
...@@ -20,19 +20,17 @@ ...@@ -20,19 +20,17 @@
<h2>{% trans 'AK Duration(s)' %}</h2> <h2>{% trans 'AK Duration(s)' %}</h2>
{% endblock %} {% endblock %}
<form method="POST" class="post-form">{% csrf_token %} <form method="POST" class="post-form">{% csrf_token %}
{% bootstrap_form form %} {% bootstrap_form form %}
{% buttons %} <button type="submit" class="save btn btn-primary float-end">
<button type="submit" class="save btn btn-primary float-right"> {% fa6_icon "check" 'fas' %} {% trans "Continue" %}
{% fa5_icon "check" 'fas' %} {% trans "Continue" %} </button>
</button>
<button type="reset" class="btn btn-danger"> <button type="reset" class="btn btn-danger">
{% fa5_icon "undo-alt" 'fas' %} {% trans "Reset Form" %} {% fa6_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
</button> </button>
<a href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}" class="btn btn-secondary"> <a href="{{ ak.detail_url }}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
{% endbuttons %}
</form> </form>
{% endblock %} {% endblock %}
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load bootstrap4 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li> href="{% url 'submit:submission_overview' event_slug=event.slug %}">{% trans "AK Submission" %}</a></li>
<li class="breadcrumb-item"><a <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> href="{{ ak.detail_url }}">{{ ak.short_name }}</a></li>
<li class="breadcrumb-item active">{% trans "AK Duration(s)" %}</li> <li class="breadcrumb-item active">{% trans "AK Duration(s)" %}</li>
{% endblock %} {% endblock %}
...@@ -37,14 +37,12 @@ ...@@ -37,14 +37,12 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% buttons %} <button type="submit" class="save btn btn-danger float-end" value="Confirm">
<button type="submit" class="save btn btn-danger float-right" value="Confirm"> {% fa6_icon "check" 'fas' %} {% trans "Confirm" %}
{% fa5_icon "check" 'fas' %} {% trans "Confirm" %} </button>
</button>
<a href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}" class="btn btn-secondary"> <a href="{{ ak.detail_url }}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
{% endbuttons %}
</form> </form>
{% endblock %} {% endblock %}
<a href="{% url 'submit:ak_list_by_category' event_slug=event_slug category_pk=category.pk %}"> <a href="{% url 'submit:ak_list_by_category' event_slug=event_slug category_pk=category.pk %}">
<span class="badge badge-primary">{{ category }}</span> <span class="badge bg-primary">{{ category }}</span>
</a> </a>
{% extends "base.html" %} {% extends "base.html" %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load i18n %} {% load i18n %}
{% block breadcrumbs %} {% block breadcrumbs %}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
{% block footer_custom %} {% block footer_custom %}
{% if event.contact_email %} {% if event.contact_email %}
<h4> <h4>
<a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" 'fas' %} {% trans "Write to organizers of this event for questions and comments" %}</a> <a href="mailto:{{ event.contact_email }}">{% fa6_icon "envelope" 'fas' %} {% trans "Write to organizers of this event for questions and comments" %}</a>
</h4> </h4>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load static %} {% load static %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %}
......
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load static %} {% load static %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %}
...@@ -26,14 +26,13 @@ ...@@ -26,14 +26,13 @@
.select2-selection { .select2-selection {
height: 34px !important; height: 34px !important;
} }
.select2-container {
width: 300px!important;
}
</style> </style>
{% include "AKSubmission/ak_interest_script.html" %} {% include "AKSubmission/ak_interest_script.html" %}
{% if event.active %}
<link href="{% static 'common/vendor/select2/select2.min.css' %}" rel="stylesheet" />
<script src="{% static 'common/vendor/select2/select2.min.js' %}"></script>
{% endif %}
{% endblock %} {% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
...@@ -49,35 +48,37 @@ ...@@ -49,35 +48,37 @@
{% 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 %} {% if event.active %}
<div class="jumbotron" style="margin-top:20px;"> <div class="card bg-secondary mt-4 mb-4">
<form method="POST" action="#" class="form-row"> <div class="card-body">
{% csrf_token %} <form method="POST" action="#" class="form-row">
<a href="{% url 'submit:submit_ak_wish' event_slug=event.slug %}" class="btn btn-info"> {% csrf_token %}
{% trans "New AK Wish" %} <a href="{% url 'submit:submit_ak_wish' event_slug=event.slug %}" class="btn btn-info">
</a> {% trans "New AK Wish" %}
<span style="font-size: 1.5em"> </a>
&nbsp;&nbsp; | &nbsp; <span style="font-size: 1.5em">
<label for="selectOwnerId" class="align-middle d-inline">{% trans "Who" %}:</label> &nbsp;&nbsp; | &nbsp;
</span>&nbsp;&nbsp; <label for="selectOwnerId" class="align-middle d-inline">{% trans "Who" %}:</label>
<select name="owner_id" id="selectOwnerId" class=""> </span>&nbsp;&nbsp;
<option value="-1">{% trans "I do not own AKs yet" %}</option> <select name="owner_id" id="selectOwnerId" class="">
{% for owner in existingOwners %} <option value="-1">{% trans "I do not own AKs yet" %}</option>
<option value="{{ owner.pk }}">{{ owner }}</option> {% for owner in existingOwners %}
{% endfor %} <option value="{{ owner.pk }}">{{ owner }}</option>
</select> &nbsp;&nbsp; {% endfor %}
<input </select> &nbsp;&nbsp;
type="submit" <input
class="btn btn-primary" type="submit"
value="{% trans "New AK" %}" class="btn btn-primary"
formaction="{% url 'submit:akowner_select' event_slug=event.slug %}" value="{% trans "New AK" %}"
/>&nbsp;&nbsp; formaction="{% url 'submit:akowner_select' event_slug=event.slug %}"
<input />&nbsp;&nbsp;
type="submit" <input
class="btn btn-success" type="submit"
value="{% trans 'Edit Person Info' %}" class="btn btn-success"
formaction="{% url 'submit:akowner_edit_dispatch' event_slug=event.slug %}" value="{% trans 'Edit Person Info' %}"
/> formaction="{% url 'submit:akowner_edit_dispatch' event_slug=event.slug %}"
</form> />
</form>
</div>
</div> </div>
{% else %} {% else %}
<div class="alert alert-warning" style="margin-top:20px;margin-bottom: 20px;"> <div class="alert alert-warning" style="margin-top:20px;margin-bottom: 20px;">
......
{% extends 'AKSubmission/submission_base.html' %} {% extends 'AKSubmission/submission_base.html' %}
{% load i18n %} {% load i18n %}
{% load bootstrap4 %} {% load django_bootstrap5 %}
{% load fontawesome_5 %} {% load fontawesome_6 %}
{% load static %} {% load static %}
{% load tz %}
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK" %}{% endblock %}
{% block imports %} {% block imports %}
<link rel="stylesheet" href="{% static 'common/vendor/chosen-js/chosen.css' %}"> {% include "AKModel/load_fullcalendar_availabilities.html" %}
<link rel="stylesheet" href="{% static 'common/css/bootstrap-chosen.css' %}">
<link href='{% static 'AKSubmission/vendor/fullcalendar3/fullcalendar.min.css' %}' rel='stylesheet'/> <script>
<link href='{% static 'AKSubmission/css/availabilities.css' %}' rel='stylesheet'/> {% get_current_language as LANGUAGE_CODE %}
<script src="{% static "AKSubmission/vendor/moment/moment-with-locales.js" %}"></script> document.addEventListener('DOMContentLoaded', function () {
<script src="{% static "AKSubmission/vendor/moment-timezone/moment-timezone-with-data-10-year-range.js" %}"></script> createAvailabilityEditors(
<script src='{% static 'AKSubmission/vendor/fullcalendar3/fullcalendar.min.js' %}'></script> '{{ event.timezone }}',
<script src="{% static "common/js/availabilities.js" %}"></script> '{{ LANGUAGE_CODE }}',
'{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s" }}'
);
});
</script>
<style>
#id_present_helptext::after {
content: " ({% trans "only relevant for KIF-AKs - determines whether the AK appears in the slides for the closing plenary session" %})";
color: #6c757d;
}
</style>
{% endblock %} {% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
...@@ -34,22 +48,49 @@ ...@@ -34,22 +48,49 @@
{% block headline %} {% block headline %}
<h2>{% trans 'New AK' %}</h2> <h2>{% trans 'New AK' %}</h2>
{% endblock %} {% endblock %}
<form method="POST" class="post-form">{% csrf_token %} <div id="app">
{% bootstrap_form form %} <form method="POST" class="post-form" id="formAK" @submit.prevent="handleSubmit">{% csrf_token %}
{% buttons %} {% block form_contents %}
<button type="submit" class="save btn btn-primary float-right"> {% bootstrap_form form %}
{% fa5_icon "check" 'fas' %} {% trans "Submit" %} {% endblock %}
<button type="submit" class="save btn btn-primary float-end">
{% fa6_icon "check" 'fas' %} {% trans "Submit" %}
</button> </button>
<button type="reset" class="btn btn-danger"> <button type="reset" class="btn btn-danger">
{% fa5_icon "undo-alt" 'fas' %} {% trans "Reset Form" %} {% fa6_icon "undo-alt" 'fas' %} {% trans "Reset Form" %}
</button> </button>
<a href="{% url 'submit:submission_overview' event_slug=event.slug %}" class="btn btn-secondary"> <a href="{% url 'submit:submission_overview' event_slug=event.slug %}" class="btn btn-secondary">
{% fa5_icon "times" 'fas' %} {% trans "Cancel" %} {% fa6_icon "times" 'fas' %} {% trans "Cancel" %}
</a> </a>
{% endbuttons %} </form>
</form>
{# Modal for confirmation #}
<div class="modal fade" id="akWarningModal" tabindex="-1" aria-labelledby="akWarningModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="akWarningModalLabel">{% trans "Continue with that name?" %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Schließen"></button>
</div>
<div class="modal-body">
{% blocktrans %}
Your AK name (or short name) starts with or contains the word "AK".<br><br>
This is not recommended, as it makes the names longer, and may create an inconsistent style.
The tool will ensure that one always know that a title belongs to an AK even without that prefix.
<br><br>
Do you still want to use that name?
{% endblocktrans %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">{% trans "Change name" %}</button>
<button type="button" class="btn btn-warning" @click="proceedSubmit">{% trans "Proceed with saving" %}</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %} {% endblock %}
{% block bottom_script %} {% block bottom_script %}
......
...@@ -6,17 +6,6 @@ ...@@ -6,17 +6,6 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK Wish" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK Wish" %}{% endblock %}
{% block imports %}
<link rel="stylesheet" href="{% static 'common/vendor/chosen-js/chosen.css' %}">
<link rel="stylesheet" href="{% static 'common/css/bootstrap-chosen.css' %}">
<link href='{% static 'AKSubmission/vendor/fullcalendar3/fullcalendar.min.css' %}' rel='stylesheet'/>
<link href='{% static 'AKSubmission/css/availabilities.css' %}' rel='stylesheet'/>
<script src="{% static "AKSubmission/vendor/moment/moment-with-locales.js" %}"></script>
<script src="{% static "AKSubmission/vendor/moment-timezone/moment-timezone-with-data-10-year-range.js" %}"></script>
<script src='{% static 'AKSubmission/vendor/fullcalendar3/fullcalendar.min.js' %}'></script>
<script src="{% static "common/js/availabilities.js" %}"></script>
{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
{% include "AKSubmission/submission_breadcrumbs.html" %} {% include "AKSubmission/submission_breadcrumbs.html" %}
...@@ -27,4 +16,4 @@ ...@@ -27,4 +16,4 @@
{% block headline %} {% block headline %}
<h2>{% trans 'New AK Wish' %}</h2> <h2>{% trans 'New AK Wish' %}</h2>
{% endblock %} {% endblock %}
\ No newline at end of file
{% for tag in tags.all %}
<a href="{% url 'submit:ak_list_by_tag' event_slug=event_slug tag_pk=tag.pk %}"><span class="badge badge-info">{{ tag }}</span></a>
{% endfor %}
{% for track in tracks.all %} {% for track in tracks.all %}
<a href="{% url 'submit:ak_list_by_track' event_slug=event_slug track_pk=track.pk %}"><span <a href="{% url 'submit:ak_list_by_track' event_slug=event_slug track_pk=track.pk %}"><span
class="badge badge-info">{{ track }}</span></a> class="badge bg-info">{{ track }}</span></a>
{% endfor %} {% endfor %}
<a href="{% url 'submit:ak_list_by_type' event_slug=event_slug type_slug=type.slug %}">
<span class="badge bg-info">{{ type }}</span>
</a>
from django import template from django import template
from fontawesome_5.templatetags.fontawesome_5 import fa5_icon from fontawesome_6.templatetags.fontawesome_6 import fa6_icon
register = template.Library() register = template.Library()
@register.filter @register.filter
def bool_symbol(bool_val): def bool_symbol(bool_val):
"""
Show a nice icon instead of the string true/false
:param bool_val: boolean value to iconify
:return: check or times icon depending on the value
"""
if bool_val: if bool_val:
return fa5_icon("check", "fas") return fa6_icon("check", "fas")
return fa5_icon("times", "fas") return fa6_icon("times", "fas")
@register.inclusion_tag("AKSubmission/tags_list.html")
def tag_list(tags, event_slug):
return {"tags": tags, "event_slug": event_slug}
@register.inclusion_tag("AKSubmission/tracks_list.html") @register.inclusion_tag("AKSubmission/tracks_list.html")
def track_list(tracks, event_slug): def track_list(tracks, event_slug):
"""
Generate a clickable list of tracks (one badge per track) based upon the tracks_list template
:param tracks: tracks to consider
:param event_slug: slug of this event, required for link creation
:return: html fragment containing track links
"""
return {"tracks": tracks, "event_slug": event_slug} return {"tracks": tracks, "event_slug": event_slug}
@register.inclusion_tag("AKSubmission/category_list.html") @register.inclusion_tag("AKSubmission/category_list.html")
def category_list(categories, event_slug): def category_list(categories, event_slug):
"""
Generate a clickable list of categories (one badge per category) based upon the category_list template
:param categories: categories to consider
:param event_slug: slug of this event, required for link creation
:return: html fragment containing category links
"""
return {"categories": categories, "event_slug": event_slug} return {"categories": categories, "event_slug": event_slug}
@register.inclusion_tag("AKSubmission/category_linked_badge.html") @register.inclusion_tag("AKSubmission/category_linked_badge.html")
def category_linked_badge(category, event_slug): def category_linked_badge(category, event_slug):
"""
Generate a clickable category badge based upon the category_linked_badge template
:param category: category to show/link
:param event_slug: slug of this event, required for link creation
:return: html fragment containing badge
"""
return {"category": category, "event_slug": event_slug} return {"category": category, "event_slug": event_slug}
@register.inclusion_tag("AKSubmission/type_linked_badge.html")
def type_linked_badge(ak_type, event_slug):
"""
Generate a clickable type badge based upon the type_linked_badge template
:param ak_type: type to show/link
:param event_slug: slug of this event, required for link creation
:return: html fragment containing badge
"""
return {"type": ak_type, "event_slug": event_slug}