Overview
Comment: | Correction affichage type de fichier |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
300c6d64a6d6da41bd4f4c40fd1a4a0f |
User & Date: | bohwaz on 2015-04-09 15:00:11 |
Other Links: | manifest | tags |
Context
2015-04-14
| ||
06:13 | boucles de type documents, images et fichiers dans les squelettes check-in: a3a534bd71 user: bohwaz tags: trunk | |
2015-04-09
| ||
15:00 | Correction affichage type de fichier check-in: 300c6d64a6 user: bohwaz tags: trunk | |
2015-04-08
| ||
07:01 | Galerie et liste des fichiers de la page wiki check-in: 71cc771f9e user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Fichiers.php from [6c066bdc3a] to [7889c63d5e].
︙ | ︙ | |||
589 590 591 592 593 594 595 | catch (\InvalidArgumentException $e) { return $skriv->parseError('/!\ Tag fichier : ' . $e->getMessage()); } $out = '<aside class="fichier" data-type="'.$skriv->escape($file->type).'">'; $out.= '<a href="'.$file->getURL().'" class="internal-file">'.$skriv->escape($file->nom).'</a> '; | | | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | catch (\InvalidArgumentException $e) { return $skriv->parseError('/!\ Tag fichier : ' . $e->getMessage()); } $out = '<aside class="fichier" data-type="'.$skriv->escape($file->type).'">'; $out.= '<a href="'.$file->getURL().'" class="internal-file">'.$skriv->escape($file->nom).'</a> '; $out.= '<small>('.$skriv->escape(($file->type ? $file->type . ', ' : '') . Utils::format_bytes($file->taille)).')</small>'; $out.= '</aside>'; return $out; } /** * Callback utilisé pour l'extension <<image>> dans le wiki-texte * @param array $args Arguments passés à l'extension |
︙ | ︙ |
Modified src/include/lib/Garradin/Utils.php from [8abbfb6919] to [edeec2e7a3].
︙ | ︙ | |||
592 593 594 595 596 597 598 | case 'K': case 'k': return (int)$size_str * 1024; default: return $size_str; } } static public function format_bytes($size) { if ($size > (1024 * 1024)) | | | | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | case 'K': case 'k': return (int)$size_str * 1024; default: return $size_str; } } static public function format_bytes($size) { if ($size > (1024 * 1024)) return str_replace('.', ',', round($size / 1024 / 1024, 2)) . ' Mo'; elseif ($size > 1024) return str_replace('.', ',', round($size / 1024, 2)) . ' Ko'; else return $size . ' o'; } static public function deleteRecursive($path, $delete_target = false) { if (!file_exists($path)) |
︙ | ︙ |
Modified src/templates/admin/wiki/_fichiers.tpl from [6ec0308947] to [de79328606].
︙ | ︙ | |||
63 64 65 66 67 68 69 | {if !empty($fichiers)} <table class="list"> <tbody> {foreach from=$fichiers item="file"} <tr> <th>{$file.nom|escape}</th> | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | {if !empty($fichiers)} <table class="list"> <tbody> {foreach from=$fichiers item="file"} <tr> <th>{$file.nom|escape}</th> <td>{if $file.type}{$file.type|escape}{/if}</td> <td class="actions"> <form class="actions" method="post" action="{$self_url|escape}"> <a href="{$file.url|escape}" onclick="return !window.open(this.href);" class="icn" title="Télécharger">⇓</a> <input type="hidden" name="{$csrf_field_name|escape}" value="{$csrf_value|escape}" /> <input type="hidden" name="delete" value="{$file.id|escape}" /> <noscript><input type="submit" value="Supprimer" /></noscript> </form> |
︙ | ︙ |
Modified src/www/admin/static/scripts/wiki_editor.js from [b1bcc40dca] to [2dad10610c].
whitespace changes only