2017-03-09
| ||
05:02 | • Fixed ticket [d7d5036551]: Ajout d'une légende optionelle pour les fichiers plus 4 other changes artifact: b0391af410 user: bohwaz | |
05:01 | Ajout possibilité légende optionnelle pour fichiers (wiki), cf. [d7d50365514d2f84573773614877a8556dab5ee0] check-in: 8bf795cd47 user: bohwaz tags: dev | |
04:43 | • Ticket [d7d5036551] Ajout d'une légende optionelle pour les fichiers status still Open with 3 other changes artifact: 030b31ac45 user: bohwaz | |
2016-02-20
| ||
13:22 | • Ticket [d7d5036551]: 7 changes artifact: 2a6bc598a2 user: bohwaz | |
2016-02-18
| ||
14:33 | • New ticket [d7d5036551]. artifact: 784d849ada user: fpoulain | |
Ticket Hash: | d7d50365514d2f84573773614877a8556dab5ee0 | |||
Title: | Ajout d'une légende optionelle pour les fichiers | |||
Status: | Fixed | Type: | Feature_Request | |
Severity: | Cosmetic | Priority: | Zero | |
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2017-03-09 05:02:01 | |||
Version Found In: | ||||
User Comments: | ||||
fpoulain added on 2016-02-18 13:33:30:Un patch est dispo sur git://metrodore.fr/garradin ; c'est le commit eaa57d7dedd292d3d8c94ad5672e2c005f39ee14 bohwaz added on 2016-02-20 12:22:08:Ton site est en timeout, merci d'envoyer tes patchs par email, cf. [Documentation développeur] bohwaz added on 2017-03-09 03:43:39:J'ai extrait le patch: commit 420ac4c03ffed339579f2c62368ffff445a38816 Author: François Poulain <fpoulain@metrodore.fr> Date: Thu Feb 18 14:31:19 2016 +0100 Ajout d une légende optionelle pour les fichiers diff --git a/include/lib/Garradin/Fichiers.php b/include/lib/Garradin/Fichiers.php index 50e925e..9cd4f17 100644 --- a/include/lib/Garradin/Fichiers.php +++ b/include/lib/Garradin/Fichiers.php @@ -599,8 +599,10 @@ class Fichiers return $skriv->parseError('/!\ Tag fichier : ' . $e->getMessage()); } + $legend = count ($args) > 1 ? $skriv->escape($args[1]) : $skriv->escape($file->nom); + $out = '<aside class="fichier" data-type="'.$skriv->escape($file->type).'">'; - $out.= '<a href="'.$file->getURL().'" class="internal-file">'.$skriv->escape($file->nom).'</a> '; + $out.= '<a href="'.$file->getURL().'" class="internal-file">'.$legend.'</a> '; $out.= '<small>('.$skriv->escape(($file->type ? $file->type . ', ' : '') . Utils::format_bytes($file->taille)).')</small>'; $out.= '</aside>'; return $out; bohwaz added on 2017-03-09 04:02:01:OK fait dans [8bf795cd47] |