diff options
Diffstat (limited to 'app/Template')
27 files changed, 152 insertions, 283 deletions
diff --git a/app/Template/app/sidebar.php b/app/Template/app/sidebar.php index 2d966009..f4a455f8 100644 --- a/app/Template/app/sidebar.php +++ b/app/Template/app/sidebar.php @@ -19,6 +19,7 @@ <li <?= $this->app->getRouterAction() === 'activity' ? 'class="active"' : '' ?>> <?= $this->url->link(t('My activity stream'), 'app', 'activity', array('user_id' => $user['id'])) ?> </li> + <?= $this->hook->render('dashboard:sidebar') ?> </ul> <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> diff --git a/app/Template/board/table_swimlane.php b/app/Template/board/table_swimlane.php index be401633..1caa920d 100644 --- a/app/Template/board/table_swimlane.php +++ b/app/Template/board/table_swimlane.php @@ -7,6 +7,20 @@ <i class="fa fa-minus-circle hide-icon-swimlane-<?= $swimlane['id'] ?>"></i> <i class="fa fa-plus-circle show-icon-swimlane-<?= $swimlane['id'] ?>" style="display: none"></i> </a> + + <?php if (! empty($swimlane['description'])): ?> + <span + title="<?= t('Description') ?>" + class="tooltip" + data-href="<?= $this->url->href('board', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id'])) ?>"> + <i class="fa fa-info-circle"></i> + </span> + <?php endif ?> + + <span title="<?= t('Task count') ?>" class="board-column-header-task-count swimlane-task-count-<?= $swimlane['id'] ?>"> + (<?= $swimlane['nb_tasks'] ?>) + </span> + <span class="board-swimlane-toggle-title show-icon-swimlane-<?= $swimlane['id'] ?>"><?= $this->e($swimlane['name']) ?></span> <?php endif ?> </th> @@ -62,10 +76,6 @@ <?php if (! $hide_swimlane): ?> <th class="board-swimlane-title"> <?= $this->e($swimlane['name']) ?> - - <div title="<?= t('Task count') ?>" class="board-column-header-task-count"> - (<span><?= $swimlane['nb_tasks'] ?></span>) - </div> </th> <?php endif ?> diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php deleted file mode 100644 index 92561188..00000000 --- a/app/Template/budget/breakdown.php +++ /dev/null @@ -1,30 +0,0 @@ -<div class="page-header"> - <h2><?= t('Cost breakdown') ?></h2> -</div> - -<?php if ($paginator->isEmpty()): ?> - <p class="alert"><?= t('There is nothing to show.') ?></p> -<?php else: ?> - <table class="table-fixed"> - <tr> - <th class="column-20"><?= $paginator->order(t('Task'), 'task_title') ?></th> - <th class="column-25"><?= $paginator->order(t('Subtask'), 'subtask_title') ?></th> - <th class="column-20"><?= $paginator->order(t('User'), 'username') ?></th> - <th class="column-10"><?= t('Cost') ?></th> - <th class="column-10"><?= $paginator->order(t('Time spent'), \Model\SubtaskTimeTracking::TABLE.'.time_spent') ?></th> - <th class="column-15"><?= $paginator->order(t('Date'), 'start') ?></th> - </tr> - <?php foreach ($paginator->getCollection() as $record): ?> - <tr> - <td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td> - <td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td> - <td><?= $this->url->link($this->e($record['name'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td> - <td><?= n($record['cost']) ?></td> - <td><?= n($record['time_spent']).' '.t('hours') ?></td> - <td><?= dt('%B %e, %Y', $record['start']) ?></td> - </tr> - <?php endforeach ?> - </table> - - <?= $paginator ?> -<?php endif ?>
\ No newline at end of file diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php deleted file mode 100644 index a563796d..00000000 --- a/app/Template/budget/create.php +++ /dev/null @@ -1,47 +0,0 @@ -<div class="page-header"> - <h2><?= t('Budget lines') ?></h2> -</div> - -<?php if (! empty($lines)): ?> -<table class="table-fixed table-stripped"> - <tr> - <th class="column-20"><?= t('Budget line') ?></th> - <th class="column-20"><?= t('Date') ?></th> - <th><?= t('Comment') ?></th> - <th><?= t('Action') ?></th> - </tr> - <?php foreach ($lines as $line): ?> - <tr> - <td><?= n($line['amount']) ?></td> - <td><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td> - <td><?= $this->e($line['comment']) ?></td> - <td> - <?= $this->url->link(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?> - </td> - </tr> - <?php endforeach ?> -</table> - -<h3><?= t('New budget line') ?></h3> -<?php endif ?> - -<form method="post" action="<?= $this->url->href('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->form->label(t('Amount'), 'amount') ?> - <?= $this->form->text('amount', $values, $errors, array('required'), 'form-numeric') ?> - - <?= $this->form->label(t('Date'), 'date') ?> - <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?> - - <?= $this->form->label(t('Comment'), 'comment') ?> - <?= $this->form->text('comment', $values, $errors) ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - </div> -</form>
\ No newline at end of file diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php deleted file mode 100644 index 51ef3d87..00000000 --- a/app/Template/budget/index.php +++ /dev/null @@ -1,34 +0,0 @@ -<div class="page-header"> - <h2><?= t('Budget overview') ?></h2> -</div> - -<?php if (! empty($daily_budget)): ?> -<div id="budget-chart"> - <div id="chart" - data-date-format="<?= e('%%Y-%%m-%%d') ?>" - data-metrics='<?= json_encode($daily_budget, JSON_HEX_APOS) ?>' - data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type')), JSON_HEX_APOS) ?>'></div> -</div> -<hr/> -<table class="table-fixed table-stripped"> - <tr> - <th><?= t('Date') ?></td> - <th><?= t('Budget line') ?></td> - <th><?= t('Expenses') ?></td> - <th><?= t('Remaining') ?></td> - </tr> - <?php foreach ($daily_budget as $line): ?> - <tr> - <td><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td> - <td><?= n($line['in']) ?></td> - <td><?= n($line['out']) ?></td> - <td><?= n($line['left']) ?></td> - </tr> - <?php endforeach ?> -</table> -<?php else: ?> - <p class="alert"><?= t('There is not enough data to show something.') ?></p> -<?php endif ?> - -<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?> -<?= $this->asset->js('assets/js/vendor/c3.min.js') ?>
\ No newline at end of file diff --git a/app/Template/budget/remove.php b/app/Template/budget/remove.php deleted file mode 100644 index a5b906a1..00000000 --- a/app/Template/budget/remove.php +++ /dev/null @@ -1,13 +0,0 @@ -<div class="page-header"> - <h2><?= t('Remove budget line') ?></h2> -</div> - -<div class="confirm"> - <p class="alert alert-info"><?= t('Do you really want to remove this budget line?') ?></p> - - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'budget', 'remove', array('project_id' => $project['id'], 'budget_id' => $budget_id), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'budget', 'create', array('project_id' => $project['id'])) ?> - </div> -</div>
\ No newline at end of file diff --git a/app/Template/budget/sidebar.php b/app/Template/budget/sidebar.php deleted file mode 100644 index 8477c052..00000000 --- a/app/Template/budget/sidebar.php +++ /dev/null @@ -1,16 +0,0 @@ -<div class="sidebar"> - <h2><?= t('Budget') ?></h2> - <ul> - <li <?= $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>> - <?= $this->url->link(t('Budget overview'), 'budget', 'index', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->getRouterAction() === 'create' ? 'class="active"' : '' ?>> - <?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->getRouterAction() === 'breakdown' ? 'class="active"' : '' ?>> - <?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?> - </li> - </ul> - <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> - <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> -</div>
\ No newline at end of file diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 3617979a..083da283 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -34,6 +34,7 @@ <li> <?= $this->url->link(t('Documentation'), 'doc', 'show') ?> </li> + <?= $this->hook->render('config:sidebar') ?> </ul> <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php index f72c5700..1c78c47a 100644 --- a/app/Template/currency/index.php +++ b/app/Template/currency/index.php @@ -52,5 +52,3 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> </div> </form> - -<p class="alert alert-info"><?= t('Currency rates are used to calculate project budget.') ?></p> diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php index f204d29d..7e39a5af 100644 --- a/app/Template/export/sidebar.php +++ b/app/Template/export/sidebar.php @@ -13,6 +13,7 @@ <li <?= $this->app->getRouterAction() === 'summary' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?> </li> + <?= $this->hook->render('export:sidebar') ?> </ul> <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> diff --git a/app/Template/file/show.php b/app/Template/file/show.php index b1a0a813..a390c9fb 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -11,7 +11,7 @@ <li> <?php if (function_exists('imagecreatetruecolor')): ?> <div class="img_container"> - <img src="<?= $this->url->href('file', 'thumbnail', array('width' => 250, 'height' => 100, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> + <img src="<?= $this->url->href('file', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/> </div> <?php endif ?> <p> diff --git a/app/Template/gantt/task_creation.php b/app/Template/gantt/task_creation.php index d0d14c1e..7997e231 100644 --- a/app/Template/gantt/task_creation.php +++ b/app/Template/gantt/task_creation.php @@ -12,7 +12,6 @@ <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?> <?= $this->form->label(t('Description'), 'description') ?> - <div class="form-tabs"> <div class="write-area"> <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?> @@ -29,6 +28,8 @@ </li> </ul> </div> + + <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> </div> <div class="form-column"> @@ -43,17 +44,14 @@ <?= $this->form->select('swimlane_id', $swimlanes_list, $values, $errors, array('tabindex="5"')) ?><br/> <?php endif ?> - <?= $this->form->label(t('Color'), 'color_id') ?> - <?= $this->form->select('color_id', $colors_list, $values, $errors, array('tabindex="7"')) ?><br/> - <?= $this->form->label(t('Complexity'), 'score') ?> - <?= $this->form->number('score', $values, $errors, array('tabindex="8"')) ?><br/> + <?= $this->form->number('score', $values, $errors, array('tabindex="6"')) ?><br/> <?= $this->form->label(t('Start Date'), 'date_started') ?> - <?= $this->form->text('date_started', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="9"'), 'form-date') ?> + <?= $this->form->text('date_started', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="7"'), 'form-date') ?> <?= $this->form->label(t('Due Date'), 'date_due') ?> - <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="10"'), 'form-date') ?><br/> + <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="8"'), 'form-date') ?><br/> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> </div> diff --git a/app/Template/header.php b/app/Template/header.php new file mode 100644 index 00000000..0bcfdbbc --- /dev/null +++ b/app/Template/header.php @@ -0,0 +1,33 @@ +<header> + <nav> + <h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->e($title) ?> + <?php if (! empty($description)): ?> + <span class="tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'> + <i class="fa fa-info-circle"></i> + </span> + <?php endif ?> + </h1> + <ul> + <?php if (isset($board_selector) && ! empty($board_selector)): ?> + <li> + <select id="board-selector" + class="chosen-select select-auto-redirect" + tabindex="-1" + data-notfound="<?= t('No results match:') ?>" + data-placeholder="<?= t('Display another project') ?>" + data-redirect-regex="PROJECT_ID" + data-redirect-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> + <option value=""></option> + <?php foreach($board_selector as $board_id => $board_name): ?> + <option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option> + <?php endforeach ?> + </select> + </li> + <?php endif ?> + <li> + <?= $this->url->link(t('Logout'), 'auth', 'logout') ?> + <span class="username hide-tablet">(<?= $this->user->getProfileLink() ?>)</span> + </li> + </ul> + </nav> +</header>
\ No newline at end of file diff --git a/app/Template/hourlyrate/index.php b/app/Template/hourlyrate/index.php deleted file mode 100644 index af305d07..00000000 --- a/app/Template/hourlyrate/index.php +++ /dev/null @@ -1,46 +0,0 @@ -<div class="page-header"> - <h2><?= t('Hourly rates') ?></h2> -</div> - -<?php if (! empty($rates)): ?> - -<table> - <tr> - <th><?= t('Hourly rate') ?></th> - <th><?= t('Currency') ?></th> - <th><?= t('Effective date') ?></th> - <th><?= t('Action') ?></th> - </tr> - <?php foreach ($rates as $rate): ?> - <tr> - <td><?= n($rate['rate']) ?></td> - <td><?= $rate['currency'] ?></td> - <td><?= dt('%b %e, %Y', $rate['date_effective']) ?></td> - <td> - <?= $this->url->link(t('Remove'), 'hourlyrate', 'confirm', array('user_id' => $user['id'], 'rate_id' => $rate['id'])) ?> - </td> - </tr> - <?php endforeach ?> -</table> - -<h3><?= t('Add new rate') ?></h3> -<?php endif ?> - -<form method="post" action="<?= $this->url->href('hourlyrate', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off"> - - <?= $this->form->hidden('user_id', $values) ?> - <?= $this->form->csrf() ?> - - <?= $this->form->label(t('Hourly rate'), 'rate') ?> - <?= $this->form->text('rate', $values, $errors, array('required'), 'form-numeric') ?> - - <?= $this->form->label(t('Currency'), 'currency') ?> - <?= $this->form->select('currency', $currencies_list, $values, $errors, array('required')) ?> - - <?= $this->form->label(t('Effective date'), 'date_effective') ?> - <?= $this->form->text('date_effective', $values, $errors, array('required'), 'form-date') ?> - - <div class="form-actions"> - <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - </div> -</form> diff --git a/app/Template/hourlyrate/remove.php b/app/Template/hourlyrate/remove.php deleted file mode 100644 index 121436e4..00000000 --- a/app/Template/hourlyrate/remove.php +++ /dev/null @@ -1,13 +0,0 @@ -<div class="page-header"> - <h2><?= t('Remove hourly rate') ?></h2> -</div> - -<div class="confirm"> - <p class="alert alert-info"><?= t('Do you really want to remove this hourly rate?') ?></p> - - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> - </div> -</div>
\ No newline at end of file diff --git a/app/Template/layout.php b/app/Template/layout.php index 3e883fbf..934fb62c 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -28,52 +28,29 @@ <link rel="apple-touch-icon" sizes="144x144" href="<?= $this->url->dir() ?>assets/img/touch-icon-ipad-retina.png"> <title><?= isset($title) ? $this->e($title) : 'Kanboard' ?></title> + + <?= $this->hook->render('layout:head') ?> </head> <body data-status-url="<?= $this->url->href('app', 'status') ?>" data-login-url="<?= $this->url->href('auth', 'login') ?>" + data-markdown-preview-url="<?= $this->url->href('app', 'preview') ?>" data-timezone="<?= $this->app->getTimezone() ?>" data-js-lang="<?= $this->app->jsLang() ?>"> <?php if (isset($no_layout) && $no_layout): ?> <?= $content_for_layout ?> <?php else: ?> - <header> - <nav> - <h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->e($title) ?> - <?php if (! empty($description)): ?> - <span class="tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'> - <i class="fa fa-info-circle"></i> - </span> - <?php endif ?> - </h1> - <ul> - <?php if (isset($board_selector) && ! empty($board_selector)): ?> - <li> - <select id="board-selector" - class="chosen-select select-auto-redirect" - tabindex="-1" - data-notfound="<?= t('No results match:') ?>" - data-placeholder="<?= t('Display another project') ?>" - data-redirect-regex="PROJECT_ID" - data-redirect-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>"> - <option value=""></option> - <?php foreach($board_selector as $board_id => $board_name): ?> - <option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option> - <?php endforeach ?> - </select> - </li> - <?php endif ?> - <li> - <?= $this->url->link(t('Logout'), 'auth', 'logout') ?> - <span class="username hide-tablet">(<?= $this->user->getProfileLink() ?>)</span> - </li> - </ul> - </nav> - </header> + <?= $this->hook->render('layout:top') ?> + <?= $this->render('header', array( + 'title' => $title, + 'description' => isset($description) ? $description : '', + 'board_selector' => $board_selector, + )) ?> <section class="page"> <?= $this->app->flashMessage() ?> <?= $content_for_layout ?> </section> + <?= $this->hook->render('layout:bottom') ?> <?php endif ?> </body> </html> diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index 0a53cc05..0f1e1f6b 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -9,21 +9,19 @@ </li> <?php endif ?> +<?= $this->hook->render('project:dropdown', array('project' => $project)) ?> + <?php if ($this->user->isProjectManagementAllowed($project['id'])): ?> -<li> - <i class="fa fa-line-chart fa-fw"></i> - <?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?> -</li> -<li> - <i class="fa fa-pie-chart fa-fw"></i> - <?= $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?> -</li> -<li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Exports'), 'export', 'tasks', array('project_id' => $project['id'])) ?> -</li> -<li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Settings'), 'project', 'show', array('project_id' => $project['id'])) ?> -</li> + <li> + <i class="fa fa-line-chart fa-fw"></i> + <?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?> + </li> + <li> + <i class="fa fa-download fa-fw"></i> + <?= $this->url->link(t('Exports'), 'export', 'tasks', array('project_id' => $project['id'])) ?> + </li> + <li> + <i class="fa fa-cog fa-fw"></i> + <?= $this->url->link(t('Settings'), 'project', 'show', array('project_id' => $project['id'])) ?> + </li> <?php endif ?> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 7b5d976f..84bbb6b1 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -48,6 +48,8 @@ </li> <?php endif ?> <?php endif ?> + + <?= $this->hook->render('project:sidebar') ?> </ul> <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> diff --git a/app/Template/project_user/sidebar.php b/app/Template/project_user/sidebar.php index 8cc3f41b..98219a87 100644 --- a/app/Template/project_user/sidebar.php +++ b/app/Template/project_user/sidebar.php @@ -24,5 +24,7 @@ <li <?= $this->app->getRouterAction() === 'closed' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Closed tasks'), 'projectuser', 'closed', $filter) ?> </li> + + <?= $this->hook->render('project-user:sidebar') ?> </ul> </div>
\ No newline at end of file diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index 1788fed2..dfc5cf0b 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -12,6 +12,27 @@ <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <?= $this->form->label(t('Description'), 'description') ?> + + <div class="form-tabs"> + + <div class="write-area"> + <?= $this->form->textarea('description', $values, $errors) ?> + </div> + <div class="preview-area"> + <div class="markdown"></div> + </div> + <ul class="form-tabs-nav"> + <li class="form-tab form-tab-selected"> + <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a> + </li> + <li class="form-tab"> + <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a> + </li> + </ul> + </div> + <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> + <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php index daee6af5..797d2ca2 100644 --- a/app/Template/swimlane/index.php +++ b/app/Template/swimlane/index.php @@ -14,7 +14,27 @@ <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?> + + <?= $this->form->label(t('Description'), 'description') ?> + + <div class="form-tabs"> + <div class="write-area"> + <?= $this->form->textarea('description', $values, $errors) ?> + </div> + <div class="preview-area"> + <div class="markdown"></div> + </div> + <ul class="form-tabs-nav"> + <li class="form-tab form-tab-selected"> + <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a> + </li> + <li class="form-tab"> + <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a> + </li> + </ul> + </div> + <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index f38572a3..b708e633 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -25,7 +25,7 @@ </li> <?php endif ?> <li> - <?= $this->url->link(t('Rename'), 'swimlane', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?> + <?= $this->url->link(t('Edit'), 'swimlane', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?> </li> <li> <?php if ($swimlane['is_active']): ?> diff --git a/app/Template/task/color_picker.php b/app/Template/task/color_picker.php new file mode 100644 index 00000000..a849b9ce --- /dev/null +++ b/app/Template/task/color_picker.php @@ -0,0 +1,11 @@ +<div class="color-picker"> +<?php foreach ($colors_list as $color_id => $color_name): ?> + <div + data-color-id="<?= $color_id ?>" + class="color-square color-<?= $color_id ?> <?= isset($values['color_id']) && $values['color_id'] === $color_id ? 'color-square-selected' : '' ?>" + title="<?= $this->e($color_name) ?>"> + </div> +<?php endforeach ?> +</div> + +<?= $this->form->hidden('color_id', $values) ?>
\ No newline at end of file diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 1f06ab8c..cf0e9f76 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -18,6 +18,8 @@ <?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> + + <?= $this->hook->render('task:sidebar:information') ?> </ul> <h2><?= t('Actions') ?></h2> <ul> @@ -66,6 +68,8 @@ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> + + <?= $this->hook->render('task:sidebar:actions') ?> </ul> <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div> <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div> diff --git a/app/Template/task_creation/form.php b/app/Template/task_creation/form.php index 8a29896e..325ca1c8 100644 --- a/app/Template/task_creation/form.php +++ b/app/Template/task_creation/form.php @@ -10,8 +10,7 @@ </div> <?php endif ?> -<section id="task-section"> -<form method="post" action="<?= $this->url->href('taskcreation', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> +<form id="task-form" method="post" action="<?= $this->url->href('taskcreation', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -38,7 +37,7 @@ </ul> </div> - <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> + <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> <?php if (! isset($duplicate)): ?> <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> @@ -62,9 +61,6 @@ <?= $this->form->label(t('Column'), 'column_id') ?> <?= $this->form->select('column_id', $columns_list, $values, $errors, array('tabindex="6"')) ?><br/> - <?= $this->form->label(t('Color'), 'color_id') ?> - <?= $this->form->select('color_id', $colors_list, $values, $errors, array('tabindex="7"')) ?><br/> - <?= $this->form->label(t('Complexity'), 'score') ?> <?= $this->form->number('score', $values, $errors, array('tabindex="8"')) ?><br/> @@ -80,5 +76,4 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue" tabindex="11"/> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> </div> -</form> -</section> +</form>
\ No newline at end of file diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php index fe4696d6..f4d7449a 100644 --- a/app/Template/task_modification/edit_task.php +++ b/app/Template/task_modification/edit_task.php @@ -1,8 +1,7 @@ <div class="page-header"> <h2><?= t('Edit a task') ?></h2> </div> -<section id="task-section"> -<form method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form id="task-form" method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -12,7 +11,6 @@ <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?><br/> <?= $this->form->label(t('Description'), 'description') ?> - <div class="form-tabs"> <div class="write-area"> <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?> @@ -30,6 +28,7 @@ </ul> </div> + <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?> </div> <div class="form-column"> @@ -42,9 +41,6 @@ <?= $this->form->label(t('Category'), 'category_id') ?> <?= $this->form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?><br/> - <?= $this->form->label(t('Color'), 'color_id') ?> - <?= $this->form->select('color_id', $colors_list, $values, $errors, array('tabindex="5"')) ?><br/> - <?= $this->form->label(t('Complexity'), 'score') ?> <?= $this->form->number('score', $values, $errors, array('tabindex="6"')) ?><br/> @@ -62,5 +58,4 @@ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php endif ?> </div> -</form> -</section> +</form>
\ No newline at end of file diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index cd1c85c1..80fe8684 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -20,6 +20,8 @@ <?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?> </li> <?php endif ?> + + <?= $this->hook->render('user:sidebar:information') ?> </ul> <h2><?= t('Actions') ?></h2> @@ -60,14 +62,13 @@ <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'authentication' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?> </li> - <li <?= $this->app->getRouterController() === 'hourlyrate' ? 'class="active"' : '' ?>> - <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> - </li> <li <?= $this->app->getRouterController() === 'timetable' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?> </li> <?php endif ?> + <?= $this->hook->render('user:sidebar:actions', array('user' => $user)) ?> + <?php if ($this->user->isAdmin() && ! $this->user->isCurrentUser($user['id'])): ?> <li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'remove' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?> |