3
1

header.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. $_title = $this->render("header/title", [
  3. "project" => isset($project) ? $project : null,
  4. "task" => isset($task) ? $task : null,
  5. "description" => isset($description) ? $description : null,
  6. "title" => $title,
  7. ]);
  8. $_top_right_corner = implode("&nbsp;", [
  9. $this->render("header/user_notifications"),
  10. $this->render("header/creation_dropdown"),
  11. $this->render("header/user_dropdown")
  12. ]);
  13. $branding = null;
  14. if (isset($project) && isset($project["id"])) {
  15. $branding = $this->projectBrandingHelper->getBrandingByProjectId($project["id"]);
  16. }
  17. ?>
  18. <header>
  19. <div class="title-container">
  20. <?php if (isset($branding["enabled"]) && $branding["enabled"] == 1 && !empty($branding["logo_url"])): ?>
  21. <a href="<?= $this->url->to('DashboardController', 'show') ?>" style="border-bottom: 2px solid <?= $branding['accent_color'] ?>;">
  22. <img src="<?= $branding['logo_url'] ?>" alt="<?= t('Logo') ?>" height="30">
  23. </a>
  24. <?php else: ?>
  25. <?= $_title ?>
  26. <?php endif ?>
  27. </div>
  28. <div class="board-selector-container">
  29. <?php if (! empty($board_selector)): ?>
  30. <?= $this->render("header/board_selector", ["board_selector" => $board_selector]) ?>
  31. <?php endif ?>
  32. </div>
  33. <div class="menus-container">
  34. <?= $_top_right_corner ?>
  35. </div>
  36. </header>