$organization) {
$n = new stdClass();
$n->nid = $organization->nid;
$n->uid = $organization->uid;
$n->type = 'stormorganization';
$rows[] = array(
l($organization->title, 'node/'. $organization->nid),
$countries[$organization->country],
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_stormorganization_view($node, $teaser = FALSE, $page = FALSE, $links = FALSE) {
$node = node_prepare($node, $teaser);
unset($node->content['body']);
$w = 0;
$node->content['stormorganization'] = array(
'#prefix' => '
',
'#suffix' => '
',
'#weight' => $w++,
);
$w = 0;
$node->content['stormorganization']['fullname'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Fullname', $node->fullname),
'#weight' => $w++,
);
$node->content['stormorganization']['country'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Country', $node->country),
'#weight' => $w++,
);
$node->content['stormorganization']['provstate'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Province / State', $node->provstate),
'#weight' => $w++,
);
$node->content['stormorganization']['city'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'City', $node->city),
'#weight' => $w++,
);
$node->content['stormorganization']['zip'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Zip', $node->zip),
'#weight' => $w++,
);
$node->content['stormorganization']['address'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Address', $node->address),
'#weight' => $w++,
);
$node->content['stormorganization']['www'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'WWW', l($node->www, 'http://'. $node->www, NULL, NULL, TRUE)),
'#weight' => $w++,
);
$node->content['stormorganization']['email'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Email', l($node->email, 'mailto:'. $node->email, NULL, NULL, TRUE)),
'#weight' => $w++,
);
$node->content['stormorganization']['currency'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Currency', $node->currency),
'#weight' => $w++,
);
$languages = language_list('language', TRUE);
$languages_options = array();
foreach ($languages as $language_code => $language) {
$languages_options[$language_code] = $language->name;
}
$node->content['stormorganization']['language'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Language', $languages_options[$node->orglanguage]),
'#weight' => $w++,
);
$node->content['stormorganization']['vatid'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'VAT id', $node->vatid),
'#weight' => $w++,
);
$node->content['stormorganization']['note'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => theme('storm_view_item', 'Note', $node->body),
'#weight' => $w++,
);
$node->content['stormorganization']['links'] = array(
'#prefix' => '',
'#suffix' => '
',
'#weight' => $w++,
);
$w = 0;
if (module_exists('stormperson')) {
$node->content['stormorganization']['links']['people'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => l(t('People'), 'storm/people', array(), 'organization_nid='. $node->nid, NULL, TRUE) .'
',
'#weight' => $w++,
);
}
if (module_exists('stormproject')) {
$node->content['stormorganization']['links']['projects'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => l(t('Projects'), 'storm/projects', array(), 'organization_nid='. $node->nid, NULL, TRUE) .'
',
'#weight' => $w++,
);
}
if (module_exists('stormnote')) {
$node->content['stormorganization']['links']['notes'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => l(t('Notes'), 'storm/notes', array(), 'organization_nid='. $node->nid, NULL, TRUE) .'
',
'#weight' => $w++,
);
}
if (module_exists('stormticket')) {
$node->content['stormorganization']['links']['tickets'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => l(t('Tickets'), 'storm/tickets', array(), 'organization_nid='. $node->nid, NULL, TRUE) .'
',
'#weight' => $w++,
);
}
if (module_exists('stormtimetracking')) {
$node->content['stormorganization']['links']['timetrackings'] = array(
'#prefix' => '',
'#suffix' => '
',
'#value' => l(t('Timetrackings'), 'storm/timetrackings', array(), 'organization_nid='. $node->nid, NULL, TRUE) .'
',
'#weight' => $w++,
);
}
return $node;
}