New function to format small and short dates

This commit is contained in:
Manuel Cillero 2017-09-17 08:14:59 +02:00
parent e2d79c1bb4
commit ce5f89b38f
18 changed files with 119 additions and 118 deletions

View file

@ -14,8 +14,8 @@ function theme_stormnote_list($header, $notes) {
(!empty($note->project_title) ? ' » ' . l($note->project_title, 'node/'. $note->project_nid) : '' ) .
(!empty($note->task_title) ? ' » ' . l($note->task_title, 'node/'. $note->task_nid) : '' ),
$note->clip ? storm_icon('attached', t('Has attached files')) : ' ',
format_date($note->created, 'small'),
format_date($note->changed, 'small'),
_format_small_date($note->created),
_format_small_date($note->changed),
$note->version,
array(
'data' => storm_icon_edit_node($note, $_GET) . storm_icon_delete_node($note, $_GET),
@ -68,14 +68,14 @@ function theme_stormnote_view($node, $teaser = FALSE, $page = FALSE) {
$node->content['group1']['created'] = array(
'#prefix' => '<div class="created">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t('Note created'), format_date($node->created, 'small')),
'#value' => theme('storm_view_item', t('Note created'), _format_small_date($node->created)),
'#weight' => 12,
);
if ($node->changed != $node->created) {
$node->content['group1']['modified'] = array(
'#prefix' => '<div class="created">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t('Note updated'), format_date($node->changed, 'small')),
'#value' => theme('storm_view_item', t('Note updated'), _format_small_date($node->changed)),
'#weight' => 13,
);
}