| 1 |
<?php
|
| 2 |
// $Id: no_views.inc,v 1.1 2008/11/12 23:22:19 dww Exp $
|
| 3 |
|
| 4 |
|
| 5 |
/**
|
| 6 |
* @file
|
| 7 |
* Deprecated code if you don't have Views enabled.
|
| 8 |
*/
|
| 9 |
|
| 10 |
/**
|
| 11 |
* Formats the list of users signed up for a particular node.
|
| 12 |
*
|
| 13 |
* @param $node
|
| 14 |
* The node object that users have signed up for.
|
| 15 |
* @param $registered_signups
|
| 16 |
* Array of objects with data for each registered user signed up.
|
| 17 |
* @param $anon_signups
|
| 18 |
* Array of objects with data for each anonymous user signed up.
|
| 19 |
*/
|
| 20 |
function theme_signup_user_list($node, $registered_signups, $anon_signups) {
|
| 21 |
$header = array(array('data' => t('!users signed up', array('!users' => format_plural((count($registered_signups) + count($anon_signups)), '1 individual', '@count individuals')))));
|
| 22 |
$rows = array();
|
| 23 |
foreach ($registered_signups as $signup) {
|
| 24 |
$rows[] = array(theme('username', $signup));
|
| 25 |
}
|
| 26 |
if (!empty($anon_signups)) {
|
| 27 |
$rows[] = array(t('!count anonymous', array('!count' => count($anon_signups))));
|
| 28 |
}
|
| 29 |
return theme('table', $header, $rows);
|
| 30 |
}
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Format a user signup for display in a schedule list.
|
| 34 |
*
|
| 35 |
* @param node
|
| 36 |
* The node which needs theming
|
| 37 |
*/
|
| 38 |
function theme_signup_user_schedule($node) {
|
| 39 |
$output = '';
|
| 40 |
$output .= '<div class="signup-user-schedule"><div class="'. $node->type .'signup-title"><h4>'. l($node->title, "node/$node->nid") .'</h4></div></div>';
|
| 41 |
return $output;
|
| 42 |
}
|
| 43 |
|