summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-31 17:57:02 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-31 17:57:02 -0400
commit599b6624dde8cb1c1f6416ee0af530402089da4d (patch)
tree2cc995b09a4b2e67de276389fb28b0040d484296 /app
parent380aacd3f586089ae5c1e69841c0e0cb99478dcd (diff)
Improve project navigation
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Analytic.php2
-rw-r--r--app/Controller/Base.php3
-rw-r--r--app/Controller/Budget.php10
-rw-r--r--app/Controller/Export.php2
-rw-r--r--app/Controller/Project.php87
-rw-r--r--app/Controller/Projectinfo.php97
-rw-r--r--app/Model/Acl.php3
-rw-r--r--app/Template/analytic/layout.php21
-rw-r--r--app/Template/board/filters.php36
-rw-r--r--app/Template/budget/breakdown.php6
-rw-r--r--app/Template/budget/create.php6
-rw-r--r--app/Template/budget/index.php8
-rw-r--r--app/Template/budget/sidebar.php14
-rw-r--r--app/Template/calendar/show.php22
-rw-r--r--app/Template/export/sidebar.php17
-rw-r--r--app/Template/export/subtasks.php2
-rw-r--r--app/Template/export/tasks.php2
-rw-r--r--app/Template/project/activity.php28
-rw-r--r--app/Template/project/dropdown.php41
-rw-r--r--app/Template/project/layout.php14
-rw-r--r--app/Template/project/show.php1
-rw-r--r--app/Template/project/sidebar.php27
-rw-r--r--app/Template/project/tasks.php33
-rw-r--r--app/Template/projectinfo/activity.php30
-rw-r--r--app/Template/projectinfo/search.php (renamed from app/Template/project/search.php)25
-rw-r--r--app/Template/projectinfo/tasks.php33
-rw-r--r--app/Template/task/layout.php8
27 files changed, 321 insertions, 257 deletions
diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php
index e7578da9..f31870e0 100644
--- a/app/Controller/Analytic.php
+++ b/app/Controller/Analytic.php
@@ -21,7 +21,7 @@ class Analytic extends Base
private function layout($template, array $params)
{
$params['board_selector'] = $this->projectPermission->getAllowedProjects($this->userSession->getId());
- $params['analytic_content_for_layout'] = $this->template->render($template, $params);
+ $params['content_for_sublayout'] = $this->template->render($template, $params);
return $this->template->layout('analytic/layout', $params);
}
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 57a64a3a..fcd07b99 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -247,12 +247,13 @@ abstract class Base extends \Core\Base
* @param array $params Template parameters
* @return string
*/
- protected function projectLayout($template, array $params)
+ protected function projectLayout($template, array $params, $sidebar_template = 'project/sidebar')
{
$content = $this->template->render($template, $params);
$params['project_content_for_layout'] = $content;
$params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'].' &gt; '.$params['title'];
$params['board_selector'] = $this->projectPermission->getAllowedProjects($this->userSession->getId());
+ $params['sidebar_template'] = $sidebar_template;
return $this->template->layout('project/layout', $params);
}
diff --git a/app/Controller/Budget.php b/app/Controller/Budget.php
index 45dad7fb..a2f7e0db 100644
--- a/app/Controller/Budget.php
+++ b/app/Controller/Budget.php
@@ -23,7 +23,7 @@ class Budget extends Base
'daily_budget' => $this->budget->getDailyBudgetBreakdown($project['id']),
'project' => $project,
'title' => t('Budget')
- )));
+ ), 'budget/sidebar'));
}
/**
@@ -47,7 +47,7 @@ class Budget extends Base
'paginator' => $paginator,
'project' => $project,
'title' => t('Budget')
- )));
+ ), 'budget/sidebar'));
}
/**
@@ -68,8 +68,8 @@ class Budget extends Base
'values' => $values + array('project_id' => $project['id']),
'errors' => $errors,
'project' => $project,
- 'title' => t('Budget')
- )));
+ 'title' => t('Budget lines')
+ ), 'budget/sidebar'));
}
/**
@@ -111,7 +111,7 @@ class Budget extends Base
'project' => $project,
'budget_id' => $this->request->getIntegerParam('budget_id'),
'title' => t('Remove a budget line'),
- )));
+ ), 'budget/sidebar'));
}
/**
diff --git a/app/Controller/Export.php b/app/Controller/Export.php
index b8f932c1..117fb5ee 100644
--- a/app/Controller/Export.php
+++ b/app/Controller/Export.php
@@ -40,7 +40,7 @@ class Export extends Base
'date_formats' => $this->dateParser->getAvailableFormats(),
'project' => $project,
'title' => $page_title,
- )));
+ ), 'export/sidebar'));
}
/**
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 63c20cc4..ba039b7d 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -3,7 +3,7 @@
namespace Controller;
/**
- * Project controller
+ * Project controller (Settings + creation/edition)
*
* @package controller
* @author Frederic Guillot
@@ -416,91 +416,6 @@ class Project extends Base
}
/**
- * Activity page for a project
- *
- * @access public
- */
- public function activity()
- {
- $project = $this->getProject();
-
- $this->response->html($this->template->layout('project/activity', array(
- 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
- 'events' => $this->projectActivity->getProject($project['id']),
- 'project' => $project,
- 'title' => t('%s\'s activity', $project['name'])
- )));
- }
-
- /**
- * Task search for a given project
- *
- * @access public
- */
- public function search()
- {
- $project = $this->getProject();
- $search = $this->request->getStringParam('search');
- $nb_tasks = 0;
-
- $paginator = $this->paginator
- ->setUrl('project', 'search', array('search' => $search, 'project_id' => $project['id']))
- ->setMax(30)
- ->setOrder('tasks.id')
- ->setDirection('DESC');
-
- if ($search !== '') {
-
- $paginator
- ->setQuery($this->taskFinder->getSearchQuery($project['id'], $search))
- ->calculate();
-
- $nb_tasks = $paginator->getTotal();
- }
-
- $this->response->html($this->template->layout('project/search', array(
- 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
- 'values' => array(
- 'search' => $search,
- 'controller' => 'project',
- 'action' => 'search',
- 'project_id' => $project['id'],
- ),
- 'paginator' => $paginator,
- 'project' => $project,
- 'columns' => $this->board->getColumnsList($project['id']),
- 'categories' => $this->category->getList($project['id'], false),
- 'title' => t('Search in the project "%s"', $project['name']).($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '')
- )));
- }
-
- /**
- * List of completed tasks for a given project
- *
- * @access public
- */
- public function tasks()
- {
- $project = $this->getProject();
- $paginator = $this->paginator
- ->setUrl('project', 'tasks', array('project_id' => $project['id']))
- ->setMax(30)
- ->setOrder('tasks.id')
- ->setDirection('DESC')
- ->setQuery($this->taskFinder->getClosedTaskQuery($project['id']))
- ->calculate();
-
- $this->response->html($this->template->layout('project/tasks', array(
- 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
- 'project' => $project,
- 'columns' => $this->board->getColumnsList($project['id']),
- 'categories' => $this->category->getList($project['id'], false),
- 'paginator' => $paginator,
- 'title' => t('Completed tasks for "%s"', $project['name']).' ('.$paginator->getTotal().')'
- )));
- }
-
- /**
* Display a form to create a new project
*
* @access public
diff --git a/app/Controller/Projectinfo.php b/app/Controller/Projectinfo.php
new file mode 100644
index 00000000..a9498f43
--- /dev/null
+++ b/app/Controller/Projectinfo.php
@@ -0,0 +1,97 @@
+<?php
+
+namespace Controller;
+
+/**
+ * Project Info controller (ActivityStream + completed tasks)
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class Projectinfo extends Base
+{
+ /**
+ * Activity page for a project
+ *
+ * @access public
+ */
+ public function activity()
+ {
+ $project = $this->getProject();
+
+ $this->response->html($this->template->layout('projectinfo/activity', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
+ 'events' => $this->projectActivity->getProject($project['id']),
+ 'project' => $project,
+ 'title' => t('%s\'s activity', $project['name'])
+ )));
+ }
+
+ /**
+ * Task search for a given project
+ *
+ * @access public
+ */
+ public function search()
+ {
+ $project = $this->getProject();
+ $search = $this->request->getStringParam('search');
+ $nb_tasks = 0;
+
+ $paginator = $this->paginator
+ ->setUrl('projectinfo', 'search', array('search' => $search, 'project_id' => $project['id']))
+ ->setMax(30)
+ ->setOrder('tasks.id')
+ ->setDirection('DESC');
+
+ if ($search !== '') {
+
+ $paginator
+ ->setQuery($this->taskFinder->getSearchQuery($project['id'], $search))
+ ->calculate();
+
+ $nb_tasks = $paginator->getTotal();
+ }
+
+ $this->response->html($this->template->layout('projectinfo/search', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
+ 'values' => array(
+ 'search' => $search,
+ 'controller' => 'projectinfo',
+ 'action' => 'search',
+ 'project_id' => $project['id'],
+ ),
+ 'paginator' => $paginator,
+ 'project' => $project,
+ 'columns' => $this->board->getColumnsList($project['id']),
+ 'categories' => $this->category->getList($project['id'], false),
+ 'title' => t('Search in the project "%s"', $project['name']).($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '')
+ )));
+ }
+
+ /**
+ * List of completed tasks for a given project
+ *
+ * @access public
+ */
+ public function tasks()
+ {
+ $project = $this->getProject();
+ $paginator = $this->paginator
+ ->setUrl('projectinfo', 'tasks', array('project_id' => $project['id']))
+ ->setMax(30)
+ ->setOrder('tasks.id')
+ ->setDirection('DESC')
+ ->setQuery($this->taskFinder->getClosedTaskQuery($project['id']))
+ ->calculate();
+
+ $this->response->html($this->template->layout('projectinfo/tasks', array(
+ 'board_selector' => $this->projectPermission->getAllowedProjects($this->userSession->getId()),
+ 'project' => $project,
+ 'columns' => $this->board->getColumnsList($project['id']),
+ 'categories' => $this->category->getList($project['id'], false),
+ 'paginator' => $paginator,
+ 'title' => t('Completed tasks for "%s"', $project['name']).' ('.$paginator->getTotal().')'
+ )));
+ }
+}
diff --git a/app/Model/Acl.php b/app/Model/Acl.php
index 6d5e6d50..8cfc7120 100644
--- a/app/Model/Acl.php
+++ b/app/Model/Acl.php
@@ -37,7 +37,8 @@ class Acl extends Base
'board' => '*',
'comment' => '*',
'file' => '*',
- 'project' => array('show', 'tasks', 'search', 'activity'),
+ 'project' => array('show'),
+ 'projectinfo' => array('tasks', 'search', 'activity'),
'subtask' => '*',
'task' => '*',
'tasklink' => '*',
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index c3a36bdf..de8d0de9 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -4,7 +4,24 @@
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-table fa-fw"></i><?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
+ <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-table fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', '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>
<section class="sidebar-container" id="analytic-section">
@@ -12,7 +29,7 @@
<?= $this->render('analytic/sidebar', array('project' => $project)) ?>
<div class="sidebar-content">
- <?= $analytic_content_for_layout ?>
+ <?= $content_for_sublayout ?>
</div>
</section>
</section> \ No newline at end of file
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index 0617fb47..bf2adfac 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -21,41 +21,7 @@
<i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling"><?= t('Horizontal scrolling') ?></a>
</span>
</li>
- <li>
- <i class="fa fa-search fa-fw"></i>
- <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-dashboard fa-fw"></i>
- <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-calendar fa-fw"></i>
- <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
- </li>
- <?php if ($project['is_public']): ?>
- <li>
- <i class="fa fa-share-alt fa-fw"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
- </li>
- <?php endif ?>
- <?php if ($this->user->isManager($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-cog fa-fw"></i>
- <?= $this->url->link(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
- </li>
- <?php endif ?>
+ <?= $this->render('project/dropdown', array('project' => $project)) ?>
</ul>
</span>
</span>
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
index 3275a66a..92561188 100644
--- a/app/Template/budget/breakdown.php
+++ b/app/Template/budget/breakdown.php
@@ -1,9 +1,5 @@
<div class="page-header">
- <h2><?= t('Budget') ?></h2>
- <ul>
- <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
- </ul>
+ <h2><?= t('Cost breakdown') ?></h2>
</div>
<?php if ($paginator->isEmpty()): ?>
diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php
index d64bbc48..a563796d 100644
--- a/app/Template/budget/create.php
+++ b/app/Template/budget/create.php
@@ -1,9 +1,5 @@
<div class="page-header">
- <h2><?= t('Budget') ?></h2>
- <ul>
- <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
- </ul>
+ <h2><?= t('Budget lines') ?></h2>
</div>
<?php if (! empty($lines)): ?>
diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php
index d9fefc67..4fe8ac69 100644
--- a/app/Template/budget/index.php
+++ b/app/Template/budget/index.php
@@ -2,11 +2,7 @@
<?= $this->asset->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
<div class="page-header">
- <h2><?= t('Budget') ?></h2>
- <ul>
- <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
- </ul>
+ <h2><?= t('Budget overview') ?></h2>
</div>
<?php if (! empty($daily_budget)): ?>
@@ -32,4 +28,6 @@
</tr>
<?php endforeach ?>
</table>
+<?php else: ?>
+ <p class="alert"><?= t('There is not enough data to show something.') ?></p>
<?php endif ?>
diff --git a/app/Template/budget/sidebar.php b/app/Template/budget/sidebar.php
new file mode 100644
index 00000000..7740cf00
--- /dev/null
+++ b/app/Template/budget/sidebar.php
@@ -0,0 +1,14 @@
+<div class="sidebar">
+ <h2><?= t('Budget') ?></h2>
+ <ul>
+ <li>
+ <?= $this->url->link(t('Budget overview'), 'budget', 'index', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?>
+ </li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php
index 3fe97b65..cf2a20ec 100644
--- a/app/Template/calendar/show.php
+++ b/app/Template/calendar/show.php
@@ -2,20 +2,22 @@
<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-table fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
- <i class="fa fa-search fa-fw"></i>
- <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-dashboard fa-fw"></i>
- <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <i class="fa fa-folder fa-fw"></i>
+ <?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
</ul>
</div>
diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php
new file mode 100644
index 00000000..f93dcafb
--- /dev/null
+++ b/app/Template/export/sidebar.php
@@ -0,0 +1,17 @@
+<div class="sidebar">
+ <h2><?= t('Exports') ?></h2>
+ <ul>
+ <li>
+ <?= $this->url->link(t('Tasks'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Subtasks'), 'export', 'subtasks', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Task transitions'), 'export', 'transitions', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?>
+ </li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php
index d22b96a4..4aad2641 100644
--- a/app/Template/export/subtasks.php
+++ b/app/Template/export/subtasks.php
@@ -4,6 +4,8 @@
</h2>
</div>
+<p class="alert alert-info"><?= t('This report contains all subtasks information for the given date range.') ?></p>
+
<form method="get" action="?" autocomplete="off">
<?= $this->form->hidden('controller', $values) ?>
diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php
index 5c5e2172..c74c8f98 100644
--- a/app/Template/export/tasks.php
+++ b/app/Template/export/tasks.php
@@ -4,6 +4,8 @@
</h2>
</div>
+<p class="alert alert-info"><?= t('This report contains all tasks information for the given date range.') ?></p>
+
<form method="get" action="?" autocomplete="off">
<?= $this->form->hidden('controller', $values) ?>
diff --git a/app/Template/project/activity.php b/app/Template/project/activity.php
deleted file mode 100644
index 1c5dcb75..00000000
--- a/app/Template/project/activity.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li>
- <i class="fa fa-table 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('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-search fa-fw"></i>
- <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
- </li>
- <?php if ($project['is_public']): ?>
- <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
- <?php endif ?>
- </ul>
- </div>
- <section>
- <?= $this->render('event/events', array('events' => $events)) ?>
- </section>
-</section> \ No newline at end of file
diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php
new file mode 100644
index 00000000..2e2650a7
--- /dev/null
+++ b/app/Template/project/dropdown.php
@@ -0,0 +1,41 @@
+<li>
+ <i class="fa fa-search fa-fw"></i>
+ <?= $this->url->link(t('Search'), 'projectinfo', 'search', array('project_id' => $project['id'])) ?>
+</li>
+<li>
+ <i class="fa fa-check-square-o fa-fw"></i>
+ <?= $this->url->link(t('Completed tasks'), 'projectinfo', 'tasks', array('project_id' => $project['id'])) ?>
+</li>
+<li>
+ <i class="fa fa-dashboard fa-fw"></i>
+ <?= $this->url->link(t('Activity'), 'projectinfo', 'activity', array('project_id' => $project['id'])) ?>
+</li>
+<li>
+ <i class="fa fa-calendar fa-fw"></i>
+ <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+</li>
+
+<?php if ($project['is_public']): ?>
+<li>
+ <i class="fa fa-share-alt fa-fw"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
+</li>
+<?php endif ?>
+
+<?php if ($this->user->isManager($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>
+<?php endif ?>
diff --git a/app/Template/project/layout.php b/app/Template/project/layout.php
index f5409500..7bb3d478 100644
--- a/app/Template/project/layout.php
+++ b/app/Template/project/layout.php
@@ -2,6 +2,16 @@
<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-table fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
@@ -11,9 +21,9 @@
</li>
</ul>
</div>
- <section class="sidebar-container" id="project-section">
+ <section class="sidebar-container">
- <?= $this->render('project/sidebar', array('project' => $project)) ?>
+ <?= $this->render($sidebar_template, array('project' => $project)) ?>
<div class="sidebar-content">
<?= $project_content_for_layout ?>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index 9ffbd5bc..4869d8a4 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -11,6 +11,7 @@
<?php if ($project['is_public']): ?>
<li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li>
<li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li>
<?php else: ?>
<li><?= t('Public access disabled') ?></li>
<?php endif ?>
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index 5c7ea715..a58c4604 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -19,14 +19,14 @@
<?= $this->url->link(t('Edit board'), 'column', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->url->link(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->url->link(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Categories'), 'category', 'index', array('project_id' => $project['id'])) ?>
</li>
<?php if ($this->user->isAdmin() || $project['is_private'] == 0): ?>
<li>
- <?= $this->url->link(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Users'), 'project', 'users', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
@@ -36,9 +36,6 @@
<?= $this->url->link(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
- </li>
- <li>
<?php if ($project['is_active']): ?>
<?= $this->url->link(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?>
<?php else: ?>
@@ -52,22 +49,4 @@
<?php endif ?>
<?php endif ?>
</ul>
-
- <?php if ($this->user->isManager($project['id'])): ?>
- <h2><?= t('Exports') ?></h2>
- <ul>
- <li>
- <?= $this->url->link(t('Tasks'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <?= $this->url->link(t('Subtasks'), 'export', 'subtasks', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <?= $this->url->link(t('Task transitions'), 'export', 'transitions', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <?= $this->url->link(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?>
- </li>
- </ul>
- <?php endif ?>
</div>
diff --git a/app/Template/project/tasks.php b/app/Template/project/tasks.php
deleted file mode 100644
index 06f28061..00000000
--- a/app/Template/project/tasks.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li>
- <i class="fa fa-table 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('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-search fa-fw"></i>
- <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <i class="fa fa-dashboard fa-fw"></i>
- <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
- </li>
- </ul>
- </div>
- <section>
- <?php if ($paginator->isEmpty()): ?>
- <p class="alert"><?= t('No task') ?></p>
- <?php else: ?>
- <?= $this->render('task/table', array(
- 'paginator' => $paginator,
- 'categories' => $categories,
- 'columns' => $columns,
- )) ?>
- <?php endif ?>
- </section>
-</section> \ No newline at end of file
diff --git a/app/Template/projectinfo/activity.php b/app/Template/projectinfo/activity.php
new file mode 100644
index 00000000..528cdbee
--- /dev/null
+++ b/app/Template/projectinfo/activity.php
@@ -0,0 +1,30 @@
+<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-table fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', '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>
+ <?php if ($project['is_public']): ?>
+ <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'project', 'feed', 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 ?>
+ </ul>
+ </div>
+
+ <?= $this->render('event/events', array('events' => $events)) ?>
+</section> \ No newline at end of file
diff --git a/app/Template/project/search.php b/app/Template/projectinfo/search.php
index a8e387c6..4b7c8f70 100644
--- a/app/Template/project/search.php
+++ b/app/Template/projectinfo/search.php
@@ -2,24 +2,26 @@
<div class="page-header">
<ul>
<li>
- <i class="fa fa-table 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('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+ <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-check-square-o fa-fw"></i>
- <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <i class="fa fa-table fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
- <i class="fa fa-dashboard fa-fw"></i>
- <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <i class="fa fa-folder fa-fw"></i>
+ <?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
</ul>
</div>
- <section>
+
<form method="get" action="?" autocomplete="off">
<?= $this->form->hidden('controller', $values) ?>
<?= $this->form->hidden('action', $values) ?>
@@ -38,5 +40,4 @@
)) ?>
<?php endif ?>
- </section>
</section> \ No newline at end of file
diff --git a/app/Template/projectinfo/tasks.php b/app/Template/projectinfo/tasks.php
new file mode 100644
index 00000000..41884783
--- /dev/null
+++ b/app/Template/projectinfo/tasks.php
@@ -0,0 +1,33 @@
+<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-table fa-fw"></i>
+ <?= $this->url->link(t('Back to the board'), 'board', '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>
+ <?php if ($paginator->isEmpty()): ?>
+ <p class="alert"><?= t('There is no completed tasks at the moment.') ?></p>
+ <?php else: ?>
+ <?= $this->render('task/table', array(
+ 'paginator' => $paginator,
+ 'categories' => $categories,
+ 'columns' => $columns,
+ )) ?>
+ <?php endif ?>
+</section> \ No newline at end of file
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
index 7bfda772..5a14fb39 100644
--- a/app/Template/task/layout.php
+++ b/app/Template/task/layout.php
@@ -5,9 +5,15 @@
<i class="fa fa-table fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, 'swimlane-'.$task['swimlane_id']) ?>
</li>
+ <?php if ($this->user->isManager($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 ?>
<li>
<i class="fa fa-calendar fa-fw"></i>
- <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('Project calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
</li>
</ul>
</div>