cvs diff: Diffing modules/signup Index: modules/signup/signup.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.css,v retrieving revision 1.1 diff -u -p -r1.1 signup.css --- modules/signup/signup.css 30 Mar 2007 23:44:31 -0000 1.1 +++ modules/signup/signup.css 17 Apr 2007 19:31:45 -0000 @@ -1,3 +1,5 @@ /* $Id: signup.css,v 1.1 2007/03/30 23:44:31 dww Exp $ */ html.js div.js-hide { display: none; } + +#signup-filter-status-form .form-submit { margin: 0; } Index: modules/signup/signup.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v retrieving revision 1.103 diff -u -p -r1.103 signup.module --- modules/signup/signup.module 11 Apr 2007 17:38:42 -0000 1.103 +++ modules/signup/signup.module 17 Apr 2007 19:31:48 -0000 @@ -177,28 +177,7 @@ function signup_menu($may_cache) { 'description' => t('View all signup-enabled posts, and open or close signups on them.'), 'access' => $access, 'callback' => 'signup_admin_page', - 'title' => t('Signup overview'), - ); - $items[] = array( - 'path' => 'admin/content/signup/overview', - 'title' => t('Overview'), - 'access' => $access, - 'type' => MENU_DEFAULT_LOCAL_TASK, - 'weight' => -10 - ); - $items[] = array( - 'path' => 'admin/content/signup/open', - 'title' => t('Open'), - 'type' => MENU_LOCAL_TASK, - 'access' => $access, - 'weight' => -8, - ); - $items[] = array( - 'path' => 'admin/content/signup/closed', - 'title' => t('Closed'), - 'type' => MENU_LOCAL_TASK, - 'access' => $access, - 'weight' => -6, + 'title' => t('Signup administration'), ); // Callbacks to open and close signups on a specific node. @@ -715,8 +694,9 @@ function signup_form_cancel($node) { * @ingroup signup_callback */ function signup_admin_page() { - $output = ''; - drupal_set_title(t('Signups')); + drupal_add_css(drupal_get_path('module', 'signup') .'/signup.css'); + $output = drupal_get_form('signup_filter_status_form'); + $type = $_SESSION['signup_status_filter']; // Figure out if the current user has permission to use signup broadcast. $access_broadcast = user_access('email all signed up users'); @@ -726,11 +706,10 @@ function signup_admin_page() { $event_select = $has_event ? ', e.event_start, e.timezone' : ''; $event_join = $has_event ? ' LEFT JOIN {event} e ON e.nid = n.nid' : ''; - // Limit query for open/closed tabs. - if (arg(3) == 'open') { + if ($type == 'open') { $where = ' WHERE s.status = 1'; } - else if (arg(3) == 'closed') { + else if ($type == 'closed') { $where = ' WHERE s.status = 0'; } else { @@ -801,6 +780,33 @@ function signup_admin_page() { return $output; } +function signup_filter_status_form() { + $options = array( + 'all' => t('All'), + 'open' => t('Open'), + 'closed' => t('Closed'), + ); + if (empty($_SESSION['signup_status_filter'])) { + $_SESSION['signup_status_filter'] = 'all'; + } + $form['filter'] = array( + '#type' => 'select', + '#title' => t('Filter by signup status'), + '#options' => $options, + '#default_value' => $_SESSION['signup_status_filter'], + ); + $form['submit'] = array('#type' => 'submit', '#value' => t('Filter')); + $form['#redirect'] = FALSE; + return $form; +} + +function theme_signup_filter_status_form($form) { + return '