diff options
Diffstat (limited to 'app/Template/export')
-rw-r--r-- | app/Template/export/header.php | 17 | ||||
-rw-r--r-- | app/Template/export/sidebar.php | 18 | ||||
-rw-r--r-- | app/Template/export/subtasks.php | 26 | ||||
-rw-r--r-- | app/Template/export/summary.php | 26 | ||||
-rw-r--r-- | app/Template/export/tasks.php | 26 | ||||
-rw-r--r-- | app/Template/export/transitions.php | 26 |
6 files changed, 53 insertions, 86 deletions
diff --git a/app/Template/export/header.php b/app/Template/export/header.php new file mode 100644 index 00000000..35591352 --- /dev/null +++ b/app/Template/export/header.php @@ -0,0 +1,17 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= $title ?></h2> + <ul> + <li <?= $this->app->checkMenuSelection('ExportController', 'tasks') ?>> + <?= $this->modal->replaceLink(t('Tasks'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'subtasks') ?>> + <?= $this->modal->replaceLink(t('Subtasks'), 'ExportController', 'subtasks', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'transitions') ?>> + <?= $this->modal->replaceLink(t('Task transitions'), 'ExportController', 'transitions', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'summary') ?>> + <?= $this->modal->replaceLink(t('Daily project summary'), 'ExportController', 'summary', array('project_id' => $project['id'])) ?> + </li> + </ul> +</div> diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php deleted file mode 100644 index 55fbaeef..00000000 --- a/app/Template/export/sidebar.php +++ /dev/null @@ -1,18 +0,0 @@ -<div class="sidebar"> - <h2><?= t('Exports') ?></h2> - <ul> - <li <?= $this->app->checkMenuSelection('ExportController', 'tasks') ?>> - <?= $this->url->link(t('Tasks'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'subtasks') ?>> - <?= $this->url->link(t('Subtasks'), 'ExportController', 'subtasks', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'transitions') ?>> - <?= $this->url->link(t('Task transitions'), 'ExportController', 'transitions', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'summary') ?>> - <?= $this->url->link(t('Daily project summary'), 'ExportController', 'summary', array('project_id' => $project['id'])) ?> - </li> - <?= $this->hook->render('template:export:sidebar') ?> - </ul> -</div> diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php index a82cb3d1..0e47772b 100644 --- a/app/Template/export/subtasks.php +++ b/app/Template/export/subtasks.php @@ -1,24 +1,16 @@ -<div class="page-header"> - <h2><?= t('Subtasks exportation for "%s"', $project['name']) ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <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) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'subtasks', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->form->label(t('Start Date'), 'from') ?> - <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <?= $this->form->label(t('End Date'), 'to') ?> - <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'subtasks', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/export/summary.php b/app/Template/export/summary.php index 60aa306f..7dc7482f 100644 --- a/app/Template/export/summary.php +++ b/app/Template/export/summary.php @@ -1,24 +1,16 @@ -<div class="page-header"> - <h2><?= t('Daily project summary export for "%s"', $project['name']) ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This export contains the number of tasks per column grouped per day.') ?></p> -<form method="get" action="?" autocomplete="off"> - - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'summary', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->form->label(t('Start Date'), 'from') ?> - <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <?= $this->form->label(t('End Date'), 'to') ?> - <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'summary', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php index bed8ab90..232ff8eb 100644 --- a/app/Template/export/tasks.php +++ b/app/Template/export/tasks.php @@ -1,24 +1,16 @@ -<div class="page-header"> - <h2><?= t('Tasks exportation for "%s"', $project['name']) ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <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) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'tasks', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->form->label(t('Start Date'), 'from') ?> - <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <?= $this->form->label(t('End Date'), 'to') ?> - <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'tasks', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> -</form>
\ No newline at end of file +</form> diff --git a/app/Template/export/transitions.php b/app/Template/export/transitions.php index 093930a3..4f3749b8 100644 --- a/app/Template/export/transitions.php +++ b/app/Template/export/transitions.php @@ -1,24 +1,16 @@ -<div class="page-header"> - <h2><?= t('Task transitions export') ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This report contains all column moves for each task with the date, the user and the time spent for each transition.') ?></p> -<form method="get" action="?" autocomplete="off"> - - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'transitions', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - - <?= $this->form->label(t('Start Date'), 'from') ?> - <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <?= $this->form->label(t('End Date'), 'to') ?> - <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'transitions', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> -</form>
\ No newline at end of file +</form> |