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.2.2 diff -u -p -r1.1.2.2 signup.css --- modules/signup/signup.css 30 Mar 2007 23:45:53 -0000 1.1.2.2 +++ modules/signup/signup.css 17 Apr 2007 19:41:53 -0000 @@ -1,3 +1,5 @@ /* $Id: signup.css,v 1.1.2.2 2007/03/30 23:45:53 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.74.2.26 diff -u -p -r1.74.2.26 signup.module --- modules/signup/signup.module 8 Apr 2007 03:30:08 -0000 1.74.2.26 +++ modules/signup/signup.module 17 Apr 2007 19:41:54 -0000 @@ -165,28 +165,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. @@ -690,19 +669,19 @@ 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']; // Add optional SQL to the query if the event module is enabled. $has_event = module_exists('event'); $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.completed = 0'; } - else if (arg(3) == 'closed') { + else if ($type == 'closed') { $where = ' WHERE s.completed = 1'; } else { @@ -768,6 +747,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 '
'. drupal_render($form) .'
'; +} + +function signup_filter_status_form_submit($form_id, $form_values) { + $_SESSION['signup_status_filter'] = $form_values['filter']; +} /** * Callback function for canceling signups cvs diff: Diffing modules/signup/contrib cvs diff: Diffing modules/signup/contrib/signup_conflicts cvs diff: Diffing modules/signup/contrib/signup_ecommerce cvs diff: Diffing modules/signup/po