Changes in header

Former-commit-id: 3c69b91277f0078a65764c297126d3ebb0dfc11c
This commit is contained in:
Tatiana Llorente 2019-03-25 12:41:39 +01:00
parent 49a28eb13c
commit fe7103ba9c
17 changed files with 119 additions and 100 deletions

View File

@ -44,8 +44,6 @@ if ($current_package == 0) {
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
echo '</a> ';
echo '<a class="footer">'.__('Page generated at').' '.date($config['date_format']);
echo '</a><br /><span>&reg; '.get_copyright_notice().'</span>';
if (isset($config['debug'])) {
$cache_info = [];

View File

@ -82,7 +82,7 @@ require_once 'include/functions_notifications.php';
$header_chat .= '</a></span></div>';
// Search
// Search.
$acl_head_search = true;
if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
$acl_head_search = db_get_sql(
@ -94,7 +94,7 @@ require_once 'include/functions_notifications.php';
}
if ($acl_head_search) {
// Search bar
// Search bar.
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) {
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
@ -116,15 +116,13 @@ require_once 'include/functions_notifications.php';
}
$search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
onkeyup="javascript: fieldKeyWordEmpty = false;"
style="margin-top:5px;" class="search_input" />';
onkeyup="javascript: fieldKeyWordEmpty = false;" class="search_input" />';
// $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>';
$header_searchbar = '<div id="header_searchbar">'.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
$header_searchbar .= $search_bar.'</div>';
$header_searchbar = '<div id="header_searchbar">'.$search_bar.'</div>';
}
@ -207,35 +205,25 @@ require_once 'include/functions_notifications.php';
$header_autorefresh_counter = '<div id="header_autorefresh_counter" style="'.$display_counter.'">'.$autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional.'</div>';
// Qr.
if ($config['show_qr_code_header'] == 0) {
$show_qr_code_header = 'display: none;';
// Support.
if (defined('PANDORA_ENTERPRISE')) {
$header_support_link = 'https://support.artica.es/';
} else {
$show_qr_code_header = 'display: inline;';
$header_support_link = 'https://pandorafms.com/forums/';
}
$header_qr = '<div id="header_qr" style="'.$show_qr_code_header.'"><div id="qr_code_container"><a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon_gray.png',
true,
[
'alt' => __('QR Code of the page'),
'title' => __('QR Code of the page'),
]
).'</a></div></div>';
$header_support = '<div id="header_support">';
$header_support .= '<a href="'.$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_support">';
$header_docu .= '<a href="https://wiki.pandorafms.com/index.php?title=Main_Page" target="_blank">';
$header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']);
$header_docu .= '</a></div>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
echo "<div id='qrcode_container_image'></div>";
echo '</div>';
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
// User.
if (is_user_admin($config['id_user']) == 1) {
$header_user = html_print_image('images/header_user_admin_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
@ -250,9 +238,9 @@ require_once 'include/functions_notifications.php';
$header_logout .= html_print_image('images/header_logout_gray.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$header_logout .= '</a></div>';
echo '<div class="header_left">'.$header_autorefresh, $header_autorefresh_counter, $header_qr, $header_chat.'</div>
<div class="header_center">'.$header_searchbar, $header_discovery, $servers_list.'</div>
<div class="header_right">'.$header_user, $header_logout.'</div>';
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
<div class="header_center">'.$header_searchbar.'</div>
<div class="header_right">'.$header_chat, $header_autorefresh, $header_autorefresh_counter, $header_discovery, $servers_list, $header_support, $header_docu, $header_user, $header_logout.'</div>';
?>
</div> <!-- Closes #table_header_inner -->
</div> <!-- Closes #table_header -->

View File

@ -70,7 +70,7 @@ $custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (!defined('PANDORA_ENTERPRISE')) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_green.png';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {

View File

@ -462,6 +462,20 @@ if (enterprise_installed()) {
$row++;
}
// Title Header
if (enterprise_installed()) {
$table_styles->data[$row][0] = __('Title (header)');
$table_styles->data[$row][1] = html_print_input_text('custom_title_header', $config['custom_title_header'], '', 50, 40, true);
$row++;
}
// Subtitle Header
if (enterprise_installed()) {
$table_styles->data[$row][0] = __('Subtitle (header)');
$table_styles->data[$row][1] = html_print_input_text('custom_subtitle_header', $config['custom_subtitle_header'], '', 50, 40, true);
$row++;
}
// login title1
if (enterprise_installed()) {
$table_styles->data[$row][0] = __('Title 1 (login)');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 424 B

View File

@ -896,6 +896,14 @@ function config_update_config()
$error_update[] = __('Custom networkmap center logo');
}
if (!config_update_value('custom_title_header', (string) get_parameter('custom_title_header'))) {
$error_update[] = __('Custom title header');
}
if (!config_update_value('custom_subtitle_header', (string) get_parameter('custom_subtitle_header'))) {
$error_update[] = __('Custom subtitle header');
}
if (!config_update_value('custom_title1_login', (string) get_parameter('custom_title1_login'))) {
$error_update[] = __('Custom title1 login');
}
@ -1792,7 +1800,7 @@ function config_process_config()
}
if (!isset($config['custom_logo'])) {
config_update_value('custom_logo', 'pandora_logo_head_green.png');
config_update_value('custom_logo', 'pandora_logo_head_4.png');
}
if (!isset($config['custom_logo_collapsed'])) {
@ -1827,6 +1835,14 @@ function config_process_config()
config_update_value('custom_mobile_console_logo', '');
}
if (!isset($config['custom_title_header'])) {
config_update_value('custom_title_header', __('Pandora FMS'));
}
if (!isset($config['custom_subtitle_header'])) {
config_update_value('custom_subtitle_header', __('the Flexible Monitoring System'));
}
if (!isset($config['custom_title1_login'])) {
config_update_value('custom_title1_login', __('PANDORA FMS'));
}

View File

@ -389,7 +389,7 @@ ul li a:hover {
.button_collapse {
height: 38px;
background-color: #6c6c6d;
background-color: #505050;
width: 60px; /* This is overwritten by the classic menu (215px) */
text-align: center;
color: #fff;

View File

@ -647,11 +647,10 @@ a.footer span {
}
div#foot {
padding-top: 8px;
padding-bottom: 5px;
padding-top: 10px;
padding-bottom: 10px;
text-align: center;
background: #343434;
height: 30px;
clear: both;
width: auto;
}
@ -659,7 +658,7 @@ div#foot {
div#foot a,
div#foot span {
font-family: "Open Sans", sans-serif;
font-size: 8.5pt;
font-size: 8pt;
color: #9ca4a6;
}
@ -2043,15 +2042,29 @@ div#pandora_logo_header {
justify-content: space-between;
}
.header_title {
font-weight: 600;
font-size: 10.5pt;
font-family: "lato-bolder", "Open Sans", sans-serif !important;
}
.header_subtitle {
font-size: 10pt;
font-family: "lato-bolder", "Open Sans", sans-serif !important;
}
#header_table_inner a,
#header_table_inner span {
font-family: "Open Sans", sans-serif;
}
#header_table_inner a:hover {
text-decoration: none;
}
.header_left {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
}
.header_center {
@ -2066,64 +2079,40 @@ div#pandora_logo_header {
align-items: center;
}
.header_left > div,
.header_center > div {
padding-right: 15px;
}
.header_right > div {
padding-left: 15px;
}
#header_table_inner #header_user span {
color: #777;
}
.header_left img,
.header_center img,
.header_right img {
vertical-align: middle;
}
#header_chat {
padding-left: 0;
padding-right: 15px;
}
#header_autorefresh {
padding-left: 0;
}
#header_table_inner #header_user span {
color: #777;
align-self: center;
}
#header_table_inner #header_user a {
display: flex;
justify-content: center;
}
#header_user img {
padding-right: 5px;
}
#header_alert,
#header_message {
padding-right: 0px;
}
#header_alert p,
#header_message p {
border-radius: 50%;
padding: 0;
margin: 0;
width: 15px;
position: relative;
height: 15px;
top: -5px;
text-align: center;
display: inline-block;
vertical-align: super;
}
#header_alert p {
background-color: #ec4e1b;
left: -12px;
}
#header_message p {
background-color: #82b92e;
left: -9px;
}
#header_alert span,
#header_message span {
color: #fff;
font-size: 7pt;
font-weight: 600;
font-family: "Open Sans", sans-serif;
div#header_autorefresh_counter {
padding-left: 0;
}
.autorefresh_disabled {
@ -2135,10 +2124,24 @@ a.autorefresh_txt,
color: #1c1c1c;
font-size: 8.5pt;
}
/*
#combo_refr select {
margin-right: 8px;
}*/
@media screen and (min-width: 1024px) and (max-width: 1200px) {
#header_searchbar input.search_input {
width: 135px;
}
#header_user span {
display: none;
}
.header_right > div {
padding-left: 10px;
}
}
@media screen and (max-width: 1300px) {
.header_right > div {
padding-left: 10px;
}
}
.disabled_module {
color: #aaa;
@ -2868,9 +2871,8 @@ input.search_input {
background-color: #f2f6f7 !important;
padding: 0px;
margin: 0;
width: 200px;
height: 35px;
margin-bottom: 5px;
width: 250px;
height: 30px;
margin-left: 2px;
padding-left: 15px;
padding-right: 40px;
@ -4422,14 +4424,15 @@ div#dialog_messages table th:last-child {
*/
.notification-ball {
border: #343434 solid 2px;
border-radius: 50%;
width: 20px;
height: 20px;
width: 24px;
height: 24px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #fff;
font-weight: bold;
}
.notification-ball-no-messages {