diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php
index e7578da9c..f31870e0a 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 57a64a3a2..fcd07b992 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'].' > '.$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 45dad7fbb..a2f7e0dbb 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 b8f932c1e..117fb5ee0 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 63c20cc4d..ba039b7d9 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
@@ -415,91 +415,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
*
diff --git a/app/Controller/Projectinfo.php b/app/Controller/Projectinfo.php
new file mode 100644
index 000000000..a9498f434
--- /dev/null
+++ b/app/Controller/Projectinfo.php
@@ -0,0 +1,97 @@
+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 6d5e6d50c..8cfc71209 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 c3a36bdfa..de8d0de9e 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -4,7 +4,24 @@
\ No newline at end of file
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index 0617fb47a..bf2adfac5 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -21,41 +21,7 @@
= t('Horizontal scrolling') ?>
-
-
- = $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
-
-
- user->isManager($project['id'])): ?>
-
-
- = $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
-
-
-
- = $this->url->link(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
-
-
+ = $this->render('project/dropdown', array('project' => $project)) ?>
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
index 3275a66a2..92561188a 100644
--- a/app/Template/budget/breakdown.php
+++ b/app/Template/budget/breakdown.php
@@ -1,9 +1,5 @@
isEmpty()): ?>
diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php
index d64bbc48c..a563796d9 100644
--- a/app/Template/budget/create.php
+++ b/app/Template/budget/create.php
@@ -1,9 +1,5 @@
diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php
index d9fefc67d..4fe8ac690 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') ?>
@@ -32,4 +28,6 @@
+
+ = t('There is not enough data to show something.') ?>
diff --git a/app/Template/budget/sidebar.php b/app/Template/budget/sidebar.php
new file mode 100644
index 000000000..7740cf003
--- /dev/null
+++ b/app/Template/budget/sidebar.php
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php
index 3fe97b651..cf2a20ec9 100644
--- a/app/Template/calendar/show.php
+++ b/app/Template/calendar/show.php
@@ -1,21 +1,23 @@
diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php
new file mode 100644
index 000000000..f93dcafb3
--- /dev/null
+++ b/app/Template/export/sidebar.php
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php
index d22b96a4f..4aad2641e 100644
--- a/app/Template/export/subtasks.php
+++ b/app/Template/export/subtasks.php
@@ -4,6 +4,8 @@
+= t('This report contains all subtasks information for the given date range.') ?>
+