diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-01-07 14:30:42 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-03-06 21:11:12 +0100 |
commit | 52b503105d389d1796698114573ff618b2ad34a2 (patch) | |
tree | d636098fe0864db98c175cd7dfda19a1c069eb82 /tpl | |
parent | 1255a42cfed9ce419962c6cf29181a66c7e22bb8 (diff) | |
download | Shaarli-52b503105d389d1796698114573ff618b2ad34a2.tar.gz Shaarli-52b503105d389d1796698114573ff618b2ad34a2.tar.zst Shaarli-52b503105d389d1796698114573ff618b2ad34a2.zip |
Improve datetime display
Use php-intl extension to display datetimes a bit more nicely, depending on the locale.
What changes:
* the day is no longer displayed
* day number and month are ordered according to the locale
* the timezone is more readable (UTC+1 instead of CET)
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/default/linklist.html | 5 | ||||
-rw-r--r-- | tpl/vintage/linklist.html | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index a9712704..9bc3ba1a 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html | |||
@@ -171,10 +171,11 @@ | |||
171 | <div class="linklist-item-infos-dateblock pure-u-lg-3-8 pure-u-1"> | 171 | <div class="linklist-item-infos-dateblock pure-u-lg-3-8 pure-u-1"> |
172 | <a href="?{$value.shorturl}" title="{'Permalink'|t}"> | 172 | <a href="?{$value.shorturl}" title="{'Permalink'|t}"> |
173 | {if="!$hide_timestamps || isLoggedIn()"} | 173 | {if="!$hide_timestamps || isLoggedIn()"} |
174 | {$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'} | 174 | {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'} |
175 | <span class="linkdate" title="{$updated}"> | 175 | <span class="linkdate" title="{$updated}"> |
176 | <i class="fa fa-clock-o"></i> | 176 | <i class="fa fa-clock-o"></i> |
177 | {function="strftime('%c', $value.timestamp)"}{if="$value.updated_timestamp"}*{/if} | 177 | {$value.created|format_date} |
178 | {if="$value.updated_timestamp"}*{/if} | ||
178 | · | 179 | · |
179 | </span> | 180 | </span> |
180 | {/if} | 181 | {/if} |
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 5accc92f..fc116667 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html | |||
@@ -99,11 +99,11 @@ | |||
99 | <br> | 99 | <br> |
100 | {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if} | 100 | {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if} |
101 | {if="!$hide_timestamps || isLoggedIn()"} | 101 | {if="!$hide_timestamps || isLoggedIn()"} |
102 | {$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'} | 102 | {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'} |
103 | <span class="linkdate" title="Permalink"> | 103 | <span class="linkdate" title="Permalink"> |
104 | <a href="?{$value.shorturl}"> | 104 | <a href="?{$value.shorturl}"> |
105 | <span title="{$updated}"> | 105 | <span title="{$updated}"> |
106 | {function="strftime('%c', $value.timestamp)"} | 106 | {$value.created|format_date} |
107 | {if="$value.updated_timestamp"}*{/if} | 107 | {if="$value.updated_timestamp"}*{/if} |
108 | </span> | 108 | </span> |
109 | - permalink | 109 | - permalink |