Move project header templates to folder project_header
This commit is contained in:
parent
30fefe4fa9
commit
07e3f51edb
|
|
@ -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()),
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<section id="main">
|
||||
|
||||
<?= $this->render('project/filters', array(
|
||||
<?= $this->render('project_header/header', array(
|
||||
'project' => $project,
|
||||
'filters' => $filters,
|
||||
'categories_list' => $categories_list,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<section id="main">
|
||||
<?= $this->render('project/filters', array(
|
||||
<?= $this->render('project_header/header', array(
|
||||
'project' => $project,
|
||||
'filters' => $filters,
|
||||
)) ?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<section id="main">
|
||||
<?= $this->render('project/filters', array(
|
||||
<?= $this->render('project_header/header', array(
|
||||
'project' => $project,
|
||||
'filters' => $filters,
|
||||
'users_list' => $users_list,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<section id="main">
|
||||
<?= $this->render('project/filters', array(
|
||||
<?= $this->render('project_header/header', array(
|
||||
'project' => $project,
|
||||
'filters' => $filters,
|
||||
'custom_filters_list' => $custom_filters_list,
|
||||
'users_list' => $users_list,
|
||||
'categories_list' => $categories_list,
|
||||
)) ?>
|
||||
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
|
|
|
|||
|
|
@ -1,106 +0,0 @@
|
|||
<div class="page-header">
|
||||
<?= $this->hook->render('template:project:header:before', array('project' => $project)) ?>
|
||||
|
||||
<div class="dropdown">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
|
||||
<ul>
|
||||
<?php if (isset($is_board)): ?>
|
||||
<li>
|
||||
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>>
|
||||
<i class="fa fa-expand fa-fw"></i>
|
||||
<?= $this->url->link(t('Expand tasks'), 'board', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
|
||||
</span>
|
||||
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? 'style="display: none;"' : '' ?>>
|
||||
<i class="fa fa-compress fa-fw"></i>
|
||||
<?= $this->url->link(t('Collapse tasks'), 'board', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="filter-compact">
|
||||
<i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Compact view') ?></a>
|
||||
</span>
|
||||
<span class="filter-wide" style="display: none">
|
||||
<i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="filter-max-height" style="display: none">
|
||||
<i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Set maximum column height') ?></a>
|
||||
</span>
|
||||
<span class="filter-min-height">
|
||||
<i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Remove maximum column height') ?></a>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?= $this->render('project/dropdown', array('project' => $project)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="views">
|
||||
<li <?= $filters['controller'] === 'board' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-th fa-fw"></i>
|
||||
<?= $this->url->link(t('Board'), 'board', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?>
|
||||
</li>
|
||||
<li <?= $filters['controller'] === 'calendar' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?>
|
||||
</li>
|
||||
<li <?= $filters['controller'] === 'listing' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
<?= $this->url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?>
|
||||
<li <?= $filters['controller'] === 'gantt' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-sliders fa-fw"></i>
|
||||
<?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<form method="get" action="<?= $this->url->dir() ?>" class="search">
|
||||
<?= $this->form->hidden('controller', $filters) ?>
|
||||
<?= $this->form->hidden('action', $filters) ?>
|
||||
<?= $this->form->hidden('project_id', $filters) ?>
|
||||
<?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"'), 'form-input-large') ?>
|
||||
</form>
|
||||
|
||||
<div class="filter-dropdowns">
|
||||
|
||||
<?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?>
|
||||
|
||||
<?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('My filters') ?></a>
|
||||
<ul>
|
||||
<?php foreach ($custom_filters_list as $filter): ?>
|
||||
<li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (isset($users_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Users') ?></a>
|
||||
<ul>
|
||||
<li><a href="#" class="filter-helper" data-append-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
|
||||
<?php foreach ($users_list as $user): ?>
|
||||
<li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (isset($categories_list) && ! empty($categories_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Categories') ?></a>
|
||||
<ul>
|
||||
<li><a href="#" class="filter-helper" data-append-filter="category:none"><?= t('No category') ?></a></li>
|
||||
<?php foreach ($categories_list as $category): ?>
|
||||
<li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?= $this->hook->render('template:project:header:after', array('project' => $project)) ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<div class="dropdown">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
|
||||
<ul>
|
||||
<?php if ($is_board): ?>
|
||||
<li>
|
||||
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>>
|
||||
<i class="fa fa-expand fa-fw"></i>
|
||||
<?= $this->url->link(t('Expand tasks'), 'board', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
|
||||
</span>
|
||||
<span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? 'style="display: none;"' : '' ?>>
|
||||
<i class="fa fa-compress fa-fw"></i>
|
||||
<?= $this->url->link(t('Collapse tasks'), 'board', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="filter-compact">
|
||||
<i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Compact view') ?></a>
|
||||
</span>
|
||||
<span class="filter-wide" style="display: none">
|
||||
<i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="filter-max-height" style="display: none">
|
||||
<i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Set maximum column height') ?></a>
|
||||
</span>
|
||||
<span class="filter-min-height">
|
||||
<i class="fa fa-arrows-v fa-fw"></i> <a href="#" class="filter-toggle-height"><?= t('Remove maximum column height') ?></a>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?= $this->render('project/dropdown', array('project' => $project)) ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<div class="page-header">
|
||||
<?= $this->hook->render('template:project:header:before', array('project' => $project)) ?>
|
||||
<?= $this->render('project_header/dropdown', array('project' => $project, 'is_board' => isset($is_board))) ?>
|
||||
<?= $this->render('project_header/views', array('project' => $project, 'filters' => $filters)) ?>
|
||||
<?= $this->render('project_header/search', array(
|
||||
'project' => $project,
|
||||
'filters' => $filters,
|
||||
'custom_filters_list' => isset($custom_filters_list) ? $custom_filters_list : array(),
|
||||
'users_list' => isset($users_list) ? $users_list : array(),
|
||||
'categories_list' => isset($categories_list) ? $categories_list : array(),
|
||||
)) ?>
|
||||
|
||||
<?= $this->hook->render('template:project:header:after', array('project' => $project)) ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<form method="get" action="<?= $this->url->dir() ?>" class="search">
|
||||
<?= $this->form->hidden('controller', $filters) ?>
|
||||
<?= $this->form->hidden('action', $filters) ?>
|
||||
<?= $this->form->hidden('project_id', $filters) ?>
|
||||
<?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"'), 'form-input-large') ?>
|
||||
</form>
|
||||
|
||||
<div class="filter-dropdowns">
|
||||
<?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?>
|
||||
|
||||
<?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('My filters') ?></a>
|
||||
<ul>
|
||||
<?php foreach ($custom_filters_list as $filter): ?>
|
||||
<li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (isset($users_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Users') ?></a>
|
||||
<ul>
|
||||
<li><a href="#" class="filter-helper" data-append-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
|
||||
<?php foreach ($users_list as $user): ?>
|
||||
<li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (isset($categories_list) && ! empty($categories_list)): ?>
|
||||
<div class="dropdown filters">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Categories') ?></a>
|
||||
<ul>
|
||||
<li><a href="#" class="filter-helper" data-append-filter="category:none"><?= t('No category') ?></a></li>
|
||||
<?php foreach ($categories_list as $category): ?>
|
||||
<li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<ul class="views">
|
||||
<li <?= $filters['controller'] === 'board' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-th fa-fw"></i>
|
||||
<?= $this->url->link(t('Board'), 'board', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?>
|
||||
</li>
|
||||
<li <?= $filters['controller'] === 'calendar' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?>
|
||||
</li>
|
||||
<li <?= $filters['controller'] === 'listing' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
<?= $this->url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?>
|
||||
<li <?= $filters['controller'] === 'gantt' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-sliders fa-fw"></i>
|
||||
<?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
Loading…
Reference in New Issue