diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-24 18:15:21 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-24 18:15:21 -0500 |
commit | abcfd02067b348e1c86f61e7545b93f87ea89569 (patch) | |
tree | 88af1382f729659dd8bcdb1669653da827c19d29 /app/Template/project_edit | |
parent | 4fa38bf417dd7f1673f63641460092bd046d57b7 (diff) |
Split project edition into multiple pages
Diffstat (limited to 'app/Template/project_edit')
-rw-r--r-- | app/Template/project_edit/dates.php | 25 | ||||
-rw-r--r-- | app/Template/project_edit/description.php | 36 | ||||
-rw-r--r-- | app/Template/project_edit/general.php | 35 |
3 files changed, 96 insertions, 0 deletions
diff --git a/app/Template/project_edit/dates.php b/app/Template/project_edit/dates.php new file mode 100644 index 00000000..d3f4bad8 --- /dev/null +++ b/app/Template/project_edit/dates.php @@ -0,0 +1,25 @@ +<div class="page-header"> + <h2><?= t('Edit project') ?></h2> + <ul> + <li ><?= $this->url->link(t('General'), 'ProjectEdit', 'edit', array('project_id' => $project['id'])) ?></li> + <li class="active"><?= $this->url->link(t('Dates'), 'ProjectEdit', 'dates', array('project_id' => $project['id'])) ?></li> + <li><?= $this->url->link(t('Description'), 'ProjectEdit', 'description', array('project_id' => $project['id'])) ?></li> + </ul> +</div> +<form method="post" action="<?= $this->url->href('ProjectEdit', 'update', array('project_id' => $project['id'], 'redirect' => 'dates')) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('name', $values) ?> + + <?= $this->form->label(t('Start date'), 'start_date') ?> + <?= $this->form->text('start_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> + + <?= $this->form->label(t('End date'), 'end_date') ?> + <?= $this->form->text('end_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> +</form> + +<p class="alert alert-info"><?= t('Those dates are useful for the project Gantt chart.') ?></p> diff --git a/app/Template/project_edit/description.php b/app/Template/project_edit/description.php new file mode 100644 index 00000000..3af484d5 --- /dev/null +++ b/app/Template/project_edit/description.php @@ -0,0 +1,36 @@ +<div class="page-header"> + <h2><?= t('Edit project') ?></h2> + <ul> + <li><?= $this->url->link(t('General'), 'ProjectEdit', 'edit', array('project_id' => $project['id'])) ?></li> + <li><?= $this->url->link(t('Dates'), 'ProjectEdit', 'dates', array('project_id' => $project['id'])) ?></li> + <li class="active"><?= $this->url->link(t('Description'), 'ProjectEdit', 'description', array('project_id' => $project['id'])) ?></li> + </ul> +</div> +<form method="post" action="<?= $this->url->href('ProjectEdit', 'update', array('project_id' => $project['id'], 'redirect' => 'description')) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('name', $values) ?> + + <?= $this->form->label(t('Description'), 'description') ?> + <div class="form-tabs"> + <div class="write-area"> + <?= $this->form->textarea('description', $values, $errors) ?> + </div> + <div class="preview-area"> + <div class="markdown"></div> + </div> + <ul class="form-tabs-nav"> + <li class="form-tab form-tab-selected"> + <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a> + </li> + <li class="form-tab"> + <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a> + </li> + </ul> + </div> + <div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> +</form> diff --git a/app/Template/project_edit/general.php b/app/Template/project_edit/general.php new file mode 100644 index 00000000..1da913da --- /dev/null +++ b/app/Template/project_edit/general.php @@ -0,0 +1,35 @@ +<div class="page-header"> + <h2><?= t('Edit project') ?></h2> + <ul> + <li class="active"><?= $this->url->link(t('General'), 'ProjectEdit', 'edit', array('project_id' => $project['id'])) ?></li> + <li><?= $this->url->link(t('Dates'), 'ProjectEdit', 'dates', array('project_id' => $project['id'])) ?></li> + <li><?= $this->url->link(t('Description'), 'ProjectEdit', 'description', array('project_id' => $project['id'])) ?></li> + </ul> +</div> +<form method="post" action="<?= $this->url->href('ProjectEdit', 'update', array('project_id' => $project['id'], 'redirect' => 'edit')) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?> + + <?= $this->form->label(t('Identifier'), 'identifier') ?> + <?= $this->form->text('identifier', $values, $errors, array('maxlength="50"')) ?> + <p class="form-help"><?= t('The project identifier is optional and must be alphanumeric, example: MYPROJECT.') ?></p> + + <hr> + <div class="form-inline"> + <?= $this->form->label(t('Project owner'), 'owner_id') ?> + <?= $this->form->select('owner_id', $owners, $values, $errors) ?> + </div> + + <?php if ($this->user->hasProjectAccess('project', 'create', $project['id'])): ?> + <hr> + <?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> + <p class="form-help"><?= t('Private projects do not have users and groups management.') ?></p> + <?php endif ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> +</form> |