Date de création : 2022/01/10 16:52
Si comme moi vous utilisez Kanboard pour obtimiser votre travail, voici une petite modification du template qui permet de passer tout le titre en haut à gauche en lien.
Pour commencer il faut installer Kanboard et ajouter un fichier de configuration en utilisant le fichier fourni:
config.default.php
Pour se faire il suffit de le dupliquer et le renommer en
config.php
une fois fait il faudra modifier la ligne 30
define('PLUGIN_INSTALLER', false);
pour la passer en true.
Cette modification permet d'installer directement depuis l'interface des plugins, chose que nous allons faire de suite avec le plugin Customizer de Craig Crosby qui permet de donner du style à votre Kanboard.
Maintenant que le plugin est installé pour l'utiliser il faut aller dans les réglages de Kanboard et tout en bas Customizer et jouer avec les réglages possible.
Le but d'installer ce plugin est de pouvoir modifier son template qui gère le lien en haut à gauche:
Dashboard for admin
Donc modification du fichier:
kanboard/plugins/Customizer/Template/header/title.php
Au départ il y avoir un truc genre:
<h1> <?php if (null !== $this->task->customizerFileModel->getByType(1)) : ?> <span class="logo"> <a href="<?= $this->url->href('DashboardController', 'show', array(), false, '', t('Dashboard')) ?>"> <img src="<?= $this->url->href('CustomizerFileController', 'image', array('plugin' => 'customizer', 'file_id' => $this->task->customizerFileModel->getIdByType(1))) ?>" height="<?= $this->task->configModel->get('headerlogo_size', '30') ?>"> </a> </span> <?php else: ?> <span class="logo"> <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?> </span> <?php endif ?> <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 endif ?> </span> <?php if (! empty($description)): ?> <?= $this->app->tooltipHTML($description) ?> <?php endif ?> </h1>
et nous on déplace le titre directement dans le lien du logo:
<h1> <?php if (null !== $this->task->customizerFileModel->getByType(1)) : ?> <span class="logo"> <a href="<?= $this->url->href('DashboardController', 'show', array(), false, '', t('Dashboard')) ?>"> <img src="<?= $this->url->href('CustomizerFileController', 'image', array('plugin' => 'customizer', 'file_id' => $this->task->customizerFileModel->getIdByType(1))) ?>" height="<?= $this->task->configModel->get('headerlogo_size', '30') ?>"> <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 endif ?> </span> <?php if (! empty($description)): ?> <?= $this->app->tooltipHTML($description) ?> <?php endif ?> </a> </span> <?php else: ?> <span class="logo"> <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?> </span> <?php endif ?> </h1>
et voila maintenant c'est tout le texte en plus du logo qui permet de revenir sur le board.