mirror of https://github.com/BOINC/boinc.git
Druapl: Add additional admin notifications to Feature teams.
This commit is contained in:
parent
148f9adbd5
commit
9cb6f3dd35
|
@ -33,6 +33,116 @@ function teams_node_info() {
|
|||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_rules_defaults().
|
||||
*/
|
||||
function teams_rules_defaults() {
|
||||
return array(
|
||||
'rules' => array(
|
||||
'rules_notify_admins_about_error_creating_a_boinc_team' => array(
|
||||
'#type' => 'rule',
|
||||
'#set' => 'event_boincteam_create_team_error',
|
||||
'#label' => 'Notify admins about error creating a BOINC team',
|
||||
'#active' => 1,
|
||||
'#weight' => '0',
|
||||
'#categories' => array(
|
||||
'0' => 'boinc_team',
|
||||
'teams' => 'teams',
|
||||
),
|
||||
'#status' => 'default',
|
||||
'#conditions' => array(),
|
||||
'#actions' => array(
|
||||
'0' => array(
|
||||
'#type' => 'action',
|
||||
'#settings' => array(
|
||||
'from' => '',
|
||||
'subject' => 'Error creating new team',
|
||||
'message' => '[user:display-name] attempted to create team [team_name:string], but an error was returned. See function \'boincteam_create_form_submit\'. BOINC function \'make_team\' did not return a valid boinc_team object.',
|
||||
'#eval input' => array(
|
||||
'token_rules_input_evaluator' => array(
|
||||
'subject' => array(
|
||||
'0' => ':global',
|
||||
),
|
||||
'message' => array(
|
||||
'0' => 'team_name',
|
||||
'1' => 'user',
|
||||
'2' => ':global',
|
||||
),
|
||||
'from' => array(
|
||||
'0' => ':global',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'#name' => 'boinccore_rules_action_mail_to_admins',
|
||||
'#info' => array(
|
||||
'label' => 'Notify admins via email',
|
||||
'module' => 'BOINC core',
|
||||
'eval input' => array(
|
||||
'0' => 'subject',
|
||||
'1' => 'message',
|
||||
'2' => 'from',
|
||||
),
|
||||
),
|
||||
'#weight' => 0.0,
|
||||
),
|
||||
),
|
||||
'#version' => 6003,
|
||||
),
|
||||
'rules_notify_admins_about_error_creating_a_boinc_team_no_pathauto' => array(
|
||||
'#type' => 'rule',
|
||||
'#set' => 'event_boincteam_create_team_nopathauto_error',
|
||||
'#label' => 'Notify admins about error creating a BOINC team no pathauto',
|
||||
'#active' => 1,
|
||||
'#weight' => '0',
|
||||
'#categories' => array(
|
||||
'0' => 'boinc_team',
|
||||
'teams' => 'teams',
|
||||
),
|
||||
'#status' => 'default',
|
||||
'#conditions' => array(),
|
||||
'#actions' => array(
|
||||
'0' => array(
|
||||
'#type' => 'action',
|
||||
'#settings' => array(
|
||||
'from' => '',
|
||||
'subject' => 'Error creating BOINC team - no pathauo module',
|
||||
'message' => '[user:display-name] attempted to create team [team_name:string], but no pathauto module detected. See function \'boincteam_create_form_submit\'.',
|
||||
'#eval input' => array(
|
||||
'token_rules_input_evaluator' => array(
|
||||
'subject' => array(
|
||||
'0' => ':global',
|
||||
),
|
||||
'message' => array(
|
||||
'0' => 'team_name',
|
||||
'1' => 'user',
|
||||
'2' => ':global',
|
||||
),
|
||||
'from' => array(
|
||||
'0' => ':global',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'#name' => 'boinccore_rules_action_mail_to_admins',
|
||||
'#info' => array(
|
||||
'label' => 'Notify admins via email',
|
||||
'module' => 'BOINC core',
|
||||
'eval input' => array(
|
||||
'0' => 'subject',
|
||||
'1' => 'message',
|
||||
'2' => 'from',
|
||||
),
|
||||
),
|
||||
'#weight' => 0.0,
|
||||
),
|
||||
),
|
||||
'#version' => 6003,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_views_api().
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,10 @@ dependencies[] = "features"
|
|||
dependencies[] = "page_manager"
|
||||
dependencies[] = "panels"
|
||||
dependencies[] = "panels_mini"
|
||||
dependencies[] = "rules"
|
||||
dependencies[] = "rules_admin"
|
||||
dependencies[] = "strongarm"
|
||||
dependencies[] = "token"
|
||||
dependencies[] = "upload"
|
||||
dependencies[] = "views"
|
||||
dependencies[] = "views_content"
|
||||
|
@ -21,6 +24,7 @@ features[node][] = "team"
|
|||
features[page_manager_pages][] = "create_team"
|
||||
features[page_manager_pages][] = "teams_landing"
|
||||
features[page_manager_pages][] = "view_team"
|
||||
features[rules_categories][] = "boinc_team"
|
||||
features[user_permission][] = "create boincteam"
|
||||
features[user_permission][] = "join boincteam"
|
||||
features[variable][] = "comment_anonymous_team"
|
||||
|
|
Loading…
Reference in New Issue