Add relative date support

Changed Date display to be relative.  If the relative date is hovered over it shows the actual date and time.
This commit is contained in:
chrislemonier 2014-02-25 12:11:29 -08:00
parent a32b1da684
commit c242998e29

View File

@ -30,7 +30,7 @@
<?php endif ?> <?php endif ?>
</li> </li>
<li class="hide-mobile"> <li class="hide-mobile">
<?= dt('%e %B %Y %k:%M', $item['updated']) ?> <span title="<?= dt('%e %B %Y %k:%M', $item['updated']) ?>"><?= Helper\relative_time(dt('%e %B %Y %k:%M', $item['updated'])) ?></span>
</li> </li>
<li class="hide-mobile"> <li class="hide-mobile">
<a href="<?= $item['url'] ?>" id="original-<?= $item['id'] ?>" rel="noreferrer" target="_blank" data-item-id="<?= $item['id'] ?>"><?= t('original link') ?></a> <a href="<?= $item['url'] ?>" id="original-<?= $item['id'] ?>" rel="noreferrer" target="_blank" data-item-id="<?= $item['id'] ?>"><?= t('original link') ?></a>
@ -43,4 +43,4 @@
<?= \PicoTools\Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?> <?= \PicoTools\Template\load('bookmark_links', array('item' => $item, 'menu' => $menu, 'offset' => $offset, 'source' => '')) ?>
<?= \PicoTools\Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?> <?= \PicoTools\Template\load('status_links', array('item' => $item, 'redirect' => $menu, 'offset' => $offset)) ?>
</ul> </ul>
</article> </article>