diff --git a/vehicles/templates/vhc/peremptions.html b/vehicles/templates/vhc/peremptions.html index ec42a99..c0672b6 100644 --- a/vehicles/templates/vhc/peremptions.html +++ b/vehicles/templates/vhc/peremptions.html @@ -12,7 +12,7 @@ {% with 'vehicles/images/ocvs_rtw_'|add:vhc.nType|add:'_'|add:vhc.nStatus|add:'.png' as image_static %}
- {{vhc.sName}}
+ {{vhc.sName}}

{% if vhc.bLucas %} @@ -28,13 +28,13 @@
{% for info in vhc.get_all_infos_perempt_perma %} - {{info.sDesc}}
+ {{info.sDesc}}
{% endfor %}
{% for info in vhc.get_all_infos_perempt %} - {{info.sDesc}}
+ {{info.sDesc}}
{% endfor %}
diff --git a/vehicles/templates/vhc/vhc.html b/vehicles/templates/vhc/vhc.html index 2b9a2a4..2b55901 100644 --- a/vehicles/templates/vhc/vhc.html +++ b/vehicles/templates/vhc/vhc.html @@ -12,7 +12,7 @@ {% with 'vehicles/images/ocvs_rtw_'|add:vhc.nType|add:'_'|add:vhc.nStatus|add:'.png' as image_static %}
- {{vhc.sName}}
+ {{vhc.sName}}

@@ -20,7 +20,7 @@ {% if vhc.bLucas %}LUCAS{% endif %} - Péremptions + Péremptions @@ -30,7 +30,7 @@ Infos techniques {% for info in vhc.get_all_infos_tech %}
- {{info.sDesc}}
+ {{info.sDesc}}
{{info.get_Start_formated}} {{info.get_Author_formated}}
{% endfor %} @@ -40,24 +40,24 @@ Matériels manquants {% for info in vhc.get_all_infos_mat %}
- {{info.sDesc}}
+ {{info.sDesc}}

{{info.get_Start_formated}} {{info.get_Author_formated}}
{% endfor %}
- Péremptions + Péremptions
{% for info in vhc.get_all_infos_perempt_perma %} - {{info.sDesc}}
+ {{info.sDesc}}
{% endfor %}
{% for info in vhc.get_all_infos_perempt %} - {{info.sDesc}}
+ {{info.sDesc}}
{% endfor %}
diff --git a/vehicles/views.py b/vehicles/views.py index fd2c9f0..c1e59fc 100644 --- a/vehicles/views.py +++ b/vehicles/views.py @@ -9,9 +9,14 @@ from vehicles.models import * @xframe_options_exempt def view_vhc(request): + if not "target" in request.GET.keys(): + target = "__self" + else: + target = "__blank" + template = loader.get_template("vhc/vhc.html") a_vhc = Vehicles.objects.all().order_by("nStatus","nOrder") - context = {'list_vhc': a_vhc} + context = {'list_vhc': a_vhc,'target':target} print("passs 1 ligne 12") @@ -19,9 +24,13 @@ def view_vhc(request): @xframe_options_exempt def view_peremptions(request): + if not "target" in request.GET.keys(): + target = "_self" + else: + target = "_blank" template = loader.get_template("vhc/peremptions.html") a_vhc = Vehicles.objects.all().order_by("nOrder") - context = {'list_vhc': a_vhc} + context = {'list_vhc': a_vhc,'target':target} print("passs 1 ligne 12")