Ajout du param target sur les page vhc
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{% with 'vehicles/images/ocvs_rtw_'|add:vhc.nType|add:'_'|add:vhc.nStatus|add:'.png' as image_static %}
|
||||
<div class="child">
|
||||
<div style="height: 25%;display: flex;padding-top: 10px;" >
|
||||
<a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" style="font-weight: bold;">{{vhc.sName}}</a><br>
|
||||
<a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" target="{{target}}" style="font-weight: bold;">{{vhc.sName}}</a><br>
|
||||
|
||||
<img height="100px" src="{% static image_static %}" ><br>
|
||||
{% if vhc.bLucas %}
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
<div style="width: 350px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt_perma %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" >{{info.sDesc}}</a><br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div style="width: 350px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" >{{info.sDesc}}</a> <br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a> <br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
{% with 'vehicles/images/ocvs_rtw_'|add:vhc.nType|add:'_'|add:vhc.nStatus|add:'.png' as image_static %}
|
||||
<div class="child">
|
||||
<div style="height: 25%;display: flex;padding-top: 10px;" >
|
||||
<a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" style="font-weight: bold;width: 78px;">{{vhc.sName}}</a><br>
|
||||
<a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" target="{{target}}" style="font-weight: bold;width: 78px;">{{vhc.sName}}</a><br>
|
||||
|
||||
<img height="100px" src="{% static image_static %}" ><br>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{% if vhc.bLucas %}LUCAS{% endif %}
|
||||
</span>
|
||||
|
||||
<b><a href="/vehicules/peremptions" >Péremptions</a></b>
|
||||
<b><a href="/vehicules/peremptions" target="{{target}}" >Péremptions</a></b>
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<b>Infos techniques</b>
|
||||
{% for info in vhc.get_all_infos_tech %}
|
||||
<div class="element" style="margin-top: 15px">
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" >{{info.sDesc}}</a> <br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a> <br>
|
||||
<span style="font-style: italic;text-transform:uppercase;align-self: flex-end;">{{info.get_Start_formated}} {{info.get_Author_formated}}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -40,24 +40,24 @@
|
||||
<b>Matériels manquants</b>
|
||||
{% for info in vhc.get_all_infos_mat %}
|
||||
<div class="element red" style="margin-top: 15px;">
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" >{{info.sDesc}}</a> <br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}" >{{info.sDesc}}</a> <br>
|
||||
<br><span style="font-style: italic;text-transform:uppercase;">{{info.get_Start_formated}} {{info.get_Author_formated}}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div style="width: 350px;height: var(--main-child-container-height);display:none">
|
||||
<b><a href="/vehicules/peremptions" >Péremptions</a></b>
|
||||
<b><a href="/vehicules/peremptions" target="{{target}}" >Péremptions</a></b>
|
||||
<div class="child_box">
|
||||
|
||||
<div style="width: 170px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt_perma %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="_blank">{{info.sDesc}}</a><br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}">{{info.sDesc}}</a><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div style="width: 170px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="_blank">{{info.sDesc}}</a> <br>
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="{{target}}">{{info.sDesc}}</a> <br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
@@ -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")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user