1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?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>
- h1 {
- color:<?= $branding['accent_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>
|