change discovery headers and add breadcrumbs to them
Former-commit-id: 93183474aabaeccfd3893cacd78c4d6ddf764502
This commit is contained in:
parent
d1bd5fbb1a
commit
ec999341ba
|
@ -15,9 +15,6 @@ if (! check_acl($config['id_user'], 0, 'AW')) {
|
|||
|
||||
ui_require_css_file('discovery');
|
||||
|
||||
ui_print_page_header(__('Discovery'), '', false, '', true);
|
||||
|
||||
|
||||
/**
|
||||
* Mask class names.
|
||||
*
|
||||
|
|
|
@ -96,7 +96,8 @@ class DiscoveryTaskList extends Wizard
|
|||
]
|
||||
);
|
||||
|
||||
$this->printHeader();
|
||||
// Header
|
||||
ui_print_page_header(__('Task list'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
|
||||
// Show redirected messages from discovery.php.
|
||||
if ($status === 0) {
|
||||
|
|
|
@ -152,7 +152,7 @@ class HostDevices extends Wizard
|
|||
]
|
||||
);
|
||||
|
||||
$this->printHeader();
|
||||
ui_print_page_header(__('Host & devices'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
|
||||
$this->printBigButtonsList($buttons);
|
||||
return;
|
||||
|
@ -527,7 +527,7 @@ class HostDevices extends Wizard
|
|||
if ($this->page < $this->maxPagesNetScan) {
|
||||
// Avoid to print header out of wizard.
|
||||
$this->prepareBreadcrum($breadcrum);
|
||||
$this->printHeader();
|
||||
ui_print_page_header(__('NetScan definition'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
}
|
||||
|
||||
if (isset($this->page) === true
|
||||
|
|
|
@ -196,20 +196,34 @@ class Wizard
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function prepareBreadcrum(array $urls, bool $add=false)
|
||||
public function prepareBreadcrum(array $urls, bool $add=false, bool $separator_beginning=false)
|
||||
{
|
||||
$bc = [];
|
||||
$i = 0;
|
||||
$count = 0;
|
||||
$array_size = count($urls);
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$count++;
|
||||
|
||||
if ($url['selected'] == 1) {
|
||||
$class = 'selected';
|
||||
} else {
|
||||
$class = '';
|
||||
}
|
||||
|
||||
$bc[$i] = '<a href="'.$url['link'].'" class="text_color">';
|
||||
$bc[$i] .= '<div class="arrow_box '.$class.'">'.$url['label'];
|
||||
$bc[$i++] .= '</div></a>';
|
||||
$bc[$i] = '';
|
||||
|
||||
if ($separator_beginning === true) $bc[$i] .= '<span class="breadcrumb_link"> / </span>';
|
||||
|
||||
$bc[$i] .= '<span><a class="breadcrumb_link '.$class.'" href="'.$url['link'].'">';
|
||||
$bc[$i] .= $url['label'];
|
||||
$bc[$i] .= '</a>';
|
||||
if ($count < $array_size) $bc[$i] .= '<span class="breadcrumb_link"> / </span>';
|
||||
|
||||
$bc[$i] .= '</span>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($add === true) {
|
||||
|
@ -257,7 +271,7 @@ class Wizard
|
|||
*/
|
||||
public function printBreadcrum()
|
||||
{
|
||||
return '<h1 class="wizard">'.implode('', $this->breadcrum).'</h1>';
|
||||
return implode('', $this->breadcrum);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -353,7 +353,10 @@ class CustomNetScan extends Wizard
|
|||
if ($this->page < $this->MAXPAGES) {
|
||||
// Avoid to print header out of wizard.
|
||||
$this->prepareBreadcrum($breadcrum);
|
||||
$this->printHeader();
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('NetScan Custom definition'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
|
||||
}
|
||||
|
||||
$task_url = '';
|
||||
|
@ -376,7 +379,9 @@ class CustomNetScan extends Wizard
|
|||
if ($this->page < $this->maxPagesNetScan) {
|
||||
// Avoid to print header out of wizard.
|
||||
$this->prepareBreadcrum($breadcrum);
|
||||
$this->printHeader();
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('NetScan Custom definition'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
}
|
||||
|
||||
if (isset($this->page) === true
|
||||
|
|
|
@ -108,7 +108,10 @@ class ManageNetScanScripts extends Wizard
|
|||
if ($this->page < $this->MAXPAGES) {
|
||||
// Avoid to print header out of wizard.
|
||||
$this->prepareBreadcrum($breadcrum);
|
||||
$this->printHeader();
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('List net scan scripts'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
|
||||
}
|
||||
|
||||
$id_script = get_parameter('id_script', 0);
|
||||
|
|
|
@ -2768,7 +2768,8 @@ function ui_print_page_header(
|
|||
$modal=false,
|
||||
$message='',
|
||||
$numChars=GENERIC_SIZE_TEXT,
|
||||
$alias=''
|
||||
$alias='',
|
||||
$breadcrumbs=''
|
||||
) {
|
||||
$title = io_safe_input_html($title);
|
||||
if (($icon == '') && ($godmode == true)) {
|
||||
|
@ -2781,15 +2782,20 @@ function ui_print_page_header(
|
|||
|
||||
if ($godmode == true) {
|
||||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$type2 = (empty($breadcrumbs)) ? 'menu_tab_frame_view' : 'menu_tab_frame_view_bc';
|
||||
$separator_class = 'separator';
|
||||
} else {
|
||||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$type2 = (empty($breadcrumbs)) ? 'menu_tab_frame_view' : 'menu_tab_frame_view_bc';
|
||||
$separator_class = 'separator_view';
|
||||
}
|
||||
|
||||
$buffer = '<div id="'.$type2.'" style=""><div id="menu_tab_left">';
|
||||
$buffer = '<div id="'.$type2.'" style="">';
|
||||
|
||||
if (!empty($breadcrumbs))
|
||||
$buffer .= '<div class="breadcrumbs_container">'.$breadcrumbs.'</div>';
|
||||
|
||||
$buffer .= '<div id="menu_tab_left">';
|
||||
|
||||
$buffer .= '<ul class="mn"><li class="'.$type.'">';
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ h1.wizard a:hover {
|
|||
div.arrow_box {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
background: #ccc;
|
||||
color: #888;
|
||||
padding: 1.3em;
|
||||
margin-left: 20px;
|
||||
|
@ -72,16 +71,6 @@ div.arrow_box {
|
|||
padding-left: 3em;
|
||||
}
|
||||
|
||||
.arrow_box:before {
|
||||
top: 50%;
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
.arrow_box.selected {
|
||||
background: #424242;
|
||||
color: #ccc;
|
||||
|
@ -110,3 +99,35 @@ div.arrow_box:before {
|
|||
.arrow_box:hover {
|
||||
color: #000;
|
||||
}
|
||||
.breadcrumb_link {
|
||||
color: #d0d0d0;
|
||||
font-size: 12pt !important;
|
||||
font-family: "Open Sans", sans-serif !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
span.breadcrumb_link {
|
||||
color: #d0d0d0;
|
||||
font-size: 12pt !important;
|
||||
}
|
||||
|
||||
.breadcrumb_link.selected {
|
||||
color: #95b750;
|
||||
}
|
||||
|
||||
.breadcrumb_link.selected:hover {
|
||||
color: #95b750;
|
||||
}
|
||||
.breadcrumb_link:hover {
|
||||
color: #95b750;
|
||||
}
|
||||
|
||||
.form_grid_items {
|
||||
overflow: hidden;
|
||||
}
|
||||
.form_grid_items .form_grid_item {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1272,6 +1272,34 @@ div.title_line {
|
|||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#menu_tab_frame_view_bc {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px solid #82b92e;
|
||||
max-height: 70px;
|
||||
min-height: 50px;
|
||||
width: 100%;
|
||||
padding-right: 0px;
|
||||
margin-left: 0px !important;
|
||||
margin-bottom: 20px;
|
||||
height: 70px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
border-top-right-radius: 7px;
|
||||
border-top-left-radius: 7px;
|
||||
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.1);
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#menu_tab_frame_view_bc .breadcrumbs_container {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.breadcrumbs_container {
|
||||
padding-left: 10px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#menu_tab {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue