diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/gantt/project.php | 4 | ||||
-rw-r--r-- | app/Template/gantt/projects.php | 36 | ||||
-rw-r--r-- | app/Template/project/index.php | 3 | ||||
-rw-r--r-- | app/Template/project/show.php | 8 | ||||
-rw-r--r-- | app/Template/project_user/layout.php | 8 |
5 files changed, 55 insertions, 4 deletions
diff --git a/app/Template/gantt/project.php b/app/Template/gantt/project.php index ec45f7f6..7ad859c7 100644 --- a/app/Template/gantt/project.php +++ b/app/Template/gantt/project.php @@ -35,8 +35,8 @@ <?php if (! empty($tasks)): ?> <div id="gantt-chart" - data-tasks='<?= json_encode($tasks, JSON_HEX_APOS) ?>' - data-save-url="<?= $this->url->href('gantt', 'saveDate', array('project_id' => $project['id'])) ?>" + data-records='<?= json_encode($tasks, JSON_HEX_APOS) ?>' + data-save-url="<?= $this->url->href('gantt', 'saveTaskDate', array('project_id' => $project['id'])) ?>" data-label-start-date="<?= t('Start date:') ?>" data-label-end-date="<?= t('Due date:') ?>" data-label-assignee="<?= t('Assignee:') ?>" diff --git a/app/Template/gantt/projects.php b/app/Template/gantt/projects.php new file mode 100644 index 00000000..50e244a5 --- /dev/null +++ b/app/Template/gantt/projects.php @@ -0,0 +1,36 @@ +<section id="main"> + <div class="page-header"> + <ul> + <?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?> + <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li> + <?php endif ?> + <li> + <i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?> + </li> + <li> + <i class="fa fa-folder fa-fw"></i><?= $this->url->link(t('Projects list'), 'project', 'index') ?> + </li> + <?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?> + <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'projectuser', 'managers') ?></li> + <?php endif ?> + </ul> + </div> + <section> + <?php if (empty($projects)): ?> + <p class="alert"><?= t('No project') ?></p> + <?php else: ?> + <div + id="gantt-chart" + data-records='<?= json_encode($projects, JSON_HEX_APOS) ?>' + data-save-url="<?= $this->url->href('gantt', 'saveProjectDate') ?>" + data-label-managers="<?= t('Project managers') ?>" + data-label-members="<?= t('Project members') ?>" + data-label-gantt-link="<?= t('Gantt chart for this project') ?>" + data-label-board-link="<?= t('Project board') ?>" + data-label-start-date="<?= t('Start date:') ?>" + data-label-end-date="<?= t('End date:') ?>" + data-label-not-defined="<?= t('There is no start date or end date for this project.') ?>" + ></div> + <?php endif ?> + </section> +</section> diff --git a/app/Template/project/index.php b/app/Template/project/index.php index f24a8c4a..5ca6e6b5 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -6,7 +6,8 @@ <?php endif ?> <li><i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> <?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?> - <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('Users overview'), 'projectuser', 'managers') ?></li> + <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'projectuser', 'managers') ?></li> + <li><i class="fa fa-sliders fa-fw"></i><?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?></li> <?php endif ?> </ul> </div> diff --git a/app/Template/project/show.php b/app/Template/project/show.php index d8d6de8d..5a65a26e 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -20,6 +20,14 @@ <li><?= dt('Last modified on %B %e, %Y at %k:%M %p', $project['last_modified']) ?></li> <?php endif ?> + <?php if ($project['start_date']): ?> + <li><?= t('Start date: %s', $project['start_date']) ?></li> + <?php endif ?> + + <?php if ($project['end_date']): ?> + <li><?= t('End date: %s', $project['end_date']) ?></li> + <?php endif ?> + <?php if ($stats['nb_tasks'] > 0): ?> <?php if ($stats['nb_active_tasks'] > 0): ?> diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php index a68fc579..4cf732d6 100644 --- a/app/Template/project_user/layout.php +++ b/app/Template/project_user/layout.php @@ -10,8 +10,14 @@ </li> <li> <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('All projects'), 'project', 'index') ?> + <?= $this->url->link(t('Projects list'), 'project', 'index') ?> </li> + <?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?> + <li> + <i class="fa fa-sliders fa-fw"></i> + <?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?> + </li> + <?php endif ?> </ul> </div> <section class="sidebar-container"> |