Commit a46d596a by Etienne Freiss

correction bug url

parent c0675619
......@@ -36,10 +36,10 @@ $(document).ready(function() {
}
toggleHeader();
});
$('#faq').on('click', (e) => {
$('#faqBDM').on('click', (e) => {
e.preventDefault();
if (current_location !== "faq") {
goto('faqBDM');
if (current_location !== "faqBDM") {
goto('faq');
}
toggleHeader();
});
......
......@@ -55,7 +55,7 @@ function load_partner_shifts(partner_id) {
/* - Navigation */
/**
* @param {String} page home | mes-infos | mes-services | echange-de-services | faqBDM
* @param {String} page home | mes-infos | mes-services | echange-de-services | faq
*/
function goto(page) {
if (window.location.pathname === base_location) {
......@@ -88,10 +88,10 @@ function update_dom() {
current_location = "my_shifts";
$("#main_content").load("/members_space/my_shifts", update_content);
$("#nav_my_shifts").addClass("active");
} else if (window.location.pathname === base_location + "faqBDM") {
current_location = "faq";
$("#main_content").load("/members_space/faq", update_content);
$("#faq").addClass("active");
} else if (window.location.pathname === base_location + "faq") {
current_location = "faqBDM";
$("#main_content").load("/members_space/faqBDM", update_content);
$("#faqBDM").addClass("active");
} else if (window.location.pathname === base_location + "echange-de-services") {
current_location = "shifts_exchange";
$("#main_content").load("/members_space/shifts_exchange", update_content);
......
......@@ -9,7 +9,7 @@ urlpatterns = [
url(r'^my_info$', views.my_info),
url(r'^my_shifts$', views.my_shifts),
url(r'^shifts_exchange$', views.shifts_exchange),
url(r'^faq$', views.faq),
url(r'^faqBDM$', views.faqBDM),
url(r'^no_content$', views.no_content),
url(r'^get_shifts_history$', views.get_shifts_history),
url('/*$', views.index), # Urls unknown from the server will redirect to index
......
......@@ -193,7 +193,7 @@ def shifts_exchange(request):
}
return HttpResponse(template.render(context, request))
def faq(request):
def faqBDM(request):
template = loader.get_template('members_space/faq.html')
context = {
'title': 'foire aux questions',
......
<div id="faq" class=" mt-3">
<div id="faqBDM" class=" mt-3">
<div class="page_title txtcenter">
<h1>
......
......@@ -9,8 +9,8 @@
<a href="#" class="nav_item active" id="nav_home">Espace Membre</a>
<a href="#" class="nav_item" id="nav_my_info">Mes Infos</a>
<a href="#" class="nav_item" id="nav_my_shifts">Mes Services</a>
<a href="#" class="nav_item" id="faq">FAQ</a>
<a href="#" class="nav_item" id="nav_shifts_exchange">Échange de services</a>
<a
href="javascript:void(0);"
target="_blank"
......@@ -19,6 +19,8 @@
>
Calendrier ABCD
</a>
<a href="#" class="nav_item" id="faqBDM">FAQ</a>
{# Disconnection button must have this id (logic in all_common.js) #}
<a href="javascript:void(0);" id="deconnect">Déconnexion</a>
<a href="javascript:void(0);" class="icon" onclick="toggleHeader()">
......
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