Index: signup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v
retrieving revision 1.138
diff -u -p -r1.138 signup.module
--- signup.module	2 Aug 2008 09:14:24 -0000	1.138
+++ signup.module	3 Aug 2008 00:30:02 -0000
@@ -252,6 +252,7 @@ function signup_menu($may_cache) {
     $signup_path = './'. drupal_get_path('module', 'signup');
     if (module_exists('views')) {
       require_once($signup_path .'/signup_views.inc');
+      signup_views_menu($items, $may_cache);
     }
     else {
       require_once($signup_path .'/signup_no_views.inc');
@@ -1265,6 +1266,7 @@ function signup_settings_page() {
   $form['adv_settings'] = array(
     '#type' => 'fieldset',
     '#title' => t('Advanced settings'),
+    '#weight' => 5,
     '#collapsible' => true,
     '#collapsed' => true,
   );
@@ -1287,10 +1289,17 @@ function signup_settings_page() {
     '#description' => t('If the signup form is included at the bottom of each node, the signup form will be encapsulated in a collapsible fieldset. This setting controls if that fieldset is expanded or collapsed by default.'),
   );
 
+  if (module_exists('views')) {
+    // Inject a set of views-specific settings into the form.
+    _signup_views_admin_settings($form);
+  }
+
   // Use our own submit handler, so we can do some processing before
   // we hand control to system_settings_form_submit.
   $form['#submit']['signup_settings_page_submit'] = array();
-  return system_settings_form($form);
+  $final = system_settings_form($form);
+  $final['buttons']['#weight'] = 10;
+  return $final;
 }
 
 /**
Index: signup_views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup_views.inc,v
retrieving revision 1.9
diff -u -p -r1.9 signup_views.inc
--- signup_views.inc	16 Oct 2007 19:39:30 -0000	1.9
+++ signup_views.inc	3 Aug 2008 00:30:02 -0000
@@ -14,6 +14,55 @@
  */
 
 /**
+ * Menu items we only need to define if views is not enabled.
+ *
+ * @see signup_menu()
+ */
+function signup_views_menu(&$items, $may_cache) {
+  global $user;
+  if (!$may_cache && variable_get('signup_user_list_tab', 0)) {
+    // Signup list view for signup-enabled nodes.
+    if (arg(0) == 'node' && is_numeric(arg(1))) {
+      $node = node_load(array('nid' => arg(1)));
+      $view_all = user_access('view all signups') || user_access('administer all signups');
+      $view_own = !empty($user->uid) && $user->uid == $node->uid && user_access('administer signups for own content');
+      if (!empty($node->signup)) {
+        $items[] = array(
+          'path' => 'node/'. arg(1) .'/'. variable_get('signup_user_list_tab_path', 'signup-list'),
+          'title' => variable_get('signup_user_list_tab_title', t('Signup user list')),
+          'callback' => 'signup_user_list_view_tab',
+          'callback arguments' => array($node),
+          'access' => $view_all || $view_own,
+          'type' => MENU_LOCAL_TASK,
+          'weight' => 19,
+        );
+      }
+    }
+  }
+}
+
+function signup_user_list_view_tab($node) {
+  $view = views_get_view('signup_user_list');
+  $output = views_build_view('page', $view, array($node->nid));
+  drupal_set_title(check_plain($node->title));
+  return $output;
+}
+
+function _signup_views_admin_settings(&$form) {
+  $form['views'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Views-related settings'),
+    '#collapsible' => TRUE,
+  );
+  $form['views']['signup_user_list_tab'] = array(
+    '#type' => 'radios',
+    '#title' => t('Provide tab on signup-enabled content for a view of users who signed up.'),
+    '#options' => array(0 => t('Disabled'), 1 => t('Enabled')),
+    '#default_value' => variable_get('signup_user_list_tab', 0),
+  );
+}
+
+/**
  * Private implementation of hook_views_tables.
  */
 function _signup_views_tables() {
