123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- $_title = $this->render("header/title", [
- "project" => isset($project) ? $project : null,
- "task" => isset($task) ? $task : null,
- "description" => isset($description) ? $description : null,
- "title" => $title,
- ]);
- $_top_right_corner = implode(" ", [
- $this->render("header/user_notifications"),
- $this->render("header/creation_dropdown"),
- $this->render("header/user_dropdown")
- ]);
- $branding = null;
- if (isset($project) && isset($project["id"])) {
- $branding = $this->projectBrandingHelper->getBrandingByProjectId($project["id"]);
- }
- ?>
- <?php if (isset($branding["enabled"]) && $branding["enabled"] == 1 && !empty($branding["logo_url"])): ?>
- <style>
- header{
- background-color:<?= $branding['background_color'] ?>;
- }
- .project-header{
- background-color:<?= $branding['second_background_color'] ?>;
- }
- h1 {
- color:<?= $branding['foreground_color'] ?>;
- background-color:<?= $branding['background_color'] ?>;
- }
- span.logo a{
- vertical-align: middle;
- margin-right:5px;
- opacity:1;
- }
- </style>
- <?php endif ?>
- <header>
- <div class="title-container">
-
-
- <h1>
- <span class="logo">
- <?php if (isset($branding["enabled"]) && $branding["enabled"] == 1 && !empty($branding["logo_url"])): ?>
- <a href="<?= $this->url->to('DashboardController', 'show') ?>">
- <img src="<?= $branding['logo_url'] ?>" alt="<?= t('Logo') ?>" height="32">
- </a>
-
- <?php else: ?>
- <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?>
- <?php endif ?>
- </span>
- <span class="title">
- <?php if (! empty($project) && ! empty($task)): ?>
- <?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>
- <?php else: ?>
- <?= $this->text->e($title) ?>
- <?php if (! empty($project) && $project['task_limit'] && array_key_exists('nb_active_tasks', $project)): ?>
- (<span><?= intval($project['nb_active_tasks']) ?></span> / <span title="<?= t('Task limit') ?>"><span class="ui-helper-hidden-accessible"><?= t('Task limit') ?> </span><?= $this->text->e($project['task_limit']) ?></span>)
- <?php endif ?>
- <?php endif ?>
- </span>
- <?php if (! empty($description)): ?>
- <?= $this->app->tooltipHTML($description) ?>
- <?php endif ?>
- </h1>
- </div>
- <div class="board-selector-container">
- <?php if (! empty($board_selector)): ?>
- <?= $this->render("header/board_selector", ["board_selector" => $board_selector]) ?>
- <?php endif ?>
- </div>
- <div class="menus-container">
- <?= $_top_right_corner ?>
- </div>
- </header>
|