/[drupal]/contributions/modules/signup/theme/no_views.inc
ViewVC logotype

Contents of /contributions/modules/signup/theme/no_views.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Wed Nov 19 18:30:07 2008 UTC (12 months, 1 week ago) by dww
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-RC2, DRUPAL-6--1-0-RC3, DRUPAL-6--1-0-RC4, DRUPAL-6--1-0-RC5, DRUPAL-6--1-0-RC6, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +2 -2 lines
File MIME type: text/x-php
Fixed some minor code style bugs from coder.module.
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

  ViewVC Help
Powered by ViewVC 1.1.2