Commit 9b1c76db by Félicie

button added

parent ec8cbb5a
Pipeline #1884 passed with stage
in 1 minute 30 seconds
...@@ -326,6 +326,13 @@ def manage_shift_registrations(request): ...@@ -326,6 +326,13 @@ def manage_shift_registrations(request):
'module': 'Membres'} 'module': 'Membres'}
return HttpResponse(template.render(context, request)) return HttpResponse(template.render(context, request))
def manage_regular_shifts(request):
""" Administration des créneaux des membres """
template = loader.get_template('members/admin/manage_regular_shifts.html')
context = {'title': 'BDM - Créneaux',
'module': 'Membres'}
return HttpResponse(template.render(context, request))
def get_makeups_members(request): def get_makeups_members(request):
""" Récupération des membres qui doivent faire des rattrapages """ """ Récupération des membres qui doivent faire des rattrapages """
res = CagetteMembers.get_makeups_members() res = CagetteMembers.get_makeups_members()
......
...@@ -16,7 +16,7 @@ $(document).ready(function() { ...@@ -16,7 +16,7 @@ $(document).ready(function() {
} else if (this.id == 'manage_leaves_button') { } else if (this.id == 'manage_leaves_button') {
console.log('coming soon...'); console.log('coming soon...');
} else if (this.id == 'manage_regular_shifts_button') { } else if (this.id == 'manage_regular_shifts_button') {
console.log('coming soon...'); window.location.assign(location + "/manage_regular_shifts");
} }
}); });
} else { } else {
......
...@@ -57,6 +57,7 @@ urlpatterns = [ ...@@ -57,6 +57,7 @@ urlpatterns = [
url(r'^admin/?$', admin.admin), url(r'^admin/?$', admin.admin),
url(r'^admin/manage_makeups$', admin.manage_makeups), url(r'^admin/manage_makeups$', admin.manage_makeups),
url(r'^admin/manage_shift_registrations$', admin.manage_shift_registrations), url(r'^admin/manage_shift_registrations$', admin.manage_shift_registrations),
url(r'^admin/manage_regular_shifts$', admin.manage_regular_shifts),
url(r'^get_makeups_members$', admin.get_makeups_members), url(r'^get_makeups_members$', admin.get_makeups_members),
url(r'^update_members_makeups$', admin.update_members_makeups), url(r'^update_members_makeups$', admin.update_members_makeups),
url(r'^delete_shift_registration$', admin.delete_shift_registration), url(r'^delete_shift_registration$', admin.delete_shift_registration),
......
...@@ -39,10 +39,9 @@ ...@@ -39,10 +39,9 @@
<span class="management_type_button_icons"><i class="fas fa-wrench"></i></span> <span class="management_type_button_icons"><i class="fas fa-wrench"></i></span>
{# <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> #} {# <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> #}
</button><br> </button><br>
<button type="button" class="btn--primary management_type_button" id="manage_regular_shifts_button" disabled> <button type="button" class="btn--primary management_type_button" id="manage_regular_shifts_button">
Gestion des créneaux Gestion des créneaux
<span class="management_type_button_icons"><i class="fas fa-wrench"></i></span> <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span>
{# <span class="management_type_button_icons"><i class="fas fa-arrow-right"></i></span> #}
</button><br> </button><br>
</div> </div>
</div> </div>
......
{% extends "base.html" %}
{% load static %}
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/datatables/datatables.min.css' %}">
<link rel="stylesheet" href="{% static 'css/admin/manage_regular_shifts.css' %}">
<link rel="stylesheet" href="{% static 'jquery-ui-1.12.1/jquery-ui.min.css' %}">
{% endblock %}
{% block additionnal_scripts %}
<script type="text/javascript" src="{% static 'jquery-ui-1.12.1/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables/datatables.min.js' %}"></script>
{% endblock %}
{% block content %}
<p>Hello</p>
<script src='{% static "js/all_common.js" %}?v='></script>
<script src='{% static "js/admin/manage_regular_shifts.js" %}?v='></script>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment