Unification of project header

This commit is contained in:
Frederic Guillot 2016-03-25 17:41:41 -04:00
parent 13d5bd8e48
commit 354e37971d
37 changed files with 194 additions and 343 deletions

View File

@ -9,6 +9,7 @@ New features:
Improvements:
* Unification of the project header
* Refactoring of Javascript code
* Improve comments design
* Improve task summary sections

View File

@ -38,6 +38,7 @@ class Activity extends Base
$this->response->html($this->helper->layout->task('activity/task', array(
'title' => $task['title'],
'task' => $task,
'project' => $this->project->getById($task['project_id']),
'events' => $this->projectActivity->getTask($task['id']),
)));
}

View File

@ -44,8 +44,7 @@ class Analytic extends Base
public function compareHours()
{
$project = $this->getProject();
$params = $this->getProjectFilters('analytic', 'compareHours');
$query = $this->taskFilter->create()->filterByProject($params['project']['id'])->getQuery();
$query = $this->taskFilter->create()->filterByProject($project['id'])->getQuery();
$paginator = $this->paginator
->setUrl('analytic', 'compareHours', array('project_id' => $project['id']))

View File

@ -287,60 +287,4 @@ abstract class Base extends \Kanboard\Core\Base
return $subtask;
}
/**
* Common method to get project filters
*
* @access protected
* @param string $controller
* @param string $action
* @return array
*/
protected function getProjectFilters($controller, $action)
{
$project = $this->getProject();
$search = $this->request->getStringParam('search', $this->userSession->getFilters($project['id']));
$board_selector = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId());
unset($board_selector[$project['id']]);
$filters = array(
'controller' => $controller,
'action' => $action,
'project_id' => $project['id'],
'search' => urldecode($search),
);
$this->userSession->setFilters($project['id'], $filters['search']);
return array(
'project' => $project,
'board_selector' => $board_selector,
'filters' => $filters,
'title' => $project['name'],
'description' => $this->getProjectDescription($project),
);
}
/**
* Get project description
*
* @access protected
* @param array &$project
* @return string
*/
protected function getProjectDescription(array &$project)
{
if ($project['owner_id'] > 0) {
$description = t('Project owner: ').'**'.$this->helper->text->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL;
if (! empty($project['description'])) {
$description .= '***'.PHP_EOL.PHP_EOL;
$description .= $project['description'];
}
} else {
$description = $project['description'];
}
return $description;
}
}

View File

@ -47,16 +47,17 @@ class Board extends Base
*/
public function show()
{
$params = $this->getProjectFilters('board', 'show');
$project = $this->getProject();
$search = $this->helper->projectHeader->getSearchQuery($project);
$this->response->html($this->helper->layout->app('board/view_private', array(
'categories_list' => $this->category->getList($params['project']['id'], false),
'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),
'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),
'swimlanes' => $this->taskFilter->search($params['filters']['search'])->getBoard($params['project']['id']),
'swimlanes' => $this->taskFilter->search($search)->getBoard($project['id']),
'project' => $project,
'title' => $project['name'],
'description' => $this->helper->projectHeader->getDescription($project),
'board_private_refresh_interval' => $this->config->get('board_private_refresh_interval'),
'board_highlight_period' => $this->config->get('board_highlight_period'),
) + $params));
)));
}
/**

View File

@ -20,9 +20,14 @@ class Calendar extends Base
*/
public function show()
{
$project = $this->getProject();
$this->response->html($this->helper->layout->app('calendar/show', array(
'project' => $project,
'title' => $project['name'],
'description' => $this->helper->projectHeader->getDescription($project),
'check_interval' => $this->config->get('board_private_refresh_interval'),
) + $this->getProjectFilters('calendar', 'show')));
)));
}
/**

View File

@ -54,8 +54,9 @@ class Gantt extends Base
*/
public function project()
{
$params = $this->getProjectFilters('gantt', 'project');
$filter = $this->taskFilterGanttFormatter->search($params['filters']['search'])->filterByProject($params['project']['id']);
$project = $this->getProject();
$search = $this->helper->projectHeader->getSearchQuery($project);
$filter = $this->taskFilterGanttFormatter->search($search)->filterByProject($project['id']);
$sorting = $this->request->getStringParam('sorting', 'board');
if ($sorting === 'date') {
@ -64,8 +65,10 @@ class Gantt extends Base
$filter->getQuery()->asc('column_position')->asc(TaskModel::TABLE.'.position');
}
$this->response->html($this->helper->layout->app('gantt/project', $params + array(
'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),
$this->response->html($this->helper->layout->app('gantt/project', array(
'project' => $project,
'title' => $project['name'],
'description' => $this->helper->projectHeader->getDescription($project),
'sorting' => $sorting,
'tasks' => $filter->format(),
)));

View File

@ -19,22 +19,23 @@ class Listing extends Base
*/
public function show()
{
$params = $this->getProjectFilters('listing', 'show');
$query = $this->taskFilter->search($params['filters']['search'])->filterByProject($params['project']['id'])->getQuery();
$project = $this->getProject();
$search = $this->helper->projectHeader->getSearchQuery($project);
$query = $this->taskFilter->search($search)->filterByProject($project['id'])->getQuery();
$paginator = $this->paginator
->setUrl('listing', 'show', array('project_id' => $params['project']['id']))
->setUrl('listing', 'show', array('project_id' => $project['id']))
->setMax(30)
->setOrder(TaskModel::TABLE.'.id')
->setDirection('DESC')
->setQuery($query)
->calculate();
$this->response->html($this->helper->layout->app('listing/show', $params + array(
$this->response->html($this->helper->layout->app('listing/show', array(
'project' => $project,
'title' => $project['name'],
'description' => $this->helper->projectHeader->getDescription($project),
'paginator' => $paginator,
'categories_list' => $this->category->getList($params['project']['id'], false),
'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),
'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),
)));
}
}

View File

@ -15,15 +15,18 @@ class ProjectOverview extends Base
*/
public function show()
{
$params = $this->getProjectFilters('ProjectOverview', 'show');
$params['users'] = $this->projectUserRole->getAllUsersGroupedByRole($params['project']['id']);
$params['roles'] = $this->role->getProjectRoles();
$params['events'] = $this->projectActivity->getProject($params['project']['id'], 10);
$params['images'] = $this->projectFile->getAllImages($params['project']['id']);
$params['files'] = $this->projectFile->getAllDocuments($params['project']['id']);
$project = $this->getProject();
$this->project->getColumnStats($project);
$this->project->getColumnStats($params['project']);
$this->response->html($this->helper->layout->app('project_overview/show', $params));
$this->response->html($this->helper->layout->app('project_overview/show', array(
'project' => $project,
'title' => $project['name'],
'description' => $this->helper->projectHeader->getDescription($project),
'users' => $this->projectUserRole->getAllUsersGroupedByRole($project['id']),
'roles' => $this->role->getProjectRoles(),
'events' => $this->projectActivity->getProject($project['id'], 10),
'images' => $this->projectFile->getAllImages($project['id']),
'files' => $this->projectFile->getAllDocuments($project['id']),
)));
}
}

View File

@ -71,17 +71,16 @@ class Task extends Base
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', DateParser::DATE_TIME_FORMAT));
$this->response->html($this->helper->layout->task('task/show', array(
'task' => $task,
'project' => $this->project->getById($task['project_id']),
'values' => $values,
'files' => $this->taskFile->getAllDocuments($task['id']),
'images' => $this->taskFile->getAllImages($task['id']),
'comments' => $this->comment->getAll($task['id'], $this->userSession->getCommentSorting()),
'subtasks' => $subtasks,
'internal_links' => $this->taskLink->getAllGroupedByLabel($task['id']),
'external_links' => $this->taskExternalLink->getAll($task['id']),
'task' => $task,
'values' => $values,
'link_label_list' => $this->link->getList(0, false),
'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id'], true, false, false),
)));
}
@ -96,6 +95,7 @@ class Task extends Base
$this->response->html($this->helper->layout->task('task/analytics', array(
'task' => $task,
'project' => $this->project->getById($task['project_id']),
'lead_time' => $this->taskAnalytic->getLeadTime($task),
'cycle_time' => $this->taskAnalytic->getCycleTime($task),
'time_spent_columns' => $this->taskAnalytic->getTimeSpentByColumn($task),
@ -121,6 +121,7 @@ class Task extends Base
$this->response->html($this->helper->layout->task('task/time_tracking_details', array(
'task' => $task,
'project' => $this->project->getById($task['project_id']),
'subtask_paginator' => $subtask_paginator,
)));
}
@ -136,6 +137,7 @@ class Task extends Base
$this->response->html($this->helper->layout->task('task/transitions', array(
'task' => $task,
'project' => $this->project->getById($task['project_id']),
'transitions' => $this->transition->getAllByTask($task['id']),
)));
}

View File

@ -10,18 +10,19 @@ use Pimple\Container;
* @package core
* @author Frederic Guillot
*
* @property \Kanboard\Helper\AppHelper $app
* @property \Kanboard\Helper\AssetHelper $asset
* @property \Kanboard\Helper\DateHelper $dt
* @property \Kanboard\Helper\FileHelper $file
* @property \Kanboard\Helper\FormHelper $form
* @property \Kanboard\Helper\ModelHelper $model
* @property \Kanboard\Helper\SubtaskHelper $subtask
* @property \Kanboard\Helper\TaskHelper $task
* @property \Kanboard\Helper\TextHelper $text
* @property \Kanboard\Helper\UrlHelper $url
* @property \Kanboard\Helper\UserHelper $user
* @property \Kanboard\Helper\LayoutHelper $layout
* @property \Kanboard\Helper\AppHelper $app
* @property \Kanboard\Helper\AssetHelper $asset
* @property \Kanboard\Helper\DateHelper $dt
* @property \Kanboard\Helper\FileHelper $file
* @property \Kanboard\Helper\FormHelper $form
* @property \Kanboard\Helper\ModelHelper $model
* @property \Kanboard\Helper\SubtaskHelper $subtask
* @property \Kanboard\Helper\TaskHelper $task
* @property \Kanboard\Helper\TextHelper $text
* @property \Kanboard\Helper\UrlHelper $url
* @property \Kanboard\Helper\UserHelper $user
* @property \Kanboard\Helper\LayoutHelper $layout
* @property \Kanboard\Helper\ProjectHeaderHelper $projectHeader
*/
class Helper
{

View File

@ -0,0 +1,80 @@
<?php
namespace Kanboard\Helper;
use Kanboard\Core\Base;
/**
* Project Header Helper
*
* @package helper
* @author Frederic Guillot
*/
class ProjectHeaderHelper extends Base
{
/**
* Get current search query
*
* @access public
* @param array $project
* @return string
*/
public function getSearchQuery(array $project)
{
$search = $this->request->getStringParam('search', $this->userSession->getFilters($project['id']));
$this->userSession->setFilters($project['id'], $search);
return urldecode($search);
}
/**
* Render project header (views switcher and search box)
*
* @access public
* @param array $project
* @param string $controller
* @param string $action
* @param bool $boardView
* @return string
*/
public function render(array $project, $controller, $action, $boardView = false)
{
$filters = array(
'controller' => $controller,
'action' => $action,
'project_id' => $project['id'],
'search' => $this->getSearchQuery($project),
);
return $this->template->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
'categories_list' => $this->category->getList($project['id'], false),
'users_list' => $this->projectUserRole->getAssignableUsersList($project['id'], false),
'custom_filters_list' => $this->customFilter->getAll($project['id'], $this->userSession->getId()),
'board_view' => $boardView,
));
}
/**
* Get project description
*
* @access public
* @param array &$project
* @return string
*/
public function getDescription(array &$project)
{
if ($project['owner_id'] > 0) {
$description = t('Project owner: ').'**'.$this->helper->text->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL;
if (! empty($project['description'])) {
$description .= '***'.PHP_EOL.PHP_EOL;
$description .= $project['description'];
}
} else {
$description = $project['description'];
}
return $description;
}
}

View File

@ -27,6 +27,7 @@ class HelperProvider implements ServiceProviderInterface
$container['helper']->register('url', '\Kanboard\Helper\UrlHelper');
$container['helper']->register('user', '\Kanboard\Helper\UserHelper');
$container['helper']->register('avatar', '\Kanboard\Helper\AvatarHelper');
$container['helper']->register('projectHeader', '\Kanboard\Helper\ProjectHeaderHelper');
$container['template'] = new Template($container['helper']);

View File

@ -1,40 +1,14 @@
<section id="main">
<div class="page-header">
<?= $this->projectHeader->render($project, 'Analytic', $this->app->getRouterAction()) ?>
<?php if ($project['is_public']): ?>
<div class="menu-inline pull-right">
<ul>
<li>
<span class="dropdown">
<span>
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<?= $this->render('project/dropdown', array('project' => $project)) ?>
</ul>
</span>
</span>
</li>
<li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('ProjectEdit', 'edit', $project['id'])): ?>
<li>
<i class="fa fa-cog fa-fw"></i>
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
<i class="fa fa-folder fa-fw"></i>
<?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
<?php if ($project['is_public']): ?>
<li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li>
<li><i class="fa fa-calendar fa-fw"></i><?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li>
<?php endif ?>
<li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li>
<li><i class="fa fa-calendar fa-fw"></i><?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li>
</ul>
</div>
<?php endif ?>
<?= $this->render('event/events', array('events' => $events)) ?>
</section>

View File

@ -1,36 +1,5 @@
<section id="main">
<div class="page-header">
<ul>
<li>
<span class="dropdown">
<span>
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<?= $this->render('project/dropdown', array('project' => $project)) ?>
</ul>
</span>
</span>
</li>
<li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('ProjectEdit', 'edit', $project['id'])): ?>
<li>
<i class="fa fa-cog fa-fw"></i>
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
<i class="fa fa-folder fa-fw"></i>
<?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
</ul>
</div>
<?= $this->projectHeader->render($project, 'Listing', 'show') ?>
<section class="sidebar-container">
<?= $this->render($sidebar_template, array('project' => $project)) ?>

View File

@ -1,5 +1,5 @@
<section id="main">
<div class="page-header page-header-mobile">
<div class="page-header">
<ul>
<?php if ($this->user->hasAccess('ProjectCreation', 'create')): ?>
<li>

View File

@ -1,19 +1,12 @@
<section id="main">
<?= $this->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
'categories_list' => $categories_list,
'users_list' => $users_list,
'custom_filters_list' => $custom_filters_list,
'is_board' => true,
)) ?>
<?= $this->projectHeader->render($project, 'Board', 'show', true) ?>
<?= $this->render('board/table_container', array(
'project' => $project,
'swimlanes' => $swimlanes,
'board_private_refresh_interval' => $board_private_refresh_interval,
'board_highlight_period' => $board_highlight_period,
'project' => $project,
'swimlanes' => $swimlanes,
'board_private_refresh_interval' => $board_private_refresh_interval,
'board_highlight_period' => $board_highlight_period,
)) ?>
</section>

View File

@ -1,9 +1,5 @@
<section id="main">
<?= $this->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
)) ?>
<?= $this->projectHeader->render($project, 'Calendar', 'show') ?>
<div id="calendar"
data-save-url="<?= $this->url->href('calendar', 'save', array('project_id' => $project['id'])) ?>"
data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>"

View File

@ -1,10 +1,5 @@
<section id="main">
<?= $this->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
'users_list' => $users_list,
)) ?>
<?= $this->projectHeader->render($project, 'Gantt', 'project') ?>
<div class="menu-inline">
<ul>
<li <?= $sorting === 'board' ? 'class="active"' : '' ?>>

View File

@ -1,11 +1,5 @@
<section id="main">
<?= $this->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
'custom_filters_list' => $custom_filters_list,
'users_list' => $users_list,
'categories_list' => $categories_list,
)) ?>
<?= $this->projectHeader->render($project, 'Listing', 'show') ?>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('No tasks found.') ?></p>

View File

@ -1,30 +1,5 @@
<section id="main">
<div class="page-header">
<ul>
<li>
<span class="dropdown">
<span>
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<?= $this->render('project/dropdown', array('project' => $project)) ?>
</ul>
</span>
</span>
</li>
<li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-folder fa-fw"></i>
<?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
</ul>
</div>
<?= $this->projectHeader->render($project, 'Listing', 'show') ?>
<section class="sidebar-container">
<?= $this->render($sidebar_template, array('project' => $project)) ?>

View File

@ -1,7 +1,7 @@
<div class="dropdown">
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<a href="#" class="dropdown-menu action-menu"><?= t('Menu') ?> <i class="fa fa-caret-down"></i></a>
<ul>
<?php if ($is_board): ?>
<?php if ($board_view): ?>
<li>
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>>
<i class="fa fa-expand fa-fw"></i>

