113 lines
3.7 KiB
PHP
113 lines
3.7 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @file
|
|
*/
|
|
|
|
function theme_stormperson_list($header, $people) {
|
|
$rows = array();
|
|
foreach ($people as $person) {
|
|
$rows[] = array(
|
|
l($person->organization_title, 'node/'. $person->organization_nid),
|
|
l($person->title, 'node/'. $person->nid) . theme('mark', node_mark($person->nid, $person->changed)),
|
|
l($person->email, 'mailto:'. $person->email),
|
|
array(
|
|
'data' => storm_icon_edit_node($person, $_GET) .' '. storm_icon_delete_node($person, $_GET),
|
|
'class' => 'storm_list_operations',
|
|
),
|
|
);
|
|
}
|
|
$o = theme('table', $header, $rows, array('id' => 'stormpeople'));
|
|
return $o;
|
|
}
|
|
|
|
function theme_stormperson_view($node, $teaser = FALSE, $page = FALSE) {
|
|
$node = node_prepare($node, $teaser);
|
|
|
|
$node->content['links'] = array(
|
|
'#prefix' => '<div class="stormlinks"><dl>',
|
|
'#suffix' => '</dl></div>',
|
|
'#weight' => -25,
|
|
);
|
|
|
|
$node->content['group1'] = array(
|
|
'#prefix' => '<div class="stormfields">',
|
|
'#suffix' => '</div>',
|
|
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20,
|
|
);
|
|
|
|
$node->content['group1']['organization'] = array(
|
|
'#prefix' => '<div id="organization">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Organization'), l($node->organization_title, 'node/'. $node->organization_nid)),
|
|
'#weight' => 1,
|
|
);
|
|
|
|
$node->content['group3'] = array(
|
|
'#prefix' => '<div class="stormfields">',
|
|
'#suffix' => '</div>',
|
|
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group3') : -18,
|
|
);
|
|
|
|
$node->content['group3']['email'] = array(
|
|
'#prefix' => '<div id="email">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Email'), l($node->email, 'mailto:'. $node->email, array('absolute' => TRUE))),
|
|
'#weight' => 1,
|
|
);
|
|
|
|
$node->content['group3']['www'] = array(
|
|
'#prefix' => '<div id="www">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('WWW'), l($node->www, $node->www, array('absolute' => TRUE))),
|
|
'#weight' => 2,
|
|
);
|
|
|
|
$node->content['group4'] = array(
|
|
'#prefix' => '<div class="stormfields">',
|
|
'#suffix' => '</div>',
|
|
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group4') : -17,
|
|
);
|
|
|
|
$node->content['group4']['phone'] = array(
|
|
'#prefix' => '<div id="phone">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Phone'), check_plain($node->phone)),
|
|
'#weight' => 1,
|
|
);
|
|
|
|
$node->content['group4']['im'] = array(
|
|
'#prefix' => '<div id="im">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('IM'), check_plain($node->im)),
|
|
'#weight' => 2,
|
|
);
|
|
|
|
$node->content['group_item'] = array(
|
|
'#prefix' => '<div class="stormfields">',
|
|
'#suffix' => '</div>',
|
|
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group_item') : -20,
|
|
);
|
|
$node->content['group_item']['author'] = array(
|
|
'#prefix' => '<div class="author">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Submitted by'), theme('username', $node)),
|
|
'#weight' => 1,
|
|
);
|
|
$node->content['group_item']['created'] = array(
|
|
'#prefix' => '<div class="created">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Created'), _format_small_date($node->created)),
|
|
'#weight' => 2,
|
|
);
|
|
if ($node->changed != $node->created) {
|
|
$node->content['group_item']['modified'] = array(
|
|
'#prefix' => '<div class="modified">',
|
|
'#suffix' => '</div>',
|
|
'#value' => theme('storm_view_item', t('Modified'), _format_small_date($node->changed)),
|
|
'#weight' => 3,
|
|
);
|
|
}
|
|
|
|
return $node;
|
|
}
|