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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Nov 12 23:22:19 2008 UTC (12 months, 1 week ago) by dww
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-RC1, 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, DRUPAL-6--1-0-BETA1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
#330829 by dww: Split theme functions out into separate include files.
1 <?php
2 // $Id$
3
4
5 /**
6 * @file
7 * Theme functions for signup administration.
8 */
9
10 /**
11 * Controls the output of the signup administration overview page.
12 *
13 * This page is located at admin/content/signup, and allows site-wide signup
14 * administrators to view signup-related information, close/open signups, etc,
15 * for all signup-enabled nodes on the site. There's a form to filter the
16 * results by signup status, which is rendered at the top of the page by
17 * default.
18 *
19 * @param $filter_status_form
20 * HTML representation of the signup status filter form.
21 * @param $signup_admin_form
22 * HTML representation of the main signup administration form.
23 *
24 * @return
25 * Themed output for the signup administration overview page.
26 */
27 function theme_signup_admin_page($filter_status_form, $signup_admin_form) {
28 $output = $filter_status_form;
29 $output .= $signup_admin_form;
30 return $output;
31 }
32
33 function theme_signup_filter_status_form($form) {
34 return '<div class="container-inline">'. drupal_render($form) .'</div>';
35 }
36
37 function theme_signup_admin_form($form) {
38 if (!isset($form['nids'])) {
39 $type = $_SESSION['signup_status_filter'];
40 switch ($type) {
41 case 'open':
42 $filter = t('open');
43 break;
44
45 case 'closed':
46 $filter = t('closed');
47 break;
48
49 default:
50 $filter = t('enabled');
51 break;
52 }
53 return t('No content is currently !status for signups.', array('!status' => $filter));
54 }
55 foreach ($form['nids'] as $nid => $node_form) {
56 if (!is_numeric($nid)) {
57 continue;
58 }
59 $row = array();
60 if (isset($node_form['start'])) {
61 $row[] = drupal_render($form['nids'][$nid]['start']);
62 }
63 $row[] = drupal_render($form['nids'][$nid]['title']);
64 $row[] = drupal_render($form['nids'][$nid]['total']);
65 $row[] = drupal_render($form['nids'][$nid]['limit']);
66 $row[] = drupal_render($form['nids'][$nid]['status']);
67 $row[] = drupal_render($form['nids'][$nid]['operations']);
68 $rows[] = $row;
69 }
70 $header = $form['header']['#value'];
71 unset($form['header']);
72 $output = theme('table', $header, $rows, array('style' => 'width:100%'));
73 $output .= drupal_render($form);
74 $pager = theme('pager', NULL, 25, 0);
75 if (!empty($pager)) {
76 $output .= $pager;
77 }
78 return $output;
79 }
80

  ViewVC Help
Powered by ViewVC 1.1.2