From f66ab8dae2f3d0418759f81a3a64dc9517a62449 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:31 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- library/Director/Dashboard/BranchesDashboard.php | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 library/Director/Dashboard/BranchesDashboard.php (limited to 'library/Director/Dashboard/BranchesDashboard.php') diff --git a/library/Director/Dashboard/BranchesDashboard.php b/library/Director/Dashboard/BranchesDashboard.php new file mode 100644 index 0000000..fe8b385 --- /dev/null +++ b/library/Director/Dashboard/BranchesDashboard.php @@ -0,0 +1,36 @@ +getDb())); + if ($branch->isBranch()) { + $this->prepend(Hint::info(Html::sprintf( + $this->translate('You\'re currently working in a Configuration Branch: %s'), + Branch::requireHook()->linkToBranch($branch, $this->getAuth(), $branch->getName()) + ))); + } + + return $this->translate('Prepare your configuration in a safe Environment'); + } + + public function loadDashlets() + { + /** @var BranchSupportHook $hook */ + if ($hook = Hook::first('director/BranchSupport')) { + $this->dashlets = $hook->loadDashlets($this->getDb()); + } else { + $this->dashlets = []; + } + } +} -- cgit v1.2.3