function spaces_contacts_pageview in Spaces 5
Same name and namespace in other branches
- 5.2 spaces_contacts/spaces_contacts.module \spaces_contacts_pageview()
Page callback that displays a user contact listing
1 string reference to 'spaces_contacts_pageview'
- spaces_contacts_menu in spaces_contacts/
spaces_contacts.module - Implementation of hook_menu()
File
- spaces_contacts/
spaces_contacts.module, line 99
Code
function spaces_contacts_pageview() {
drupal_set_title(t('Contacts'));
context_set('spaces', 'feature', 'contacts');
context_set('theme', 'layout', 'wide');
$rows = array();
$users = _spaces_contacts_users();
foreach ($users as $account) {
$row = array(
theme('user_picture', $account),
theme('username', $account),
l($account->mail, 'mailto:' . $account->mail),
);
if (module_exists('profile')) {
$row[] = $account->profile_organization ? $account->profile_organization : null;
}
$rows[] = $row;
}
$labels = array(
null,
t('Name'),
t('Email'),
);
if (module_exists('profile')) {
$labels[] = t('Organization');
}
// wrap the table as if it were produced by a view
return "<div class='view-content'>" . theme('table', $labels, $rows, array(
'class' => 'userlist',
)) . "</div>";
}