mirror of https://github.com/BOINC/boinc.git
Add a configurable link in the footer to the Applications page
(DBOINCP-121)
This commit is contained in:
parent
00c0eea9e8
commit
e235d91a41
|
@ -42,6 +42,7 @@ function boincuser_admin_environment(&$form_state) {
|
||||||
'boinc_user_image_dir' => variable_get('boinc_user_image_dir', ''),
|
'boinc_user_image_dir' => variable_get('boinc_user_image_dir', ''),
|
||||||
'boinc_host_sched_logs_dir' => variable_get('boinc_host_sched_logs_dir', ''),
|
'boinc_host_sched_logs_dir' => variable_get('boinc_host_sched_logs_dir', ''),
|
||||||
'boinc_server_status_url' => variable_get('boinc_server_status_url', ''),
|
'boinc_server_status_url' => variable_get('boinc_server_status_url', ''),
|
||||||
|
'boinc_app_list_url' => variable_get('boinc_app_list_url', ''),
|
||||||
'boinc_debug_mode' => variable_get('boinc_debug_mode', 0),
|
'boinc_debug_mode' => variable_get('boinc_debug_mode', 0),
|
||||||
);
|
);
|
||||||
//drupal_set_message(print_r($default, true));
|
//drupal_set_message(print_r($default, true));
|
||||||
|
@ -127,6 +128,17 @@ function boincuser_admin_environment(&$form_state) {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
$form['boinc_app_list_url'] = array(
|
||||||
|
'#type' => 'textfield',
|
||||||
|
'#title' => t('BOINC applications page URL (optional)'),
|
||||||
|
'#default_value' => $default['boinc_app_list_url'],
|
||||||
|
'#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).',
|
||||||
|
array(
|
||||||
|
'%full_url' => $base_url . '/apps.php',
|
||||||
|
'%relative_url' => 'apps.php',
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
$form['boinc_host_sched_logs_dir'] = array(
|
$form['boinc_host_sched_logs_dir'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('BOINC host scheduler log directory (optional)'),
|
'#title' => t('BOINC host scheduler log directory (optional)'),
|
||||||
|
|
|
@ -173,6 +173,12 @@ function boinc_preprocess_page(&$vars, $hook) {
|
||||||
}
|
}
|
||||||
$vars['server_status_url'] = $server_status_url;
|
$vars['server_status_url'] = $server_status_url;
|
||||||
|
|
||||||
|
$app_list_url = variable_get('boinc_app_list_url', '');
|
||||||
|
if (!$app_list_url) {
|
||||||
|
$app_list_url = 'apps.php';
|
||||||
|
}
|
||||||
|
$vars['app_list_url'] = $app_list_url;
|
||||||
|
|
||||||
// Remove title from search page
|
// Remove title from search page
|
||||||
if (arg(0) == 'search') {
|
if (arg(0) == 'search') {
|
||||||
unset($vars['title']);
|
unset($vars['title']);
|
||||||
|
|
|
@ -333,6 +333,9 @@
|
||||||
<ul id="server-status" class="tab-list">
|
<ul id="server-status" class="tab-list">
|
||||||
|
|
||||||
<li class="first tab">
|
<li class="first tab">
|
||||||
|
<?php print l(bts('Applications'), $app_list_url); ?>
|
||||||
|
</li>
|
||||||
|
<li class="last tab">
|
||||||
<?php print l(bts('Server status'), $server_status_url); ?>
|
<?php print l(bts('Server status'), $server_status_url); ?>
|
||||||
</li>
|
</li>
|
||||||
<!--<li class="first tab">Server status</li>
|
<!--<li class="first tab">Server status</li>
|
||||||
|
|
Loading…
Reference in New Issue