看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 27411ebedc
1827 changed files with 192340 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<?= $this->app->component('select-dropdown-autocomplete', array(
'name' => 'boardId',
'placeholder' => t('Display another project'),
'ariaLabel' => t('Display another project'),
'items' => $board_selector,
'redirect' => array(
'regex' => 'PROJECT_ID',
'url' => $this->url->to('BoardViewController', 'show', array('project_id' => 'PROJECT_ID')),
),
'onFocus' => array(
'board.selector.open',
)
)) ?>
+21
View File
@@ -0,0 +1,21 @@
<?php $has_project_creation_access = $this->user->hasAccess('ProjectCreationController', 'create'); ?>
<?php $is_private_project_enabled = $this->app->config('disable_private_project', 0) == 0; ?>
<?php if ($has_project_creation_access || (!$has_project_creation_access && $is_private_project_enabled)): ?>
<div class="dropdown header-creation-menu">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-plus fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($has_project_creation_access): ?>
<li>
<?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?>
</li>
<?php endif ?>
<?php if ($is_private_project_enabled): ?>
<li>
<?= $this->modal->medium('lock', t('New personal project'), 'ProjectCreationController', 'createPrivate') ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:header:creation-dropdown') ?>
</ul>
</div>
<?php endif ?>
@@ -0,0 +1,26 @@
<div class="dropdown custom-board-selector">
<a href="#" class="dropdown-menu dropdown-menu-link-icon board-selector-btn">
<i class="fa fa-folder-open fa-fw"></i> <?= t('Display another project') ?> <i class="fa fa-caret-down"></i>
</a>
<ul class="custom-board-selector-menu">
<?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?>
<li>
<?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?>
</li>
<?php endif ?>
<?php if ($this->app->config('disable_private_project', 0) == 0): ?>
<li>
<?= $this->modal->medium('lock', t('New personal project'), 'ProjectCreationController', 'createPrivate') ?>
</li>
<?php endif ?>
<?php if (!empty($board_selector)): ?>
<li><hr></li>
<?php foreach ($board_selector as $project_id => $project_name): ?>
<li>
<?= $this->url->link($this->text->e($project_name), 'BoardViewController', 'show', array('project_id' => $project_id)) ?>
</li>
<?php endforeach ?>
<?php endif ?>
</ul>
</div>
+29
View File
@@ -0,0 +1,29 @@
<div class="header-left">
<div class="header-titles-stack">
<span class="title" style="display: flex; align-items: center; gap: 8px;">
<?php if (! empty($project) && ! empty($task)): ?>
<?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>
<?php else: ?>
<span>
<?= $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 ?>
</span>
<?php endif ?>
<?php if (! empty($description)): ?>
<div class="header-center-description" style="margin-left: 10px;">
<?= $description ?>
</div>
<?php endif ?>
<?php if (!empty($this->helper->projectHeader->hookBefore)) echo $this->helper->projectHeader->hookBefore; ?>
<?php if (!empty($this->helper->projectHeader->hookAfter)) echo $this->helper->projectHeader->hookAfter; ?>
</span>
<?php if (! empty($board_selector)): ?>
<?= $this->render('header/custom_board_selector', array('board_selector' => $board_selector)) ?>
<?php endif ?>
</div>
</div>
+41
View File
@@ -0,0 +1,41 @@
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><?= $this->avatar->currentUserSmall('avatar-inline') ?><i class="fa fa-caret-down"></i></a>
<ul>
<li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li>
<li>
<?= $this->url->icon('tachometer', t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?>
</li>
<li>
<?= $this->url->icon('home', t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?>
</li>
<li>
<?= $this->url->icon('folder', t('Projects management'), 'ProjectListController', 'show') ?>
</li>
<?php if ($this->user->hasAccess('UserListController', 'show')): ?>
<li>
<?= $this->url->icon('user', t('Users management'), 'UserListController', 'show') ?>
</li>
<li>
<?= $this->url->icon('group', t('Groups management'), 'GroupListController', 'index') ?>
</li>
<li>
<?= $this->url->icon('cubes', t('Plugins'), 'PluginController', 'show') ?>
</li>
<li>
<?= $this->url->icon('cog', t('Settings'), 'ConfigController', 'index') ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:header:dropdown') ?>
<li>
<i class="fa fa-fw fa-life-ring" aria-hidden="true"></i>
<?= $this->url->doc(t('Documentation')) ?>
</li>
<?php if (! DISABLE_LOGOUT): ?>
<li>
<?= $this->url->icon('sign-out', t('Logout'), 'AuthController', 'logout', [], true) ?>
</li>
<?php endif ?>
</ul>
</div>
@@ -0,0 +1,7 @@
<span class="notification">
<?php if ($this->user->hasNotifications()): ?>
<?= $this->modal->mediumIcon('bell web-notification-icon', t('Unread notifications'), 'WebNotificationController', 'show', array('user_id' => $this->user->getId())) ?>
<?php else: ?>
<?= $this->modal->mediumIcon('bell', t('My notifications'), 'WebNotificationController', 'show', array('user_id' => $this->user->getId())) ?>
<?php endif ?>
</span>