View File

@ -1,7 +1,7 @@
<div class="project-header">
<?= $this->hook->render('template:project:header:before', array('project' => $project)) ?>
<?= $this->render('project_header/dropdown', array('project' => $project, 'is_board' => isset($is_board))) ?>
<?= $this->render('project_header/dropdown', array('project' => $project, 'board_view' => $board_view)) ?>
<?= $this->render('project_header/views', array('project' => $project, 'filters' => $filters)) ?>
<?= $this->render('project_header/search', array(
'project' => $project,

View File

@ -1,7 +1,7 @@
<ul class="views">
<li <?= $this->app->getRouterController() === 'ProjectOverview' ? 'class="active"' : '' ?>>
<i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('Overview'), 'ProjectOverview', 'show', array('project_id' => $project['id']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?>
<?= $this->url->link(t('Overview'), 'ProjectOverview', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?>
</li>
<li <?= $this->app->getRouterController() === 'Board' ? 'class="active"' : '' ?>>
<i class="fa fa-th fa-fw"></i>

View File

@ -1,9 +1,5 @@
<section id="main">
<?= $this->render('project_header/header', array(
'project' => $project,
'filters' => $filters,
)) ?>
<?= $this->projectHeader->render($project, 'ProjectOverview', 'show') ?>
<?= $this->render('project_overview/columns', array('project' => $project)) ?>
<?= $this->render('project_overview/description', array('project' => $project)) ?>
<?= $this->render('project_overview/attachments', array('project' => $project, 'images' => $images, 'files' => $files)) ?>

View File

@ -1,5 +1,6 @@
<section id="task-summary">
<h2><?= $this->text->e($task['title']) ?></h2>
<div class="task-summary-container color-<?= $task['color_id'] ?>">
<div class="task-summary-column">
<ul class="no-bullet">
@ -134,4 +135,10 @@
</ul>
</div>
</div>
<?php if ($editable && empty($task['date_started'])): ?>
<div class="task-summary-buttons">
<?= $this->url->button('fa-play', t('Set start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</div>
<?php endif ?>
</section>

View File

@ -1,25 +1,5 @@
<section id="main">
<div class="page-header">
<ul>
<li>
<?= $this->render('task/menu', array('task' => $task)) ?>
</li>
<li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, $task['swimlane_id'] != 0 ? 'swimlane-'.$task['swimlane_id'] : '') ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
</li>
<?php if ($this->user->hasProjectAccess('ProjectEdit', 'edit', $task['project_id'])): ?>
<li>
<i class="fa fa-cog fa-fw"></i>
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
</ul>
</div>
<?= $this->projectHeader->render($project, 'Listing', 'show') ?>
<section
class="sidebar-container" id="task-view"
data-edit-url="<?= $this->url->href('taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"

View File

@ -1,78 +0,0 @@
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
<div class="dropdown">
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<?php if (empty($task['date_started'])): ?>
<li>
<i class="fa fa-play fa-fw"></i>
<?= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
<li>
<i class="fa fa-pencil-square-o fa-fw"></i>
<?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-align-left fa-fw"></i>
<?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-refresh fa-rotate-90 fa-fw"></i>
<?= $this->url->link(t('Edit recurrence'), 'TaskRecurrence', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-plus fa-fw"></i>
<?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-code-fork fa-fw"></i>
<?= $this->url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-external-link fa-fw"></i>
<?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-comment-o fa-fw"></i>
<?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-file fa-fw"></i>
<?= $this->url->link(t('Attach a document'), 'TaskFile', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-camera fa-fw"></i>
<?= $this->url->link(t('Add a screenshot'), 'TaskFile', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-files-o fa-fw"></i>
<?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-clipboard fa-fw"></i>
<?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-clone fa-fw"></i>
<?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<?php if ($task['is_active'] == 1): ?>
<i class="fa fa-times fa-fw"></i>
<?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
<?php else: ?>
<i class="fa fa-check-square-o fa-fw"></i>
<?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
<?php endif ?>
</li>
<?php if ($this->task->canRemove($task)): ?>
<li>
<i class="fa fa-trash-o fa-fw"></i>
<?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<?php endif ?>
<?= $this->hook->render('template:task:menu') ?>
</ul>
</div>
<?php endif ?>

View File

@ -14,7 +14,6 @@
'task' => $task,
'subtasks' => $subtasks,
'project' => $project,
'users_list' => isset($users_list) ? $users_list : array(),
'editable' => true,
)) ?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,20 @@
/* project header */
.project-header {
margin-top: 8px;
margin-bottom: 20px;
}
.action-menu {
color: #333;
text-decoration: none;
}
.action-menu:hover,
.action-menu:focus {
text-decoration: underline;
}
/* search box */
.filter-box {
display: inline-block;
position: relative;

View File

@ -116,10 +116,3 @@ header h1 .tooltip {
.menu-inline {
margin-bottom: 5px;
}
@media only screen and (max-width: 640px) {
.page-header-mobile li {
display: block;
margin-bottom: 5px;
}
}

View File

@ -167,6 +167,11 @@ span.task-board-age-column {
padding-top: 0;
}
.task-summary-buttons {
margin-top: 10px;
font-size: 0.85em;
}
.task-summary-container {
border: 2px solid #000;
border-radius: 8px;

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,7 @@ Kanboard.Gantt.prototype.renderVerticalHeader = function() {
.append("&nbsp;");
if (this.data[i].type == "task") {
content.append(jQuery("<a>", {"href": this.data[i].link, "target": "_blank", "title": this.data[i].title}).append(this.data[i].title));
content.append(jQuery("<a>", {"href": this.data[i].link, "title": this.data[i].title}).append(this.data[i].title));
}
else {
content

View File

@ -177,7 +177,6 @@ List of template hooks:
| `template:project:integrations` | Integration page in projects settings |
| `template:project:sidebar` | Sidebar in project settings |
| `template:project-user:sidebar` | Sidebar on project user overview page |
| `template:task:menu` | "Actions" menu on left in different task views |
| `template:task:dropdown` | Task dropdown menu in listing pages |
| `template:task:sidebar` | Sidebar on task page |
| `template:task:form:right-column` | Right column in task form |