diff --git a/includes/notification.inc b/includes/notification.inc index 675e66f..dfc5005 100644 --- a/includes/notification.inc +++ b/includes/notification.inc @@ -39,7 +39,7 @@ function project_issue_notification_user_form(&$form_state, $account) { $form['project_issue_notification'] = array( '#type' => 'fieldset', - '#title' => t('Issue notifications'), + '#title' => t('Issue e-mail notifications'), '#collapsible' => TRUE, ); @@ -48,8 +48,25 @@ function project_issue_notification_user_form(&$form_state, $account) { // Per-project notification levels. $form['project_issue_notification']['projects'] = array( '#theme' => 'project_issue_notification_projects_table', - '#header' => array(t('Project'), t('Notification level'), t('Operations')), + '#header' => array(t('Project'), t('Send e-mail'), t('Operations')), ); + + $form['project_issue_notification']['projects']['default'] = array( + 'title' => array( + '#type' => 'item', + '#value' => t('Default'), + '#description' => t('(override individual projects below)'), + ), + 'level' => array( + '#type' => 'select', + '#options' => $options, + '#default_value' => $account->project_issue_notification['level'], + '#parents' => array('project_issue_notification', 'projects', 'default'), + ), + // We don't need any operations for this one. + 'operations' => array(), + ); + $result = db_query(db_rewrite_sql("SELECT pisp.nid, n.title, pisp.level FROM {project_issue_notification_project} pisp INNER JOIN {node} n ON n.nid = pisp.nid @@ -91,20 +108,6 @@ function project_issue_notification_user_form(&$form_state, $account) { 'operations' => array(), ); - $form['project_issue_notification']['projects']['default'] = array( - 'title' => array( - '#value' => t('Default for all other projects'), - ), - 'level' => array( - '#type' => 'select', - '#options' => $options, - '#default_value' => $account->project_issue_notification['level'], - '#parents' => array('project_issue_notification', 'projects', 'default'), - ), - // We don't need any operations for this one. - 'operations' => array(), - ); - $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), @@ -209,16 +212,7 @@ function project_issue_notification_project_form($form_state, $project_nid) { } project_project_set_breadcrumb($project, TRUE); - drupal_set_title(t('Receive e-mail notifications for @project issues', array('@project' => $project->title))); - - $form['help'] = array( - '#prefix' => '

', - '#value' => t('These settings apply to the %project project only. You can see and change settings for all projects in your user account.', array( - '%project' => $project->title, - '@account-url' => url('user/' . $user->uid . '/project-issue'), - )), - '#suffix' => '

', - ); + drupal_set_title(t('Manage e-mail notifications for @project issues', array('@project' => $project->title))); $form['nid'] = array( '#type' => 'value', @@ -232,10 +226,13 @@ function project_issue_notification_project_form($form_state, $project_nid) { $level = project_issue_notification_project_setting_load($user->uid, $project->nid); $form['level'] = array( '#type' => 'radios', - '#title' => t('Notification level'), + '#title' => t('Send e-mail'), '#options' => _project_issue_notification_levels(), '#default_value' => $level, - '#description' => t('Receive an e-mail notification when an issue for this project is updated.'), + '#description' => t('These settings only apply to the %project project. Manage notifications for all projects in your user account.', array( + '%project' => $project->title, + '@account-url' => url('user/' . $user->uid . '/project-issue'), + )), ); $form['actions']['submit'] = array( diff --git a/project_issue.module b/project_issue.module index c662f17..e5ccfdb 100644 --- a/project_issue.module +++ b/project_issue.module @@ -2051,9 +2051,9 @@ function project_issue_query_result_links($project_arg = NULL) { } if ($user->uid) { $links['subscribe'] = array( - 'title' => t('Subscribe'), + 'title' => t('E-mail notifications'), 'href' => "project/issues/subscribe-mail/$uri", - 'attributes' => array('title' => t('Receive e-mail updates about @project issues.', array('@project' => $uri))), + 'attributes' => array('title' => t('Manage e-mail notifications about @project issues.', array('@project' => $uri))), ); } }