diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/app/sidebar.php | 1 | ||||
-rw-r--r-- | app/Template/config/sidebar.php | 1 | ||||
-rw-r--r-- | app/Template/export/sidebar.php | 1 | ||||
-rw-r--r-- | app/Template/header.php | 33 | ||||
-rw-r--r-- | app/Template/layout.php | 42 | ||||
-rw-r--r-- | app/Template/project/dropdown.php | 34 | ||||
-rw-r--r-- | app/Template/project/sidebar.php | 2 | ||||
-rw-r--r-- | app/Template/project_user/sidebar.php | 2 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 4 | ||||
-rw-r--r-- | app/Template/user/sidebar.php | 4 |
10 files changed, 75 insertions, 49 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/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/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/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/layout.php b/app/Template/layout.php index 60108175..934fb62c 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -28,6 +28,8 @@ <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') ?>" @@ -38,43 +40,17 @@ <?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..c9563a4f 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -9,21 +9,23 @@ </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-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> <?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/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/user/sidebar.php b/app/Template/user/sidebar.php index cd1c85c1..77612d0f 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> @@ -68,6 +70,8 @@ </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'])) ?> |