diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-03-26 18:07:28 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-03-26 18:07:28 +0100 |
commit | 5019671cf2bba2202c0024f3bd309fe674251226 (patch) | |
tree | 720aa7ca861f9ccc3216a8fff9e730a26a8eab6c /app/view/templates | |
parent | 633076d7c9275b33b722d9a7989e63839f8c38d2 (diff) | |
download | wcms-5019671cf2bba2202c0024f3bd309fe674251226.tar.gz wcms-5019671cf2bba2202c0024f3bd309fe674251226.zip |
sort media by date and ext fix #67
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/home.php | 6 | ||||
-rw-r--r-- | app/view/templates/media.php | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index d1b3421..6c3ad62 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -163,13 +163,13 @@ <td class="linkto"><?= $opt->linktolink($item->linkto('array')) ?></td> <?php } if ($columns['datemodif']) { ?> - <td class="datemodif"><time datetime="<?= $item->datemodif('string') ?>" title="<?= $item->datemodif('dmy') . ' ' . $item->datemodif('ptime') ?>"><?= $item->datemodif('hrdi') ?></time></td> + <td class="datemodif" <?= $item->datemodif('dmy') ?> <?= $item->datemodif('ptime') ?>><time datetime="<?= $item->datemodif('string') ?>" title="<?= $item->datemodif('dmy') . ' ' . $item->datemodif('ptime') ?>"><?= $item->datemodif('hrdi') ?></time></td> <?php } if ($columns['datecreation']) { ?> - <td class="datecreation"><time datetime="<?= $item->datecreation('string') ?>" title="<?= $item->datecreation('dmy') . ' ' . $item->datecreation('ptime') ?>"><?= $item->datecreation('hrdi') ?></time></td> + <td class="datecreation" <?= $item->datecreation('dmy') ?> <?= $item->datecreation('ptime') ?>><time datetime="<?= $item->datecreation('string') ?>" title="<?= $item->datecreation('dmy') . ' ' . $item->datecreation('ptime') ?>"><?= $item->datecreation('hrdi') ?></time></td> <?php } if ($columns['date']) { ?> - <td class="date"><time datetime="<?= $item->date('string') ?>" title="<?= $item->date('dmy') . ' ' . $item->date('ptime') ?>"><?= $item->date('dmy') ?></time></td> + <td class="date" <?= $item->date('dmy') ?> <?= $item->date('ptime') ?>><time datetime="<?= $item->date('string') ?>" title="<?= $item->date('dmy') . ' ' . $item->date('ptime') ?>"><?= $item->date('dmy') ?></time></td> <?php } if ($columns['secure']) { ?> <td class="secure"><?= $opt->securelink($item->secure('int') , $item->secure('string')) ?></td> diff --git a/app/view/templates/media.php b/app/view/templates/media.php index 054022a..50fc0d6 100644 --- a/app/view/templates/media.php +++ b/app/view/templates/media.php @@ -48,9 +48,7 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css' <fieldset> <legend>Sort</legend> <select name="sortby" id="sortby"> - <option value="id" <?= $mediaopt->sortby() === 'id' ? 'selected' : '' ?>>id</option> - <option value="type" <?= $mediaopt->sortby() === 'type' ? 'selected' : '' ?>>type</option> - <option value="size" <?= $mediaopt->sortby() === 'size' ? 'selected' : '' ?>>size</option> + <?= options(Model::MEDIA_SORTBY, $mediaopt->sortby()) ?> </select> </br> <input type="radio" name="order" id="asc" value="1" <?= $mediaopt->order() == 1 ? 'checked' : '' ?>><label for="asc">ascending</label> @@ -78,7 +76,7 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css' <tr> <th id="checkall">x</th> <th><a href="<?= $mediaopt->getsortbyadress('id') ?>">id</a></th> - <th>ext</th> + <th><a href="<?= $mediaopt->getsortbyadress('extension') ?>">ext</a></th> <th><a href="<?= $mediaopt->getsortbyadress('type') ?>">type</a></th> <th><a href="<?= $mediaopt->getsortbyadress('size') ?>">size</a></th> <th><a href="<?= $mediaopt->getsortbyadress('date') ?>">date</a></th> @@ -97,7 +95,7 @@ $this->layout('layout', ['title' => 'media', 'stylesheets' => [$css . 'home.css' <td><?= $media->extension() ?></td> <td class="nowrap"><a href="<?= $media->getfullpath() ?>" target="_blank"><?= $media->type() == 'image' ? '<span class="thumbnail">' . $media->getsymbol() . '<img src="' . $media->getfullpath() . '"></span>' : $media->getsymbol() ?></a></td> <td class="nowrap"><?= $media->size('hr') ?></td> - <td class="nowrap"><?= $media->date('hrdi') ?></td> + <td class="nowrap" title="<?= $media->date('dmy') ?> <?= $media->date('ptime') ?>"><?= $media->date('hrdi') ?></td> <td><?= $media->width() ?></td> <td><?= $media->height() ?></td> <td><?= $media->length() ?></td> |