From 0a0447de46ba730c3d7d55b450cec560cd94c00a Mon Sep 17 00:00:00 2001 From: heper Date: Sat, 5 Dec 2015 01:23:51 +0100 Subject: proposed fix breadcrumb pkg xml --- src/usr/local/www/pkg_edit.php | 43 +++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 03c4f3a..c00f929 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -285,20 +285,6 @@ if ($_POST) { } } -if ($pkg['title'] != "") { - $edit = ($only_edit ? '' : ": " . gettext("Edit")); - $pgtitle = $pkg['title'] . $edit; -} else { - $pgtitle = gettext("Package Editor"); -} - -if ($pkg['custom_php_after_head_command']) { - $closehead = false; - include("head.inc"); - eval($pkg['custom_php_after_head_command']); -} else { - include("head.inc"); -} // Turn an embedded table into a bootstrap class table. This is for backward compatibility. // We remove any table attributes in the XML and replace them with Bootstrap table classes @@ -529,12 +515,14 @@ function parse_package_templates() { } } -// Start of page display -if ($input_errors) - print_input_errors($input_errors); +//breadcrumb +if ($pkg['title'] != "") { + $edit = ($only_edit ? '' : " / " . gettext("Edit")); + $pgtitle = array($pkg['title'], $edit); +} else { + $pgtitle = array(gettext("Package Editor")); +} -if ($savemsg) - print_info_box($savemsg, 'success'); // Create any required tabs if ($pkg['tabs'] != "") { @@ -548,6 +536,7 @@ if ($pkg['tabs'] != "") { if (isset($tab['active'])) { $active = true; + $pgtitle[] = $tab['text'] ; } else { $active = false; } @@ -586,12 +575,28 @@ if ($pkg['tabs'] != "") { } ksort($tab_array); +} +if ($pkg['custom_php_after_head_command']) { + $closehead = false; + include("head.inc"); + eval($pkg['custom_php_after_head_command']); +} else { + include("head.inc"); +} +if(isset($tab_array)) { foreach ($tab_array as $tabid => $tab) { display_top_tabs($tab); //, $no_drop_down, $tabid); } } +// Start of page display +if ($input_errors) + print_input_errors($input_errors); + +if ($savemsg) + print_info_box($savemsg, 'success'); + $cols = 0; $savevalue = gettext("Save"); if ($pkg['savetext'] != "") { -- cgit v1.1 From 62cdbf62e52c5338e0b0ea0b3c34320ce6996136 Mon Sep 17 00:00:00 2001 From: heper Date: Sat, 5 Dec 2015 02:06:31 +0100 Subject: problem with $only_edit --- src/usr/local/www/pkg_edit.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index c00f929..88b6148 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -517,8 +517,11 @@ function parse_package_templates() { //breadcrumb if ($pkg['title'] != "") { - $edit = ($only_edit ? '' : " / " . gettext("Edit")); - $pgtitle = array($pkg['title'], $edit); + if(!$only_edit) { + $pgtitle = array($pkg['title'], gettext("Edit")); + } else { + $pgtitle = array($pkg['title']); + } } else { $pgtitle = array(gettext("Package Editor")); } -- cgit v1.1