From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../application/views/scripts/index/index.phtml | 153 +++++++++++++++++++++ .../views/scripts/index/parts/finish.phtml | 34 +++++ .../views/scripts/index/parts/wizard.phtml | 1 + 3 files changed, 188 insertions(+) create mode 100644 modules/setup/application/views/scripts/index/index.phtml create mode 100644 modules/setup/application/views/scripts/index/parts/finish.phtml create mode 100644 modules/setup/application/views/scripts/index/parts/wizard.phtml (limited to 'modules/setup/application/views/scripts/index') diff --git a/modules/setup/application/views/scripts/index/index.phtml b/modules/setup/application/views/scripts/index/index.phtml new file mode 100644 index 0000000..b2b3bda --- /dev/null +++ b/modules/setup/application/views/scripts/index/index.phtml @@ -0,0 +1,153 @@ +getPages(); +$finished = isset($success); +$configPages = array_slice($pages, 3, count($pages) - 4, true); +$currentPos = array_search($wizard->getCurrentPage(), $pages, true); +list($configPagesLeft, $configPagesRight) = array_chunk($configPages, (int)(count($configPages) / 2), true); + +$visitedPages = array_keys($wizard->getPageData()); +$maxProgress = max(array_merge([0], array_keys(array_filter( + $pages, + function ($page) use ($visitedPages) { return in_array($page->getName(), $visitedPages); } +)))); + +?> +
+
+ img('img/icinga-logo-big.png'); ?> +
+
+

translate('Welcome', 'setup.progress'); ?>

+ 0 ? 'complete' : ( + $maxProgress > 0 ? 'visited' : 'active' + ); ?> + + + + +
+
+
+

translate('Modules', 'setup.progress'); ?>

+ 1 ? ' complete' : ( + $maxProgress > 1 ? ' visited' : ( + $currentPos === 1 ? ' active' : '' + ) + ); ?> + + + + +
+ = $currentPos && $maxProgress === 1)): ?> + restartForm ?> + +
+
+

translate('Requirements', 'setup.progress'); ?>

+ 2 ? ' complete' : ( + $maxProgress > 2 ? ' visited' : ( + $currentPos === 2 ? ' active' : '' + ) + ); ?> + + + + +
+ = $currentPos && $maxProgress === 2)): ?> + restartForm ?> + +
+
+

translate('Configuration', 'setup.progress'); ?>

+ + + + +
+ + $page): ?> + 2 ? ' active' : '') + ); ?> + +
+ +
+ +
+ + +
+
+
+ + $page): ?> + 2 ? ' active' : '') + ); ?> + +
+ +
+ +
+ + +
+ 2 || $currentPos > 2): ?> + restartForm ?> + +
+
+

translate('Finish', 'setup.progress'); ?>

+ + + + + +
+
+
+
+
+ + render('index/parts/finish.phtml'); ?> + + render('index/parts/wizard.phtml'); ?> + +
+
+ diff --git a/modules/setup/application/views/scripts/index/parts/finish.phtml b/modules/setup/application/views/scripts/index/parts/finish.phtml new file mode 100644 index 0000000..dc5ba1c --- /dev/null +++ b/modules/setup/application/views/scripts/index/parts/finish.phtml @@ -0,0 +1,34 @@ +
+ +

translate('Congratulations! Icinga Web 2 has been successfully set up.'); ?>

+ +

translate('Sorry! Failed to set up Icinga Web 2 successfully.'); ?>

+ +
+ + qlink( + $this->translate('Login to Icinga Web 2'), + 'authentication/login', + null, + array( + 'class' => 'button-link login', + 'data-no-icinga-ajax' => true, + 'title' => $this->translate('Show the login page of Icinga Web 2') + ) + ); ?> + + qlink( + $this->translate('Back'), + null, + null, + array( + 'class' => 'button-link', + 'title' => $this->translate('Show previous wizard-page') + ) + ); ?> + +
+
+
diff --git a/modules/setup/application/views/scripts/index/parts/wizard.phtml b/modules/setup/application/views/scripts/index/parts/wizard.phtml new file mode 100644 index 0000000..94891f9 --- /dev/null +++ b/modules/setup/application/views/scripts/index/parts/wizard.phtml @@ -0,0 +1 @@ +getForm()->render(); ?> \ No newline at end of file -- cgit v1.2.3