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

solve common breadcrumbs through inheritance

parent c27193a1
Branches
No related tags found
1 merge request!8New features
Showing
with 90 additions and 70 deletions
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
{% block title %}{% trans "AKs" %}: {{ ak.event.name }} - {% trans "AK" %}: {{ ak.name }}{% endblock %} {% block title %}{% trans "AKs" %}: {{ ak.event.name }} - {% trans "AK" %}: {{ ak.name }}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ ak.event.slug }}</li> <li class="breadcrumb-item"><a
<li class="breadcrumb-item"><a href="{% url 'submit:submission_overview' event_slug=ak.event.slug %}">{% trans "AK Submission" %}</a></li> href="{% url 'submit:submission_overview' event_slug=ak.event.slug %}">{% trans "AK Submission" %}</a></li>
<li class="breadcrumb-item active">{{ ak.name }}</li> <li class="breadcrumb-item active">{{ ak.name }}</li>
{% endblock %} {% endblock %}
...@@ -19,15 +19,19 @@ ...@@ -19,15 +19,19 @@
<div class="float-right"> <div class="float-right">
{% 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=ak.event.slug pk=ak.pk %}" class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a> <a href="{% url 'submit:ak_edit' event_slug=ak.event.slug pk=ak.pk %}"
class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a>
</div> </div>
<h2>{% if ak.wish %}{% trans "AK Wish" %}: {% endif %}{{ ak.name }}</h2> <h2>{% if ak.wish %}{% trans "AK Wish" %}: {% endif %}{{ ak.name }}</h2>
<table class="table table-borderless"> <table class="table table-borderless">
<tr><td>{% trans "Who?" %}</td><td>{{ ak.owners_list }}</td></tr> <tr>
<td>{% trans "Who?" %}</td>
<td>{{ ak.owners_list }}</td>
</tr>
<tr> <tr>
<td>{% trans 'Category' %}</td> <td>{% trans 'Category' %}</td>
<td> <td>
...@@ -58,32 +62,35 @@ ...@@ -58,32 +62,35 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>{% trans "When?" %}</th> <th>{% trans "When?" %}</th>
<th>{% trans "Duration" %}</th> <th>{% trans "Duration" %}</th>
<th>{% trans "Room" %}</th> <th>{% trans "Room" %}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for slot in ak.akslot_set.all %} {% for slot in ak.akslot_set.all %}
<tr> <tr>
<td>{{ slot.start_simplified }}</td> <td>{{ slot.start_simplified }}</td>
<td>{{ slot.duration }}</td> <td>{{ slot.duration }}</td>
<td>{{ slot.room }}</td> <td>{{ slot.room }}</td>
<td> <td>
{% if not slot.start %} {% if not slot.start %}
<a href="{% url 'submit:akslot_edit' event_slug=ak.event.slug pk=slot.pk %}" class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a> <a href="{% url 'submit:akslot_edit' event_slug=ak.event.slug pk=slot.pk %}"
<a href="{% url 'submit:akslot_delete' event_slug=ak.event.slug pk=slot.pk %}" class="btn btn-danger">{% fontawesome_icon 'times' %}</a> class="btn btn-success">{% fontawesome_icon 'pencil-alt' %}</a>
{% endif %} <a href="{% url 'submit:akslot_delete' event_slug=ak.event.slug pk=slot.pk %}"
</td> class="btn btn-danger">{% fontawesome_icon 'times' %}</a>
</tr> {% endif %}
{% endfor %} </td>
</tr>
{% endfor %}
</tbody> </tbody>
</table> </table>
<div class=""> <div class="">
<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> <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>
</div> </div>
{% endblock %} {% endblock %}
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "Edit AK" %}: {{ ak.name }}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "Edit AK" %}: {{ ak.name }}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<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 href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li>
<li class="breadcrumb-item active">{% trans "Edit" %}</li> <li class="breadcrumb-item active">{% trans "Edit" %}</li>
{% endblock %} {% endblock %}
......
...@@ -8,18 +8,18 @@ ...@@ -8,18 +8,18 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AKs" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AKs" %}{% endblock %}
{% block imports %} {% block imports %}
<style> <style>
/* Prevent wrapping of buttons in AK table */ /* Prevent wrapping of buttons in AK table */
.table td:nth-child(5) { .table td:nth-child(5) {
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
{% endblock %} {% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li> <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 active">{% trans "AKs" %}</li> <li class="breadcrumb-item active">{% trans "AKs" %}</li>
{% endblock %} {% endblock %}
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Owner" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Owner" %}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<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 active">{% trans "AK Owner" %}</li> <li class="breadcrumb-item active">{% trans "AK Owner" %}</li>
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<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 href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ 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 %}
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Duration(s)" %}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<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 href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ ak.short_name }}</a></li> <li class="breadcrumb-item"><a
href="{% url 'submit:ak_detail' event_slug=event.slug pk=ak.pk %}">{{ 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 %}
...@@ -27,8 +27,14 @@ ...@@ -27,8 +27,14 @@
<table class="table"> <table class="table">
<tbody> <tbody>
<tr><td>{% trans "AK" %}</td><td>{{ akslot.ak }}</td></tr> <tr>
<tr><td>{% trans "Duration" %}</td><td>{{ akslot.duration }}</td></tr> <td>{% trans "AK" %}</td>
<td>{{ akslot.ak }}</td>
</tr>
<tr>
<td>{% trans "Duration" %}</td>
<td>{{ akslot.duration }}</td>
</tr>
</tbody> </tbody>
</table> </table>
{% buttons %} {% buttons %}
......
...@@ -3,8 +3,14 @@ ...@@ -3,8 +3,14 @@
{% load fontawesome %} {% load fontawesome %}
{% load i18n %} {% load i18n %}
{% block breadcrumbs %}
{% include "AKSubmission/submission_breadcrumbs.html" %}
{% endblock %}
{% block footer_custom %} {% block footer_custom %}
{% if event.contact_email %} {% if event.contact_email %}
<h4><a href="mailto://{{ event.contact_email }}">{% fontawesome_icon "envelope" %} {% trans "Write to organizers of this event for questions and comments" %}</a></h4> <h4>
<a href="mailto://{{ event.contact_email }}">{% fontawesome_icon "envelope" %} {% trans "Write to organizers of this event for questions and comments" %}</a>
</h4>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
<li class="breadcrumb-item">AKPlanning</li>
<li class="breadcrumb-item">{{ event.slug }}</li>
...@@ -6,17 +6,16 @@ ...@@ -6,17 +6,16 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %}
{% block imports %} {% block imports %}
<style> <style>
/* Prevent wrapping of buttons in AK table */ /* Prevent wrapping of buttons in AK table */
.table td:nth-child(5) { .table td:nth-child(5) {
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
{% endblock %} {% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<li class="breadcrumb-item active">{% trans "AK Submission" %}</li> <li class="breadcrumb-item active">{% trans "AK Submission" %}</li>
{% endblock %} {% endblock %}
...@@ -30,7 +29,7 @@ ...@@ -30,7 +29,7 @@
<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 %}
<a href="{% url 'submit:submit_ak_wish' event_slug=event.slug %}" class="btn btn-info"> <a href="{% url 'submit:submit_ak_wish' event_slug=event.slug %}" class="btn btn-info">
{% trans "New AK Wish" %} {% trans "New AK Wish" %}
</a> </a>
<span style="font-size: 1.5em"> <span style="font-size: 1.5em">
...@@ -67,9 +66,10 @@ ...@@ -67,9 +66,10 @@
<ul class="nav nav-tabs" style="margin-bottom:15px"> <ul class="nav nav-tabs" style="margin-bottom:15px">
{% for category, _ in categories %} {% for category, _ in categories %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link {% if forloop.first %}active{% endif %}" data-toggle="tab" href="#category_{{ category.pk }}">{{ category.name }}</a> <a class="nav-link {% if forloop.first %}active{% endif %}" data-toggle="tab"
</li> href="#category_{{ category.pk }}">{{ category.name }}</a>
</li>
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
{% endblock %} {% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li>
<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 href="{% url 'submit:akowner_edit' event_slug=event.slug slug=owner.slug %}">{{ owner.slug }}</a></li> <li class="breadcrumb-item"><a
href="{% url 'submit:akowner_edit' event_slug=event.slug slug=owner.slug %}">{{ owner.slug }}</a></li>
<li class="breadcrumb-item active">{% trans "New AK" %}</li> <li class="breadcrumb-item active">{% trans "New AK" %}</li>
{% endblock %} {% endblock %}
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
{% block bottom_script %} {% block bottom_script %}
<script src="{% static 'common/vendor/chosen-js/chosen.jquery.js' %}"></script> <script src="{% static 'common/vendor/chosen-js/chosen.jquery.js' %}"></script>
<script> <script>
$(function() { $(function () {
$('.chosen-select').chosen(); $('.chosen-select').chosen();
}); });
</script> </script>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
{% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK Wish" %}{% endblock %} {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "New AK Wish" %}{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class="breadcrumb-item">AKPlanning</li> {% include "AKSubmission/submission_breadcrumbs.html" %}
<li class="breadcrumb-item">{{ event.slug }}</li> <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 active">{% trans "New AK Wish" %}</li> <li class="breadcrumb-item active">{% trans "New AK Wish" %}</li>
{% endblock %} {% endblock %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment