Merge branch 'ent-4747-cambiar-urls-en-consola' into 'develop'
Added docs and support urls in console. Fixed bugs See merge request artica/pandorafms!2852
This commit is contained in:
commit
f0fee8f709
|
@ -331,19 +331,19 @@ if ($config['menu_type'] == 'classic') {
|
|||
|
||||
// Support.
|
||||
if (defined('PANDORA_ENTERPRISE')) {
|
||||
$header_support_link = 'https://support.artica.es/';
|
||||
$header_support_link = $config['custom_support_url'];
|
||||
} else {
|
||||
$header_support_link = 'https://pandorafms.com/forums/';
|
||||
}
|
||||
|
||||
$header_support = '<div id="header_support">';
|
||||
$header_support .= '<a href="'.$header_support_link.'" target="_blank">';
|
||||
$header_support .= '<a href="'.ui_get_full_external_url($header_support_link).'" target="_blank">';
|
||||
$header_support .= html_print_image('/images/header_support.png', true, ['title' => __('Go to support'), 'class' => 'bot', 'alt' => 'user']);
|
||||
$header_support .= '</a></div>';
|
||||
|
||||
// Documentation.
|
||||
$header_docu = '<div id="header_docu">';
|
||||
$header_docu .= '<a href="https://wiki.pandorafms.com/index.php?title=Main_Page" target="_blank">';
|
||||
$header_docu .= '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">';
|
||||
$header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']);
|
||||
$header_docu .= '</a></div>';
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name(
|
|||
echo '</td>';
|
||||
|
||||
echo '<td style="border:1px solid #FFF; text-align:center;">';
|
||||
echo '<a href="'.$config['custom_docs_url'].'" target="_blank" style="text-decoration:none;">'.html_print_image(
|
||||
echo '<a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank" style="text-decoration:none;">'.html_print_image(
|
||||
'images/documentation.png',
|
||||
true,
|
||||
[
|
||||
|
@ -96,7 +96,7 @@ echo '<div id="login_help_dialog" title="'.__('Welcome to %s', get_product_name(
|
|||
]
|
||||
).'</a>';
|
||||
echo '<br style="margin-bottom: 40px;" />';
|
||||
echo '<a style="font-size: 9pt;" href="'.$config['custom_docs_url'].'" target="_blank">'.__('Documentation').'</span></a>';
|
||||
echo '<a style="font-size: 9pt;"href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Documentation').'</span></a>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
|
|
|
@ -96,16 +96,16 @@ echo '<div id="header_login">';
|
|||
|
||||
echo '<div id="list_icon_docs_support"><ul>';
|
||||
if ($docs_logo !== false) {
|
||||
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
|
||||
}
|
||||
|
||||
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank">'.__('Docs').'</li>';
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Docs').'</li>';
|
||||
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
if ($support_logo !== false) {
|
||||
echo '<li id="li_margin_left"><a href="'.$config['custom_support_url'].'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
echo '<li id="li_margin_left"><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
}
|
||||
|
||||
echo '<li><a href="'.$config['custom_support_url'].'" target="_blank">'.__('Support').'</li>';
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_support_url']).'" target="_blank">'.__('Support').'</li>';
|
||||
} else {
|
||||
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
echo '<li>'.__('Support').'</li>';
|
||||
|
|
|
@ -5734,3 +5734,23 @@ function ui_print_comments($comments)
|
|||
return io_safe_output($comentario);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get complete external pandora url.
|
||||
*
|
||||
* @param string $url Url to be parsed.
|
||||
*
|
||||
* @return string Full url.
|
||||
*/
|
||||
function ui_get_full_external_url(string $url)
|
||||
{
|
||||
$url_parsed = parse_url($url);
|
||||
if ($url_parsed) {
|
||||
if (!isset($url_parsed['scheme'])) {
|
||||
$url = 'http://'.$url;
|
||||
}
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue