Host & devices
']);
+ $this->prepareBreadcrum(
+ [
+ [
+ 'link' => $this->url.'&wiz=hd',
+ 'label' => __('    Host & devices'),
+ ],
+ ]
+ );
+
$this->printHeader();
$this->printBigButtonsList(
[
@@ -115,10 +123,16 @@ class HostDevices extends Wizard
if (enterprise_installed()) {
if ($mode == 'importcsv') {
- $this->setBreadcrum(
+ $this->prepareBreadcrum(
[
- '    Host & devices
',
- '      Import CSV
',
+ [
+ 'link' => $this->url.'&wiz=hd',
+ 'label' => __('    Host & devices'),
+ ],
+ [
+ 'link' => $this->url.'&wiz=hd&mode=importcsv',
+ 'label' => __('      Import CSV'),
+ ],
]
);
$this->printHeader();
@@ -130,18 +144,34 @@ class HostDevices extends Wizard
if ($mode == 'netscan') {
if ($this->page != 2) {
// Do not paint breadcrum in last page. Redirected.
- $this->setBreadcrum(
+ $this->prepareBreadcrum(
[
- '    Host & devices
',
- '    Net scan definition
',
+ [
+ 'link' => $this->url.'&wiz=hd',
+ 'label' => __('    Host & devices'),
+ ],
+ [
+ 'link' => $this->url.'&wiz=hd&mode=netscan',
+ 'label' => __('      Net scan definition'),
+ ],
]
);
+
if ($this->page == 1) {
- $this->setBreadcrum(
+ $this->prepareBreadcrum(
[
- '    Host & devices
',
- '    Net scan definition
',
- '    Net scan features
',
+ [
+ 'link' => $this->url.'&wiz=hd',
+ 'label' => __('    Host & devices'),
+ ],
+ [
+ 'link' => $this->url.'&wiz=hd&mode=netscan',
+ 'label' => __('      Net scan definition'),
+ ],
+ [
+ 'link' => $this->url.'&wiz=hd&mode=netscan&page=1',
+ 'label' => __('      Net scan features'),
+ ],
]
);
}
@@ -1078,4 +1108,26 @@ $(function() {
}
+ /**
+ * Builder for breadcrum
+ *
+ * @param array $urls Array of urls to be stored in breadcrum.
+ *
+ * @return void
+ */
+ public function prepareBreadcrum(array $urls)
+ {
+ $bc = [];
+ $i = 0;
+ foreach ($urls as $url) {
+ $bc[$i] = '