nid = $person->nid;
$n->uid = $person->uid;
$n->organization_nid = $person->organization_nid;
$n->type = 'stormperson';
$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($n, $_GET) .' '. storm_icon_delete_node($n, $_GET),
'class' => 'storm_list_operations',
),
);
}
$o = theme('table', $header, $rows);
return $o;
}
function theme_stormperson_view($node, $teaser = FALSE, $page = FALSE) {
drupal_add_css(drupal_get_path('module', 'storm') . '/storm-node.css', 'module');
$node = node_prepare($node, $teaser);
$node->content['links'] = array(
'#prefix' => '
',
'#weight' => -25,
);
$node->content['group1'] = array(
'#prefix' => '',
'#suffix' => '
',
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20,
);
$node->content['group1']['organization'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('Organization'), l($node->organization_title, 'node/'. $node->organization_nid)),
'#weight' => 1,
);
$node->content['group2'] = array(
'#prefix' => '',
'#suffix' => '
',
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : -19,
);
$node->content['group2']['fullname'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('Fullname'), check_plain($node->fullname)),
'#weight' => 1,
);
$node->content['group3'] = array(
'#prefix' => '',
'#suffix' => '
',
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group3') : -18,
);
$node->content['group3']['email'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('Email'), l($node->email, 'mailto:'. $node->email, array('absolute' => TRUE))),
'#weight' => 1,
);
$node->content['group3']['www'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('WWW'), l($node->www, $node->www, array('absolute' => TRUE))),
'#weight' => 2,
);
$node->content['group4'] = array(
'#prefix' => '',
'#suffix' => '
',
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group4') : -17,
);
$node->content['group4']['phone'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('Phone'), check_plain($node->phone)),
'#weight' => 1,
);
$node->content['group4']['im'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('IM'), check_plain($node->im)),
'#weight' => 2,
);
$node->content['body_field'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', t('Description'), $node->content['body']['#value']),
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : -18,
);
unset($node->content['body']);
return $node;
}