diff options
Diffstat (limited to 'app/Template/dashboard')
-rw-r--r-- | app/Template/dashboard/calendar.php | 9 | ||||
-rw-r--r-- | app/Template/dashboard/layout.php | 12 | ||||
-rw-r--r-- | app/Template/dashboard/notifications.php | 24 | ||||
-rw-r--r-- | app/Template/dashboard/projects.php | 8 | ||||
-rw-r--r-- | app/Template/dashboard/show.php | 13 | ||||
-rw-r--r-- | app/Template/dashboard/sidebar.php | 3 | ||||
-rw-r--r-- | app/Template/dashboard/subtasks.php | 8 | ||||
-rw-r--r-- | app/Template/dashboard/tasks.php | 10 |
8 files changed, 51 insertions, 36 deletions
diff --git a/app/Template/dashboard/calendar.php b/app/Template/dashboard/calendar.php index 75c96d83..0b768b31 100644 --- a/app/Template/dashboard/calendar.php +++ b/app/Template/dashboard/calendar.php @@ -1,5 +1,4 @@ -<div id="calendar" - data-check-url="<?= $this->url->href('CalendarController', 'user', array('user_id' => $user['id'])) ?>" - data-save-url="<?= $this->url->href('CalendarController', 'save') ?>" -> -</div> +<?= $this->calendar->render( + $this->url->href('CalendarController', 'user', array('user_id' => $user['id'])), + $this->url->href('CalendarController', 'save') +) ?> diff --git a/app/Template/dashboard/layout.php b/app/Template/dashboard/layout.php index 795537a6..15ab8a1a 100644 --- a/app/Template/dashboard/layout.php +++ b/app/Template/dashboard/layout.php @@ -3,23 +3,19 @@ <ul> <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> </li> <?php endif ?> <?php if ($this->app->config('disable_private_project', 0) == 0): ?> <li> - <i class="fa fa-lock fa-fw"></i> - <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> </li> <?php endif ?> <li> - <i class="fa fa-search fa-fw"></i> - <?= $this->url->link(t('Search'), 'SearchController', 'index') ?> + <?= $this->url->icon('search', t('Search'), 'SearchController', 'index') ?> </li> <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('Project management'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Project management'), 'ProjectListController', 'show') ?> </li> </ul> </div> diff --git a/app/Template/dashboard/notifications.php b/app/Template/dashboard/notifications.php index 3b70b49f..81adb348 100644 --- a/app/Template/dashboard/notifications.php +++ b/app/Template/dashboard/notifications.php @@ -7,21 +7,34 @@ <?php else: ?> <ul> <li> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Mark all as read'), 'WebNotificationController', 'flush', array('user_id' => $user['id'])) ?> + <?= $this->url->icon('check-square-o', t('Mark all as read'), 'WebNotificationController', 'flush', array('user_id' => $user['id'])) ?> </li> </ul> </div> - <table class="table-fixed table-small"> + <table class="table-striped table-scrolling table-small"> <tr> + <th class="column-20"><?= t('Project') ?></th> <th><?= t('Notification') ?></th> - <th class="column-20"><?= t('Date') ?></th> + <th class="column-15"><?= t('Date') ?></th> <th class="column-15"><?= t('Action') ?></th> </tr> <?php foreach ($notifications as $notification): ?> <tr> <td> + <?php if (isset($notification['event_data']['task']['project_name'])): ?> + <?= $this->url->link( + $this->text->e($notification['event_data']['task']['project_name']), + 'BoardViewController', + 'show', + array('project_id' => $notification['event_data']['task']['project_id']) + ) + ?> + <?php elseif (isset($notification['event_data']['project_name'])): ?> + <?= $this->text->e($notification['event_data']['project_name']) ?> + <?php endif ?> + </td> + <td> <?php if ($this->text->contains($notification['event_name'], 'subtask')): ?> <i class="fa fa-tasks fa-fw"></i> <?php elseif ($this->text->contains($notification['event_name'], 'task.move')): ?> @@ -46,8 +59,7 @@ <?= $this->dt->datetime($notification['date_creation']) ?> </td> <td> - <i class="fa fa-check fa-fw"></i> - <?= $this->url->link(t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> + <?= $this->url->icon('check', t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php index 962e4d83..f8806c01 100644 --- a/app/Template/dashboard/projects.php +++ b/app/Template/dashboard/projects.php @@ -4,10 +4,10 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('Your are not member of any project.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'id') ?></th> - <th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', 'is_private') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\ProjectModel::TABLE.'.id') ?></th> + <th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', \Kanboard\Model\ProjectModel::TABLE.'.is_private') ?></th> <th class="column-25"><?= $paginator->order(t('Project'), \Kanboard\Model\ProjectModel::TABLE.'.name') ?></th> <th class="column-10"><?= t('Tasks') ?></th> <th><?= t('Columns') ?></th> @@ -43,7 +43,7 @@ <td class="dashboard-project-stats"> <?php foreach ($project['columns'] as $column): ?> <strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong> - <span><?= $this->text->e($column['title']) ?></span> + <small><?= $this->text->e($column['title']) ?></small> <?php endforeach ?> </td> diff --git a/app/Template/dashboard/show.php b/app/Template/dashboard/show.php index 637b60f8..b1d877cf 100644 --- a/app/Template/dashboard/show.php +++ b/app/Template/dashboard/show.php @@ -1,12 +1,19 @@ -<div class="filter-box"> +<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')) ?> - <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'form-input-large') ?> - <?= $this->render('app/filters_helper') ?> + + <div class="input-addon"> + <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper') ?> + </div> + </div> </form> </div> <?= $this->render('dashboard/projects', array('paginator' => $project_paginator, 'user' => $user)) ?> <?= $this->render('dashboard/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?> <?= $this->render('dashboard/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?> + +<?= $this->hook->render('template:dashboard:show', array('user' => $user)) ?> diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php index 86cc20f8..108c028a 100644 --- a/app/Template/dashboard/sidebar.php +++ b/app/Template/dashboard/sidebar.php @@ -1,5 +1,4 @@ <div class="sidebar"> - <h2><?= $this->text->e($user['name'] ?: $user['username']) ?></h2> <ul> <li <?= $this->app->checkMenuSelection('DashboardController', 'show') ?>> <?= $this->url->link(t('Overview'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?> @@ -22,6 +21,6 @@ <li <?= $this->app->checkMenuSelection('DashboardController', 'notifications') ?>> <?= $this->url->link(t('My notifications'), 'DashboardController', 'notifications', array('user_id' => $user['id'])) ?> </li> - <?= $this->hook->render('template:dashboard:sidebar') ?> + <?= $this->hook->render('template:dashboard:sidebar', array('user' => $user)) ?> </ul> </div> diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php index 8e0aa3ce..13770f0f 100644 --- a/app/Template/dashboard/subtasks.php +++ b/app/Template/dashboard/subtasks.php @@ -4,12 +4,13 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing assigned to you.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?></th> <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th> <th><?= $paginator->order(t('Task'), 'task_name') ?></th> - <th><?= $paginator->order(t('Subtask'), 'title') ?></th> + <th><?= $paginator->order(t('Subtask'), \Kanboard\Model\SubtaskModel::TABLE.'.title') ?></th> + <?= $this->hook->render('template:dashboard:subtasks:header:before-timetracking', array('paginator' => $paginator)) ?> <th class="column-20"><?= t('Time tracking') ?></th> </tr> <?php foreach ($paginator->getCollection() as $subtask): ?> @@ -26,6 +27,7 @@ <td> <?= $this->subtask->toggleStatus($subtask, $subtask['project_id']) ?> </td> + <?= $this->hook->render('template:dashboard:subtasks:rows', array('subtask' => $subtask)) ?> <td> <?php if (! empty($subtask['time_spent'])): ?> <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?> diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php index 4b83a96a..427b903d 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -4,14 +4,14 @@ <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is nothing assigned to you.') ?></p> <?php else: ?> - <table class="table-fixed table-small"> + <table class="table-striped table-small table-scrolling"> <tr> - <th class="column-5"><?= $paginator->order('Id', 'tasks.id') ?></th> + <th class="column-5"><?= $paginator->order('Id', \Kanboard\Model\TaskModel::TABLE.'.id') ?></th> <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th> - <th><?= $paginator->order(t('Task'), 'title') ?></th> - <th class="column-5"><?= $paginator->order('Priority', 'tasks.priority') ?></th> + <th><?= $paginator->order(t('Task'), \Kanboard\Model\TaskModel::TABLE.'.title') ?></th> + <th class="column-8"><?= $paginator->order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?></th> <th class="column-20"><?= t('Time tracking') ?></th> - <th class="column-10"><?= $paginator->order(t('Due date'), 'date_due') ?></th> + <th class="column-10"><?= $paginator->order(t('Due date'), \Kanboard\Model\TaskModel::TABLE.'.date_due') ?></th> <th class="column-10"><?= $paginator->order(t('Column'), 'column_title') ?></th> </tr> <?php foreach ($paginator->getCollection() as $task): ?> |