From 4fa38bf417dd7f1673f63641460092bd046d57b7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 24 Jan 2016 16:29:14 -0500 Subject: Add project owner --- app/Template/project/edit.php | 10 +++++++++- app/Template/project/index.php | 19 +++++++++---------- app/Template/project/roles.php | 7 ------- app/Template/project/show.php | 4 ++++ app/Template/project/sidebar.php | 6 +++--- 5 files changed, 25 insertions(+), 21 deletions(-) delete mode 100644 app/Template/project/roles.php (limited to 'app/Template/project') diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php index 188107d1..3a273f32 100644 --- a/app/Template/project/edit.php +++ b/app/Template/project/edit.php @@ -11,18 +11,26 @@ form->label(t('Identifier'), 'identifier') ?> form->text('identifier', $values, $errors, array('maxlength="50"')) ?> -

+

+ form->label(t('Project owner'), 'owner_id') ?> + form->select('owner_id', $owners, $values, $errors) ?> + +
form->label(t('Start date'), 'start_date') ?> form->text('start_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> form->label(t('End date'), 'end_date') ?> form->text('end_date', $values, $errors, array('maxlength="10"'), 'form-date') ?> +

user->hasProjectAccess('project', 'create', $project['id'])): ?> +
form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> +

+
form->label(t('Description'), 'description') ?>
diff --git a/app/Template/project/index.php b/app/Template/project/index.php index c7d74f8b..3d2a33ea 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -23,9 +23,9 @@ order(t('Project'), 'name') ?> order(t('Start date'), 'start_date') ?> order(t('End date'), 'end_date') ?> + order(t('Owner'), 'owner_id') ?> user->hasAccess('projectuser', 'managers')): ?> - - + @@ -66,16 +66,15 @@ + + 0): ?> + e($project['owner_name'] ?: $project['owner_username']) ?> + + user->hasAccess('projectuser', 'managers')): ?> - render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MANAGER)) ?> - - - - - - render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MEMBER)) ?> - + + diff --git a/app/Template/project/roles.php b/app/Template/project/roles.php deleted file mode 100644 index d4cd43cb..00000000 --- a/app/Template/project/roles.php +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/app/Template/project/show.php b/app/Template/project/show.php index 5a65a26e..5f1aefc1 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -4,6 +4,10 @@