login/visits: styling classes for list and seen dates
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 19 Jun 2018 17:13:03 +0000 (19:13 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 19 Jun 2018 18:57:08 +0000 (20:57 +0200)
login/visits.php

index a26f3072382c290d93be6b8aa66eab793d6a609f..8e5d1f661e1b5a8515e182690c96a8312bbcfb92 100644 (file)
@@ -13,13 +13,15 @@ if (@$_GET['order'] == 'seen') {
        array_multisort(array_column($logins, 'seen'), SORT_DESC, SORT_NUMERIC, $logins);
 }
 
-print "<ul>\n";
+print "<ul class=cols>\n";
 foreach ($logins as $profile) {
-       printf('<li>%s <a href="%s">%s</a>',
-               $profile['seen'] ? strftime('%F %H:%M', $profile['seen']) : '✘',
+       printf('<li><a href="%s">%s</a>',
                '/login/edit/'.$profile['login'],
                $profile['name'] ?: $profile['login']
        );
+       if ($profile['seen']) {
+               printf(' <small class="date">%s</small>', strftime('%F %H:%M', $profile['seen']));
+       }
        if (!empty($profile['admin'])) {
                print ' <em>(beheerder)</em>';
        }