First draft for plugins system
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
33
app/Template/header.php
Normal file
33
app/Template/header.php
Normal file
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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 ?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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'])) ?>
|
||||
|
||||
Reference in New Issue
Block a user