看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 54a842f4ab
2104 changed files with 241695 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
<section id="main">
<section class="sidebar-container" id="dashboard">
<?= $this->render($sidebar_template, array('user' => $user)) ?>
<div class="sidebar-content">
<?= $content_for_sublayout ?>
</div>
</section>
</section>
+105
View File
@@ -0,0 +1,105 @@
<?= $this->hook->render('template:dashboard:show:before-filter-box', array('user' => $user)) ?>
<div class="filter-box margin-bottom">
<form method="get" action="<?= $this->url->dir() ?>" class="search">
<?= $this->form->hidden('controller', array('controller' => 'SearchController')) ?>
<?= $this->form->hidden('action', array('action' => 'index')) ?>
<div class="input-addon">
<?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"', 'aria-label="'.t('Search').'"'), 'input-addon-field') ?>
<div class="input-addon-item">
<?= $this->render('app/filters_helper') ?>
</div>
</div>
</form>
</div>
<?= $this->hook->render('template:dashboard:show:after-filter-box', array('user' => $user)) ?>
<?php if (! $project_paginator->isEmpty()): ?>
<div class="table-list">
<?= $this->render('project_list/header', array('paginator' => $project_paginator)) ?>
<?php foreach ($project_paginator->getCollection() as $project): ?>
<div class="table-list-row table-border-left">
<div>
<?php if ($this->user->hasProjectAccess('ProjectViewController', 'show', $project['id'])): ?>
<?= $this->render('project/dropdown', array('project' => $project)) ?>
<?php else: ?>
<strong><?= '#'.$project['id'] ?></strong>
<?php endif ?>
<?= $this->hook->render('template:dashboard:project:before-title', array('project' => $project)) ?>
<span class="table-list-title <?= $project['is_active'] == 0 ? 'status-closed' : '' ?>">
<?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>
</span>
<?php if ($project['is_private']): ?>
<i class="fa fa-lock fa-fw" title="<?= t('Personal project') ?>" role="img" aria-label="<?= t('Personal project') ?>"></i>
<?php endif ?>
<?= $this->hook->render('template:dashboard:project:after-title', array('project' => $project)) ?>
</div>
<div class="table-list-details">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><span class="ui-helper-hidden-accessible"><?= t('Task count') ?> </span><?= $column['nb_open_tasks'] ?></strong>
<small><?= $this->text->e($column['title']) ?></small>
<?php endforeach ?>
</div>
</div>
<?php endforeach ?>
</div>
<?= $project_paginator ?>
<?php endif ?>
<?php if (empty($overview_paginator)): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<?php foreach ($overview_paginator as $result): ?>
<?php if (! $result['paginator']->isEmpty()): ?>
<div class="page-header">
<h2 id="project-tasks-<?= $result['project_id'] ?>"><?= $this->url->link($this->text->e($result['project_name']), 'BoardViewController', 'show', array('project_id' => $result['project_id'])) ?></h2>
</div>
<div class="table-list">
<?= $this->render('task_list/header', array(
'paginator' => $result['paginator'],
)) ?>
<?php foreach ($result['paginator']->getCollection() as $task): ?>
<div class="table-list-row color-<?= $task['color_id'] ?>">
<?= $this->render('task_list/task_title', array(
'task' => $task,
'redirect' => 'dashboard',
)) ?>
<?= $this->render('task_list/task_details', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_avatars', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_icons', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_subtasks', array(
'task' => $task,
'user_id' => $user['id'],
)) ?>
<?= $this->hook->render('template:dashboard:task:footer', array('task' => $task)) ?>
</div>
<?php endforeach ?>
</div>
<?= $result['paginator'] ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?= $this->hook->render('template:dashboard:show', array('user' => $user)) ?>
+27
View File
@@ -0,0 +1,27 @@
<div class="page-header">
<h2><?= $this->url->link(t('My projects'), 'DashboardController', 'projects', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
</div>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('You are not a member of any project.') ?></p>
<?php else: ?>
<div class="table-list">
<?= $this->render('project_list/header', array('paginator' => $paginator)) ?>
<?php foreach ($paginator->getCollection() as $project): ?>
<div class="table-list-row table-border-left">
<?= $this->render('project_list/project_title', array(
'project' => $project,
)) ?>
<?= $this->render('project_list/project_details', array(
'project' => $project,
)) ?>
<?= $this->render('project_list/project_icons', array(
'project' => $project,
)) ?>
</div>
<?php endforeach ?>
</div>
<?= $paginator ?>
<?php endif ?>
+24
View File
@@ -0,0 +1,24 @@
<div class="sidebar">
<ul>
<li <?= $this->app->checkMenuSelection('ProjectListController', 'show') ?>>
<?= $this->url->icon('folder', '<span class="sidebar-text">'.t('Project management').'</span>', 'ProjectListController', 'show') ?>
</li>
<li <?= $this->app->checkMenuSelection('ActivityController', 'user') ?>>
<?= $this->url->icon('dashboard', '<span class="sidebar-text">'.t('My activity stream').'</span>', 'ActivityController', 'user') ?>
</li>
<li><hr></li>
<li <?= $this->app->checkMenuSelection('DashboardController', 'show') ?>>
<?= $this->url->link('<i class="fa fa-fw"></i> <span class="sidebar-text">'.t('Overview').'</span>', 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('DashboardController', 'projects') ?>>
<?= $this->url->link('<i class="fa fa-fw"></i> <span class="sidebar-text">'.t('My projects').'</span>', 'DashboardController', 'projects', array('user_id' => $user['id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('DashboardController', 'tasks') ?>>
<?= $this->url->link('<i class="fa fa-fw"></i> <span class="sidebar-text">'.t('My tasks').'</span>', 'DashboardController', 'tasks', array('user_id' => $user['id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('DashboardController', 'subtasks') ?>>
<?= $this->url->link('<i class="fa fa-fw"></i> <span class="sidebar-text">'.t('My subtasks').'</span>', 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?>
</li>
<?= $this->hook->render('template:dashboard:sidebar', array('user' => $user)) ?>
</ul>
</div>
+49
View File
@@ -0,0 +1,49 @@
<div class="page-header">
<h2><?= $this->url->link(t('My subtasks'), 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?> (<?= $nb_subtasks ?>)</h2>
</div>
<?php if ($nb_subtasks == 0): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<div class="table-list">
<div class="table-list-header">
<div class="table-list-header-count">
<?php if ($nb_subtasks > 1): ?>
<?= t('%d subtasks', $nb_subtasks) ?>
<?php else: ?>
<?= t('%d subtask', $nb_subtasks) ?>
<?php endif ?>
</div>
<div class="table-list-header-menu">
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Sort') ?> <i class="fa fa-caret-down"></i></strong></a>
<ul>
<li>
<?= $paginator->order(t('Task ID'), \Kanboard\Model\TaskModel::TABLE.'.id') ?>
</li>
<li>
<?= $paginator->order(t('Title'), \Kanboard\Model\TaskModel::TABLE.'.title') ?>
</li>
<li>
<?= $paginator->order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?>
</li>
</ul>
</div>
</div>
</div>
<?php foreach ($paginator->getCollection() as $task): ?>
<div class="table-list-row color-<?= $task['color_id'] ?>">
<?= $this->render('task_list/task_title', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_subtasks', array(
'task' => $task,
'user_id' => $user['id'],
)) ?>
</div>
<?php endforeach ?>
</div>
<?= $paginator ?>
<?php endif ?>
+41
View File
@@ -0,0 +1,41 @@
<div class="page-header">
<h2><?= $this->url->link(t('My tasks'), 'DashboardController', 'tasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
</div>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<div class="table-list">
<?= $this->render('task_list/header', array(
'paginator' => $paginator,
)) ?>
<?php foreach ($paginator->getCollection() as $task): ?>
<div class="table-list-row color-<?= $task['color_id'] ?>">
<?= $this->render('task_list/task_title', array(
'task' => $task,
'redirect' => 'dashboard-tasks',
)) ?>
<?= $this->render('task_list/task_details', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_avatars', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_icons', array(
'task' => $task,
)) ?>
<?= $this->render('task_list/task_subtasks', array(
'task' => $task,
)) ?>
<?= $this->hook->render('template:dashboard:task:footer', array('task' => $task)) ?>
</div>
<?php endforeach ?>
</div>
<?= $paginator ?>
<?php endif ?>