From c9ce5962a61d648f95d03a270ae485449f139ab7 Mon Sep 17 00:00:00 2001 From: BlueTeck Date: Sat, 10 Oct 2015 17:23:41 +0200 Subject: #1340 add append/replace option to dustom filters --- app/Template/custom_filter/add.php | 4 +++- app/Template/custom_filter/edit.php | 6 ++++-- app/Template/custom_filter/index.php | 10 +++++++++- app/Template/project/filters.php | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) (limited to 'app/Template') diff --git a/app/Template/custom_filter/add.php b/app/Template/custom_filter/add.php index d4e102b3..dfdae72f 100644 --- a/app/Template/custom_filter/add.php +++ b/app/Template/custom_filter/add.php @@ -13,8 +13,10 @@ form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?> user->isProjectManagementAllowed($project['id'])): ?> - form->checkbox('is_shared', t('Share with all project members'), 1) ?> + form->checkbox('is_shared', t('Share with all project members'), 1) ?> + + form->checkbox('append', t('Append filter (instead of replacement)'), 1) ?>
diff --git a/app/Template/custom_filter/edit.php b/app/Template/custom_filter/edit.php index 7525574c..f729152f 100644 --- a/app/Template/custom_filter/edit.php +++ b/app/Template/custom_filter/edit.php @@ -19,9 +19,11 @@ user->isProjectManagementAllowed($project['id'])): ?> form->checkbox('is_shared', t('Share with all project members'), 1, $values['is_shared'] == 1) ?> - form->hidden('is_shared', $values) ?> + form->hidden('is_shared', $values) ?> - + + form->checkbox('append', t('Append filter (instead of replacement)'), 1, $values['append'] == 1) ?> +
diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php index a53d0d0a..c857e206 100644 --- a/app/Template/custom_filter/index.php +++ b/app/Template/custom_filter/index.php @@ -8,6 +8,7 @@ + @@ -22,6 +23,13 @@ + + + + + + + e($filter['owner_name'] ?: $filter['owner_username']) ?> user->getId() || $this->user->isProjectManagementAllowed($project['id'])): ?> @@ -37,4 +45,4 @@
-render('custom_filter/add', array('project' => $project, 'values' => $values, 'errors' => $errors)) ?> \ No newline at end of file +render('custom_filter/add', array('project' => $project, 'values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php index c22d7b4f..eee691c5 100644 --- a/app/Template/project/filters.php +++ b/app/Template/project/filters.php @@ -68,7 +68,7 @@
-- cgit v1.2.3