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

@ -15,7 +15,7 @@ function theme_stormticket_list($header, $tickets) {
l($ticket->organization_title, 'node/'. $ticket->organization_nid) .
(!empty($ticket->project_title) ? ' » ' . l($ticket->project_title, 'node/'. $ticket->project_nid) : '' ),
$ticket->clip ? storm_icon('attached', t('Has attached files')) : ' ',
format_date($ticket->changed, 'small'),
_format_small_date($ticket->changed),
storm_icon('priority_'. $ticket->ticketpriority, storm_attribute_value('Ticket priority', $ticket->ticketpriority)),
array(
'data' => $ticket->comment_count,
@ -90,14 +90,14 @@ function theme_stormticket_view($node, $teaser = FALSE, $page = FALSE) {
$node->content['group1']['created'] = array(
'#prefix' => '<div class="created">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t('Created'), format_date($node->created, 'small')),
'#value' => theme('storm_view_item', t('Created'), _format_small_date($node->created)),
'#weight' => 12,
);
if ($node->changed != $node->created) {
$node->content['group1']['modified'] = array(
'#prefix' => '<div class="modified">',
'#suffix' => '</div>',
'#value' => theme('storm_view_item', t('Modified'), format_date($node->changed, 'small')),
'#value' => theme('storm_view_item', t('Modified'), _format_small_date($node->changed)),
'#weight' => 13,
);
}