diff options
Diffstat (limited to 'app/Template/project_view')
-rw-r--r-- | app/Template/project_view/duplicate.php | 28 | ||||
-rw-r--r-- | app/Template/project_view/integrations.php | 15 | ||||
-rw-r--r-- | app/Template/project_view/notifications.php | 20 | ||||
-rw-r--r-- | app/Template/project_view/share.php | 18 | ||||
-rw-r--r-- | app/Template/project_view/show.php | 85 |
5 files changed, 166 insertions, 0 deletions
diff --git a/app/Template/project_view/duplicate.php b/app/Template/project_view/duplicate.php new file mode 100644 index 00000000..41ae39df --- /dev/null +++ b/app/Template/project_view/duplicate.php @@ -0,0 +1,28 @@ +<div class="page-header"> + <h2><?= t('Clone this project') ?></h2> +</div> + +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Which parts of the project do you want to duplicate?') ?> + </p> + <form method="post" action="<?= $this->url->href('ProjectViewController', 'doDuplication', array('project_id' => $project['id'], 'duplicate' => 'yes')) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <?php if ($project['is_private'] == 0): ?> + <?= $this->form->checkbox('projectPermission', t('Permissions'), 1, true) ?> + <?php endif ?> + + <?= $this->form->checkbox('category', t('Categories'), 1, true) ?> + <?= $this->form->checkbox('action', t('Actions'), 1, true) ?> + <?= $this->form->checkbox('swimlane', t('Swimlanes'), 1, false) ?> + <?= $this->form->checkbox('task', t('Tasks'), 1, false) ?> + <?= $this->form->checkbox('projectMetadata', t('Metadata'), 1, false) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-red"><?= t('Duplicate') ?></button> + <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> + </div> + </form> +</div> diff --git a/app/Template/project_view/integrations.php b/app/Template/project_view/integrations.php new file mode 100644 index 00000000..f8bff7ea --- /dev/null +++ b/app/Template/project_view/integrations.php @@ -0,0 +1,15 @@ +<div class="page-header"> + <h2><?= t('Integration with third-party services') ?></h2> +</div> + +<form method="post" action="<?= $this->url->href('ProjectViewController', 'updateIntegrations', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <?php $integrations = $this->hook->render('template:project:integrations', array('project' => $project, 'values' => $values, 'webhook_token' => $webhook_token)) ?> + + <?php if (empty($integrations)): ?> + <p class="alert"><?= t('There is no integration registered at the moment.') ?></p> + <?php else: ?> + <?= $integrations ?> + <?php endif ?> +</form> diff --git a/app/Template/project_view/notifications.php b/app/Template/project_view/notifications.php new file mode 100644 index 00000000..29cc088c --- /dev/null +++ b/app/Template/project_view/notifications.php @@ -0,0 +1,20 @@ +<div class="page-header"> + <h2><?= t('Notifications') ?></h2> +</div> +<?php if (empty($types)): ?> + <p class="alert"><?= t('No plugin has registered a project notification method. You can still configure individual notifications in your user profile.') ?></p> +<?php else: ?> + <form method="post" action="<?= $this->url->href('ProjectViewController', 'updateNotifications', array('project_id' => $project['id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <h4><?= t('Notification methods:') ?></h4> + <?= $this->form->checkboxes('notification_types', $types, $notifications) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> + </div> + </form> +<?php endif ?> diff --git a/app/Template/project_view/share.php b/app/Template/project_view/share.php new file mode 100644 index 00000000..6161faa9 --- /dev/null +++ b/app/Template/project_view/share.php @@ -0,0 +1,18 @@ +<div class="page-header"> + <h2><?= t('Public access') ?></h2> +</div> + +<?php if ($project['is_public']): ?> + + <div class="listing"> + <ul class="no-bullet"> + <li><strong><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> + </ul> + </div> + + <?= $this->url->link(t('Disable public access'), 'ProjectViewController', 'updateSharing', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> +<?php else: ?> + <?= $this->url->link(t('Enable public access'), 'ProjectViewController', 'updateSharing', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?> +<?php endif ?> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php new file mode 100644 index 00000000..4aba4919 --- /dev/null +++ b/app/Template/project_view/show.php @@ -0,0 +1,85 @@ +<div class="page-header"> + <h2><?= t('Summary') ?></h2> +</div> +<ul class="listing"> + <li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li> + + <?php if ($project['owner_id'] > 0): ?> + <li><?= t('Project owner: ') ?><strong><?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li> + <?php endif ?> + + <?php if ($project['is_private']): ?> + <li><i class="fa fa-lock"></i> <?= t('This project is private') ?></li> + <?php endif ?> + + <?php if ($project['is_public']): ?> + <li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'feed', 'project', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token'])) ?></li> + <?php else: ?> + <li><?= t('Public access disabled') ?></li> + <?php endif ?> + + <?php if ($project['last_modified']): ?> + <li><?= t('Modified:').' '.$this->dt->datetime($project['last_modified']) ?></li> + <?php endif ?> + + <?php if ($project['start_date']): ?> + <li><?= t('Start date: ').$this->dt->date($project['start_date']) ?></li> + <?php endif ?> + + <?php if ($project['end_date']): ?> + <li><?= t('End date: ').$this->dt->date($project['end_date']) ?></li> + <?php endif ?> + + <?php if ($stats['nb_tasks'] > 0): ?> + + <?php if ($stats['nb_active_tasks'] > 0): ?> + <li><?= $this->url->link(t('%d tasks on the board', $stats['nb_active_tasks']), 'board', 'show', array('project_id' => $project['id'], 'search' => 'status:open')) ?></li> + <?php endif ?> + + <?php if ($stats['nb_inactive_tasks'] > 0): ?> + <li><?= $this->url->link(t('%d closed tasks', $stats['nb_inactive_tasks']), 'listing', 'show', array('project_id' => $project['id'], 'search' => 'status:closed')) ?></li> + <?php endif ?> + + <li><?= t('%d tasks in total', $stats['nb_tasks']) ?></li> + + <?php else: ?> + <li><?= t('No task for this project') ?></li> + <?php endif ?> +</ul> + +<div class="page-header"> + <h2><?= t('Board') ?></h2> +</div> +<table class="table-stripped"> + <tr> + <th class="column-60"><?= t('Column') ?></th> + <th class="column-20"><?= t('Task limit') ?></th> + <th class="column-20"><?= t('Active tasks') ?></th> + </tr> + <?php foreach ($stats['columns'] as $column): ?> + <tr> + <td> + <?= $this->text->e($column['title']) ?> + <?php if (! empty($column['description'])): ?> + <span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>"> + <i class="fa fa-info-circle"></i> + </span> + <?php endif ?> + </td> + <td><?= $column['task_limit'] ?: '∞' ?></td> + <td><?= $column['nb_active_tasks'] ?></td> + </tr> + <?php endforeach ?> +</table> + +<?php if (! empty($project['description'])): ?> + <div class="page-header"> + <h2><?= t('Description') ?></h2> + </div> + + <article class="markdown"> + <?= $this->text->markdown($project['description']) ?> + </article> +<?php endif ?> |