From ef4d973b2d4259bc80d6aa934a47b2abd6b4d1f5 Mon Sep 17 00:00:00 2001
From: ArmandBahi <armand.bahi@veremes.com>
Date: Thu, 12 May 2022 10:48:42 +0200
Subject: [PATCH] =?UTF-8?q?Reprise=20du=20mod=C3=A8le=20A4=5Fportrait?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 modeles_impression/A4_portrait.html | 97 ++++++++++++++---------------
 1 file changed, 46 insertions(+), 51 deletions(-)

diff --git a/modeles_impression/A4_portrait.html b/modeles_impression/A4_portrait.html
index 2a82fadc..9bade66c 100644
--- a/modeles_impression/A4_portrait.html
+++ b/modeles_impression/A4_portrait.html
@@ -1,20 +1,20 @@
 <style>
 	@page {
-        size: A4 portrait;
-        margin: 0px;
-    }
+		size: A4 portrait;
+		margin: 15px 10px 5px 15px;
+	}
+
 	#A4_print_template {
 		position: absolute;
-		width: 21cm;
-		height: 29.7cm;
-		padding: 0.5cm;
+		width: 100%;
+		height: 100%;
 	}
 
 	.entete {
 		margin-left: -0.2cm;
 		margin-top: -0.5cm;
 		margin-right: -0.3cm;
-		width: 21cm;
+		width: 100%;
 		height: 2cm;
 		border: 0px solid black;
 		background-color: #D3D3D3 !important;
@@ -74,15 +74,15 @@
 
 	#map_image {
 		background-color: #D8D8D8 !important;
-		width: 15.93cm;
-		height: 23.4cm;
+		width: 15.25cm;
+		height: 25cm;
+		border: 1px solid black !important;
 	}
 
 	.a4_portrait_logo_echelle_graphique_valeur_gauche {
 		height: 0.4cm;
 		width: 1cm;
 		line-height: 0.4cm;
-		/* centrage vertical */
 		position: absolute;
 		float: left;
 		left: 6.05cm;
@@ -90,14 +90,13 @@
 		color: black;
 		font-size: 0.21cm;
 		border: 0px solid grey;
-		top: 24.05cm;
+		bottom: 2.7cm;
 	}
 
 	.a4_portrait_logo_echelle_graphique_valeur_centre {
 		height: 0.4cm;
 		width: 1cm;
 		line-height: 0.4cm;
-		/* centrage vertical */
 		position: absolute;
 		float: left;
 		left: 7.05cm;
@@ -105,14 +104,13 @@
 		color: black;
 		font-size: 0.21cm;
 		border: 0px solid grey;
-		top: 24.05cm;
+		bottom: 2.7cm;
 	}
 
 	.a4_portrait_logo_echelle_graphique_valeur_droite {
 		height: 0.4cm;
 		width: 2cm;
 		line-height: 0.4cm;
-		/* centrage vertical */
 		position: absolute;
 		float: left;
 		left: 8.1cm;
@@ -121,7 +119,7 @@
 		color: black;
 		font-size: 0.21cm;
 		border: 0px solid grey;
-		top: 24.05cm;
+		bottom: 2.7cm;
 	}
 
 	.a4_portrait_logo_echelle_graphique {
@@ -135,7 +133,7 @@
 		background-position: center center !important;
 		background-repeat: no-repeat !important;
 		border: 0px solid grey;
-		top: 24.5cm;
+		bottom: 2.5cm;
 	}
 
 	.a4_portrait_logo_fleche_nord {
@@ -154,10 +152,10 @@
 
 	.map_overview {
 		z-index: 999;
-		top: 22.5cm;
+		bottom: 2.2cm;
 		background-color: #D8D8D8 !important;
 		width: 4.5cm;
-		height:3.5cm;
+		height: 3.5cm;
 		position: absolute;
 		left: 1.5cm;
 		outline: 0.2cm solid white;
@@ -170,7 +168,6 @@
 		border: 2px solid black !important;
 	}
 
-
 	.legend_txt {
 		text-align: left;
 		height: auto;
@@ -206,72 +203,64 @@
 	}
 
 	.pied_de_page {
-		top: 26cm;
-		width: 21cm;
+		bottom: 0cm;
+		width: 100%;
+		height: 2cm;
 		border: 0px solid black;
 		background-color: #D3D3D3 !important;
 		position: absolute;
-		padding: 0.2cm ;
-		margin-left: -0.2cm;
-		margin-right:-0.3cm;
-		margin-bottom: -0.5cm;
-		
+		padding: 0.3cm 0.2cm;
 	}
 
 	.document_non_opposable {
 		display: table;
 		float: left;
-		height: 0.7cm;
 		padding-left: 0.2cm;
-		/* centrage vertical */
 		font-style: italic;
 		font-size: 0.35cm;
-		border: 0px solid red;
+		line-height: 1.8rem;
 	}
 
 	.a4_portrait_source {
 		display: table;
 		clear: both;
 		float: left;
-		height: 0.7cm;
 		padding-left: 0.2cm;
 		font-size: 0.35cm;
 		color: #333 !important;
 		width: Calc(100% - 6.5cm);
-		/* centrage vertical */
-		border: 0px solid blue;
+		line-height: 1.8rem;
 	}
 
 	.a4_portrait_logo_echelle {
 		display: table;
-		float: left;
-		height: 0.7cm;
-		padding-left: 0.2cm;
+		float: right;
+		padding-right: 0.2cm;
 		font-size: 0.35cm;
-		width: 3.5cm;
-		/* centrage vertical */
-		border: 0px solid blue;
+		width: 4cm;
+		text-align: right;
+		line-height: 1.8rem;
 	}
 
 	.a4_portrait_date {
 		display: table;
 		float: right;
-		height: 0.7cm;
 		padding-right: 0.2cm;
 		font-size: 0.35cm;
-		width: 2cm;
-		/* centrage vertical */
+		width: 4cm;
 		text-align: right;
-		color: #333 !important;
-		border: 0px solid blue;
+		line-height: 1.8rem;
 	}
 
-	.a4_portrait_source > span, .a4_portrait_logo_echelle > span, .a4_portrait_date > span, .document_non_opposable > span {
+	.a4_portrait_source>span,
+	.a4_portrait_logo_echelle>span,
+	.a4_portrait_date>span,
+	.document_non_opposable>span {
 		display: table-cell;
-    vertical-align: middle;
+		vertical-align: middle;
 	}
 
-	.document_non_opposable > span {
+	.document_non_opposable>span {
 		color: black !important;
 	}
 </style>
@@ -316,7 +305,13 @@
 				Légende
 			</div>
 			<!--Pour afficher la légende, utiliser id="map_legend"-->
-			<div id="map_legend">
+			<div id="map_legend" ng-if="map_legend">
+				<div ng-repeat="legendLayer in map_legend">
+					<div ng-repeat="legend in legendLayer.legendObjects" class="legend_object">
+						<div class="legend_layer_name">{{ legend.legendName || legend.layerName }}</div>
+						<img ng-src="{{ legend.legendURL }}" class="legend_image" />
+					</div>
+				</div>
 			</div>
 		</div>
 		<div class="map_overview">
@@ -335,14 +330,14 @@
 		<div class="document_non_opposable">
 			<span>DOCUMENT NON OPPOSABLE</span>
 		</div>
-		<div class="a4_portrait_source">
-			<span>Sources : {{layer_sources.join(', ')}}</span>
-		</div>
 		<div class="a4_portrait_logo_echelle">
 			<span>Echelle : {{map_scale}}</span>
 		</div>
+		<div class="a4_portrait_source">
+			<span>Sources : {{layer_sources.join(', ')}}</span>
+		</div>
 		<div class="a4_portrait_date">
-			<span>{{date}}</span>
+			<span>{{date_hour}}</span>
 		</div>
 	</div>
 	<div class="a4_portrait_logo_fleche_nord"></div>
-- 
GitLab