看板初始化提交

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
+83
View File
@@ -0,0 +1,83 @@
<div class="dropdown">
<a href="#" class="dropdown-menu action-menu" title="<?= t('Configure this project') ?>" aria-label="<?= t('Configure this project') ?>"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($board_view): ?>
<li>
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>>
<?= $this->url->icon('expand', t('Expand tasks'), 'BoardAjaxController', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
</span>
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? 'style="display: none;"' : '' ?>>
<?= $this->url->icon('compress', t('Collapse tasks'), 'BoardAjaxController', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
</span>
</li>
<li>
<span class="filter-compact">
<i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Compact view') ?></a>
</span>
<span class="filter-wide" style="display: none">
<i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a>
</span>
</li>
<li>
<span class="filter-vert-collapse">
<i class="fa fa-arrow-up fa-fw"></i> <a href="#" class="filter-vert-toggle-collapse"><?= t('Collapse vertically') ?></a>
</span>
<span class="filter-vert-expand" style="display: none">
<i class="fa fa-arrow-down fa-fw"></i> <a href="#" class="filter-vert-toggle-collapse"><?= t('Expand vertically') ?></a>
</span>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?>
<li>
<?= $this->modal->large('plus', t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
<?= $this->modal->medium('dashboard', t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('CustomFilterController', 'index', $project['id'])): ?>
<li>
<?= $this->modal->medium('filter', t('Add custom filters'), 'CustomFilterController', 'create', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($project['is_public']): ?>
<li>
<?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:project:dropdown', array('project' => $project)) ?>
<?php if ($this->user->hasProjectAccess('AnalyticController', 'taskDistribution', $project['id'])): ?>
<li>
<?= $this->modal->large('line-chart', t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('ExportController', 'tasks', $project['id'])): ?>
<li>
<?= $this->modal->medium('upload', t('Exports'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('TaskImportController', 'tasks', $project['id'])): ?>
<li>
<?= $this->modal->medium('download', t('Import tasks'), 'TaskImportController', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->hasProjectAccess('ProjectViewController', 'show', $project['id'])): ?>
<li>
<?= $this->url->icon('cog', t('Configure this project'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
<?= $this->url->icon('folder', t('Manage projects'), 'ProjectListController', 'show') ?>
</li>
</ul>
</div>
+13
View File
@@ -0,0 +1,13 @@
<?php
$this->helper->projectHeader->hookBefore = $this->hook->render('template:project:header:before', array('project' => $project));
$this->helper->projectHeader->dropdownHtml = $this->render('project_header/dropdown', array('project' => $project, 'board_view' => $board_view));
$this->helper->projectHeader->viewsHtml = $this->render('project_header/views', array('project' => $project, 'filters' => $filters));
$this->helper->projectHeader->searchHtml = $this->render('project_header/search', array(
'project' => $project,
'filters' => $filters,
'custom_filters_list' => isset($custom_filters_list) ? $custom_filters_list : array(),
'users_list' => isset($users_list) ? $users_list : array(),
'categories_list' => isset($categories_list) ? $categories_list : array(),
));
$this->helper->projectHeader->hookAfter = $this->hook->render('template:project:header:after', array('project' => $project));
?>
+58
View File
@@ -0,0 +1,58 @@
<div class="filter-box">
<form method="get" action="<?= $this->url->dir() ?>" class="search">
<?= $this->form->hidden('controller', $filters) ?>
<?= $this->form->hidden('action', $filters) ?>
<?= $this->form->hidden('plugin', $filters) ?>
<?= $this->form->hidden('project_id', $filters) ?>
<div class="input-addon">
<?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"', 'aria-label="'.t('Filter').'"'), 'input-addon-field') ?>
<div class="input-addon-item">
<?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?>
</div>
<?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?>
<div class="input-addon-item">
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Custom filters') ?>" aria-label="<?= t('Custom filters') ?>"><i class="fa fa-bookmark fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
<?php foreach ($custom_filters_list as $filter): ?>
<li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
<?php if (isset($users_list)): ?>
<div class="input-addon-item">
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('User filters') ?>" aria-label="<?= t('Custom filters') ?>"><i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i></a>
<ul>
<li><a href="#" class="filter-helper" data-unique-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
<li><a href="#" class="filter-helper" data-unique-filter="assignee:anybody"><?= t('Assigned') ?></a></li>
<?php foreach ($users_list as $user): ?>
<li><a href="#" class="filter-helper" data-unique-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
<?php if (isset($categories_list) && ! empty($categories_list)): ?>
<div class="input-addon-item">
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Category filters') ?>" aria-label="<?= t('Category filters') ?>"><i class="fa fa-folder-open fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
<li><a href="#" class="filter-helper" data-unique-filter="category:none"><?= t('No category') ?></a></li>
<?php foreach ($categories_list as $category): ?>
<li><a href="#" class="filter-helper" data-unique-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li>
<?php endforeach ?>
</ul>
</div>
</div>
<?php endif ?>
</div>
</form>
</div>
+22
View File
@@ -0,0 +1,22 @@
<ul class="views">
<?= $this->hook->render('template:project-header:view-switcher-before-project-overview', array('project' => $project, 'filters' => $filters)) ?>
<li <?= $this->app->checkMenuSelection('ProjectOverviewController') ?>>
<?= $this->url->icon('eye', t('Overview'), 'ProjectOverviewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?>
</li>
<?= $this->hook->render('template:project-header:view-switcher-before-board-view', array('project' => $project, 'filters' => $filters)) ?>
<li <?= $this->app->checkMenuSelection('BoardViewController') ?>>
<?= $this->url->icon('th', t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?>
</li>
<?= $this->hook->render('template:project-header:view-switcher-before-task-list', array('project' => $project, 'filters' => $filters)) ?>
<li <?= $this->app->checkMenuSelection('TaskListController') ?>>
<?= $this->url->icon('list', t('List'), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?>
</li>
<?= $this->hook->render('template:project-header:view-switcher', array('project' => $project, 'filters' => $filters)) ?>
</ul>