New function to format small and short dates
This commit is contained in:
parent
e2d79c1bb4
commit
ce5f89b38f
18 changed files with 119 additions and 118 deletions
|
@ -15,8 +15,8 @@ function theme_stormproject_list($header, $projects) {
|
|||
'<span class="project-title status_' . str_replace(' ', '_', $project->projectstatus) . '">' . l($project->title, 'node/'. $project->nid) . theme('mark', node_mark($project->nid, $project->changed)) . '</span><br />' .
|
||||
l($project->organization_title, 'node/'. $project->organization_nid) .
|
||||
(!empty($project->manager_title) ? ' » ' . l($project->manager_title, 'node/'. $project->manager_nid) : '' ),
|
||||
format_date($project->created, 'small'),
|
||||
format_date($project->changed, 'small'),
|
||||
_format_small_date($project->created),
|
||||
_format_small_date($project->changed),
|
||||
$project->version,
|
||||
storm_icon('priority_'. $project->projectpriority, storm_attribute_value('Project priority', $project->projectpriority)),
|
||||
array(
|
||||
|
@ -81,14 +81,14 @@ function theme_stormproject_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,
|
||||
);
|
||||
}
|
||||
|
@ -135,14 +135,14 @@ function theme_stormproject_view($node, $teaser = FALSE, $page = FALSE) {
|
|||
$node->content['group3']['datebegin'] = array(
|
||||
'#prefix' => '<div class="datebegin">',
|
||||
'#suffix' => '</div>',
|
||||
'#value' => theme('storm_view_item', t('Date begin'), empty($node->datebegin) ? '' : substr(format_date($node->datebegin, 'small'), 0, 10)),
|
||||
'#value' => theme('storm_view_item', t('Date begin'), empty($node->datebegin) ? '' : _format_short_date($node->datebegin)),
|
||||
'#weight' => 2,
|
||||
);
|
||||
|
||||
$node->content['group3']['dateend'] = array(
|
||||
'#prefix' => '<div class="dateend">',
|
||||
'#suffix' => '</div>',
|
||||
'#value' => theme('storm_view_item', t('Date end'), empty($node->dateend) ? '' : substr(format_date($node->dateend, 'small'), 0, 10)),
|
||||
'#value' => theme('storm_view_item', t('Date end'), empty($node->dateend) ? '' : _format_short_date($node->dateend)),
|
||||
'#weight' => 3,
|
||||
);
|
||||
|
||||
|
|
Reference in a new issue