diff --git a/app/Controller/Project.php b/app/Controller/Project.php index cac5e0b8e..221393234 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -64,7 +64,7 @@ class Project extends Base * * @access public */ - public function export() + public function exportTasks() { $project = $this->getProjectManagement(); $from = $this->request->getStringParam('from'); @@ -72,14 +72,14 @@ class Project extends Base if ($from && $to) { $data = $this->taskExport->export($project['id'], $from, $to); - $this->response->forceDownload('Export_'.date('Y_m_d_H_i_S').'.csv'); + $this->response->forceDownload('Tasks_'.date('Y_m_d_H_i').'.csv'); $this->response->csv($data); } - $this->response->html($this->projectLayout('project_export', array( + $this->response->html($this->projectLayout('project/export_tasks', array( 'values' => array( 'controller' => 'project', - 'action' => 'export', + 'action' => 'exportTasks', 'project_id' => $project['id'], 'from' => $from, 'to' => $to, @@ -92,6 +92,39 @@ class Project extends Base ))); } + /** + * Daily project summary export + * + * @access public + */ + public function exportDailyProjectSummary() + { + $project = $this->getProjectManagement(); + $from = $this->request->getStringParam('from'); + $to = $this->request->getStringParam('to'); + + if ($from && $to) { + $data = $this->ProjectDailySummary->getAggregatedMetrics($project['id'], $from, $to); + $this->response->forceDownload('Daily_Summary_'.date('Y_m_d_H_i').'.csv'); + $this->response->csv($data); + } + + $this->response->html($this->projectLayout('project/export_daily_summary', array( + 'values' => array( + 'controller' => 'project', + 'action' => 'exportDailyProjectSummary', + 'project_id' => $project['id'], + 'from' => $from, + 'to' => $to, + ), + 'errors' => array(), + 'date_format' => $this->config->get('application_date_format'), + 'date_formats' => $this->dateParser->getAvailableFormats(), + 'project' => $project, + 'title' => t('Daily project summary export') + ))); + } + /** * Public access management * diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 34533e941..5c2002ec5 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index bce2c233f..b304fc18b 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index e26be0a1a..5740279cf 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 7af506a5b..9565178fa 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index ace478e2a..b67353221 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -594,4 +594,9 @@ return array( 'Unable to create this task.' => 'Impossible de créer cette tâche', 'Cumulative flow diagram' => 'Diagramme de flux cumulé', 'Cumulative flow diagram for "%s"' => 'Diagramme de flux cumulé pour « %s »', + 'Daily project summary' => 'Résumé journalier du projet', + 'Daily project summary export' => 'Export du résumé journalier du projet', + 'Daily project summary export for "%s"' => 'Export du résumé quotidien du projet pour « %s »', + 'Exports' => 'Exports', + 'This export contains the number of tasks per column grouped per day.' => 'Cet export contient le nombre de tâches par colonne groupé par jour.', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 6630f7f75..9a0fd02ee 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 0312a4026..1885d7796 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index f48f0615a..34ea087fa 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 647348b91..9aa52bc3c 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 1d220902d..b584b7599 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index ca79904a9..e1997f6c1 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index f5423c8e0..a5c7a251e 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 1da74b13a..d176b081a 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -594,4 +594,9 @@ return array( // 'Unable to create this task.' => '', // 'Cumulative flow diagram' => '', // 'Cumulative flow diagram for "%s"' => '', + // 'Daily project summary' => '', + // 'Daily project summary export' => '', + // 'Daily project summary export for "%s"' => '', + // 'Exports' => '', + // 'This export contains the number of tasks per column grouped per day.' => '', ); diff --git a/app/Model/Acl.php b/app/Model/Acl.php index 25e988500..4a161714a 100644 --- a/app/Model/Acl.php +++ b/app/Model/Acl.php @@ -33,7 +33,7 @@ class Acl extends Base private $user_actions = array( 'app' => array('index'), 'board' => array('index', 'show', 'save', 'check', 'changeassignee', 'updateassignee', 'changecategory', 'updatecategory', 'movecolumn', 'edit', 'update', 'add', 'confirm', 'remove'), - 'project' => array('index', 'show', 'export', 'share', 'edit', 'update', 'users', 'remove', 'duplicate', 'disable', 'enable', 'activity', 'search', 'tasks', 'create', 'save'), + 'project' => array('index', 'show', 'exporttasks', 'exportdaily', 'share', 'edit', 'update', 'users', 'remove', 'duplicate', 'disable', 'enable', 'activity', 'search', 'tasks', 'create', 'save'), 'user' => array('edit', 'forbidden', 'logout', 'show', 'external', 'unlinkgoogle', 'unlinkgithub', 'sessions', 'removesession', 'last', 'notifications', 'password'), 'comment' => array('create', 'save', 'confirm', 'remove', 'update', 'edit', 'forbidden'), 'file' => array('create', 'save', 'download', 'confirm', 'remove', 'open', 'image'), @@ -41,7 +41,7 @@ class Acl extends Base 'task' => array('show', 'create', 'save', 'edit', 'update', 'close', 'open', 'duplicate', 'remove', 'description', 'move', 'copy', 'time'), 'category' => array('index', 'save', 'edit', 'update', 'confirm', 'remove'), 'action' => array('index', 'event', 'params', 'create', 'confirm', 'remove'), - 'analytic' => array('tasks', 'users'), + 'analytic' => array('tasks', 'users', 'cfd'), ); /** diff --git a/app/Template/project/export_daily_summary.php b/app/Template/project/export_daily_summary.php new file mode 100644 index 000000000..763cd81c6 --- /dev/null +++ b/app/Template/project/export_daily_summary.php @@ -0,0 +1,26 @@ + + +

+ +
+ + + + + + +
+ + + + +
+ +
+ +
+
\ No newline at end of file diff --git a/app/Template/project_export.php b/app/Template/project/export_tasks.php similarity index 100% rename from app/Template/project_export.php rename to app/Template/project/export_tasks.php diff --git a/app/Template/project_sidebar.php b/app/Template/project_sidebar.php index 7d6e0bfb1..bd56edaf1 100644 --- a/app/Template/project_sidebar.php +++ b/app/Template/project_sidebar.php @@ -6,9 +6,6 @@ -
  • - -
  • @@ -44,4 +41,16 @@ + + +

    +