From 8644363615d67368cca7554d39f0e461795ac186 Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Wed, 13 Sep 2023 15:56:43 +0200
Subject: [PATCH] =?UTF-8?q?fix:=20Affichage=20des=20puces=20statut=20des?=
 =?UTF-8?q?=20documents=20dans=20la=20m=C3=A9diath=C3=A8que?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Les puces .gif n’existant plus depuis 2 ans !

Refs: #4946
---
 medias_fonctions.php | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/medias_fonctions.php b/medias_fonctions.php
index 7145f981..25c8d10b 100644
--- a/medias_fonctions.php
+++ b/medias_fonctions.php
@@ -132,19 +132,13 @@ function medias_inigetoctets($var) {
  *     Code HTML de l'image de puce
  */
 function medias_puce_statut_document($id_document, $statut) {
-	if ($statut == 'publie') {
-		$puce = 'puce-verte.gif';
-	} else {
-		if ($statut == 'prepa') {
-			$puce = 'puce-blanche.gif';
-		} else {
-			if ($statut == 'poubelle') {
-				$puce = 'puce-poubelle.gif';
-			} else {
-				$puce = 'puce-blanche.gif';
-			}
-		}
-	}
+	$puce = match($statut) {
+		'publie' => 'puce-publier-xx.svg',
+		'prop' => 'puce-proposer-xx.svg',
+		'prepa' => 'puce-preparer-xx.svg',
+		'poubelle' => 'puce-supprimer-xx.svg',
+		default => 'puce-preparer-xx.svg',
+	};
 
 	return http_img_pack($puce, $statut, "class='puce'");
 }
-- 
GitLab