Add daily project summary export

This commit is contained in:
Frédéric Guillot
2014-11-16 21:36:46 -05:00
parent 1e466a66db
commit d4ae2f135d
20 changed files with 144 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
<div class="page-header">
<h2>
<?= t('Daily project summary export for "%s"', $project['name']) ?>
</h2>
</div>
<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">
<?= Helper\form_hidden('controller', $values) ?>
<?= Helper\form_hidden('action', $values) ?>
<?= Helper\form_hidden('project_id', $values) ?>
<?= Helper\form_label(t('Start Date'), 'from') ?>
<?= Helper\form_text('from', $values, $errors, array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/>
<?= Helper\form_label(t('End Date'), 'to') ?>
<?= Helper\form_text('to', $values, $errors, array('required', 'placeholder="'.Helper\in_list($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>
<div class="form-actions">
<input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
</div>
</form>

View File

@@ -6,9 +6,6 @@
</li>
<?php if (Helper\is_admin() || $project['is_private']): ?>
<li>
<a href="?controller=project&amp;action=export&amp;project_id=<?= $project['id'] ?>"><?= t('Tasks Export') ?></a>
</li>
<li>
<a href="?controller=project&amp;action=share&amp;project_id=<?= $project['id'] ?>"><?= t('Public access') ?></a>
</li>
@@ -44,4 +41,16 @@
</li>
<?php endif ?>
</ul>
<?php if (Helper\is_admin() || $project['is_private']): ?>
<h2><?= t('Exports') ?></h2>
<ul>
<li>
<?= Helper\a(t('Tasks'), 'project', 'exportTasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<?= Helper\a(t('Daily project summary'), 'project', 'exportDailyProjectSummary', array('project_id' => $project['id'])) ?>
</li>
</li>
<?php endif ?>
</div>