From 07e3f51edb76f1c20c7c7f222b356cd0a26fca42 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 14 Feb 2016 16:11:55 -0500 Subject: Move project header templates to folder project_header --- app/Controller/Listing.php | 3 + app/Template/board/view_private.php | 2 +- app/Template/calendar/show.php | 2 +- app/Template/gantt/project.php | 2 +- app/Template/listing/show.php | 5 +- app/Template/project/filters.php | 106 ------------------------------- app/Template/project_header/dropdown.php | 34 ++++++++++ app/Template/project_header/header.php | 14 ++++ app/Template/project_header/search.php | 45 +++++++++++++ app/Template/project_header/views.php | 20 ++++++ 10 files changed, 123 insertions(+), 110 deletions(-) delete mode 100644 app/Template/project/filters.php create mode 100644 app/Template/project_header/dropdown.php create mode 100644 app/Template/project_header/header.php create mode 100644 app/Template/project_header/search.php create mode 100644 app/Template/project_header/views.php (limited to 'app') diff --git a/app/Controller/Listing.php b/app/Controller/Listing.php index c7d3d9a8..c784dd50 100644 --- a/app/Controller/Listing.php +++ b/app/Controller/Listing.php @@ -32,6 +32,9 @@ class Listing extends Base $this->response->html($this->helper->layout->app('listing/show', $params + array( 'paginator' => $paginator, + 'categories_list' => $this->category->getList($params['project']['id'], false), + 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false), + 'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()), ))); } } diff --git a/app/Template/board/view_private.php b/app/Template/board/view_private.php index 63d261f6..b5e38c66 100644 --- a/app/Template/board/view_private.php +++ b/app/Template/board/view_private.php @@ -1,6 +1,6 @@
- render('project/filters', array( + render('project_header/header', array( 'project' => $project, 'filters' => $filters, 'categories_list' => $categories_list, diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php index d74e945e..7085b51e 100644 --- a/app/Template/calendar/show.php +++ b/app/Template/calendar/show.php @@ -1,5 +1,5 @@
- render('project/filters', array( + render('project_header/header', array( 'project' => $project, 'filters' => $filters, )) ?> diff --git a/app/Template/gantt/project.php b/app/Template/gantt/project.php index 1face3b8..fe193c2b 100644 --- a/app/Template/gantt/project.php +++ b/app/Template/gantt/project.php @@ -1,5 +1,5 @@
- render('project/filters', array( + render('project_header/header', array( 'project' => $project, 'filters' => $filters, 'users_list' => $users_list, diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php index e7aa5947..9a5992e3 100644 --- a/app/Template/listing/show.php +++ b/app/Template/listing/show.php @@ -1,7 +1,10 @@
- render('project/filters', array( + render('project_header/header', array( 'project' => $project, 'filters' => $filters, + 'custom_filters_list' => $custom_filters_list, + 'users_list' => $users_list, + 'categories_list' => $categories_list, )) ?> isEmpty()): ?> diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php deleted file mode 100644 index 78794e1c..00000000 --- a/app/Template/project/filters.php +++ /dev/null @@ -1,106 +0,0 @@ - \ No newline at end of file diff --git a/app/Template/project_header/dropdown.php b/app/Template/project_header/dropdown.php new file mode 100644 index 00000000..bbc033bf --- /dev/null +++ b/app/Template/project_header/dropdown.php @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/app/Template/project_header/header.php b/app/Template/project_header/header.php new file mode 100644 index 00000000..eca9b327 --- /dev/null +++ b/app/Template/project_header/header.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/app/Template/project_header/search.php b/app/Template/project_header/search.php new file mode 100644 index 00000000..032e3343 --- /dev/null +++ b/app/Template/project_header/search.php @@ -0,0 +1,45 @@ + + +
+ render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?> + + + + + + + + + + + + +
diff --git a/app/Template/project_header/views.php b/app/Template/project_header/views.php new file mode 100644 index 00000000..1219a213 --- /dev/null +++ b/app/Template/project_header/views.php @@ -0,0 +1,20 @@ +
    +
  • > + + url->link(t('Board'), 'board', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?> +
  • +
  • > + + url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?> +
  • +
  • > + + url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> +
  • + user->hasProjectAccess('gantt', 'project', $project['id'])): ?> +
  • > + + url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> +
  • + +
\ No newline at end of file -- cgit v1.2.3