diff options
Diffstat (limited to 'app/Template/project')
-rw-r--r-- | app/Template/project/activity.php | 10 | ||||
-rw-r--r-- | app/Template/project/disable.php | 4 | ||||
-rw-r--r-- | app/Template/project/duplicate.php | 4 | ||||
-rw-r--r-- | app/Template/project/edit.php | 10 | ||||
-rw-r--r-- | app/Template/project/enable.php | 4 | ||||
-rw-r--r-- | app/Template/project/events.php | 6 | ||||
-rw-r--r-- | app/Template/project/export_daily_summary.php | 14 | ||||
-rw-r--r-- | app/Template/project/export_tasks.php | 14 | ||||
-rw-r--r-- | app/Template/project/feed.php | 12 | ||||
-rw-r--r-- | app/Template/project/index.php | 10 | ||||
-rw-r--r-- | app/Template/project/layout.php | 6 | ||||
-rw-r--r-- | app/Template/project/new.php | 14 | ||||
-rw-r--r-- | app/Template/project/remove.php | 4 | ||||
-rw-r--r-- | app/Template/project/search.php | 16 | ||||
-rw-r--r-- | app/Template/project/share.php | 10 | ||||
-rw-r--r-- | app/Template/project/show.php | 14 | ||||
-rw-r--r-- | app/Template/project/sidebar.php | 36 | ||||
-rw-r--r-- | app/Template/project/tasks.php | 8 | ||||
-rw-r--r-- | app/Template/project/users.php | 26 |
19 files changed, 111 insertions, 111 deletions
diff --git a/app/Template/project/activity.php b/app/Template/project/activity.php index 7cc69bfe..cb986658 100644 --- a/app/Template/project/activity.php +++ b/app/Template/project/activity.php @@ -1,15 +1,15 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-search fa-fw"></i><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-check-square-o fa-fw"></i><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-search fa-fw"></i><?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-check-square-o fa-fw"></i><?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> <?php if ($project['is_public']): ?> - <li><i class="fa fa-rss-square fa-fw"></i><?= Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-rss-square fa-fw"></i><?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li> <?php endif ?> </ul> </div> <section> - <?= Helper\template('project/events', array('events' => $events)) ?> + <?= $this->render('project/events', array('events' => $events)) ?> </section> </section>
\ No newline at end of file diff --git a/app/Template/project/disable.php b/app/Template/project/disable.php index 7a729fa3..48a09a97 100644 --- a/app/Template/project/disable.php +++ b/app/Template/project/disable.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= Helper\a(t('Yes'), 'project', 'disable', array('project_id' => $project['id'], 'disable' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= Helper\a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Yes'), 'project', 'disable', array('project_id' => $project['id'], 'disable' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/project/duplicate.php b/app/Template/project/duplicate.php index a926dcd1..fc704b1e 100644 --- a/app/Template/project/duplicate.php +++ b/app/Template/project/duplicate.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= Helper\a(t('Yes'), 'project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= Helper\a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Yes'), 'project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php index 8eb2110d..bb776a06 100644 --- a/app/Template/project/edit.php +++ b/app/Template/project/edit.php @@ -1,13 +1,13 @@ <div class="page-header"> <h2><?= t('Edit project') ?></h2> </div> -<form method="post" action="<?= Helper\u('project', 'update', array('project_id' => $values['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $values['id'])) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> - <?= Helper\form_hidden('id', $values) ?> + <?= $this->formCsrf() ?> + <?= $this->formHidden('id', $values) ?> - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors, array('required')) ?> + <?= $this->formLabel(t('Name'), 'name') ?> + <?= $this->formText('name', $values, $errors, array('required')) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> diff --git a/app/Template/project/enable.php b/app/Template/project/enable.php index f2a1b0e7..b683ea7c 100644 --- a/app/Template/project/enable.php +++ b/app/Template/project/enable.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= Helper\a(t('Yes'), 'project', 'enable', array('project_id' => $project['id'], 'enable' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= Helper\a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Yes'), 'project', 'enable', array('project_id' => $project['id'], 'enable' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/project/events.php b/app/Template/project/events.php index 1b606414..93bc6584 100644 --- a/app/Template/project/events.php +++ b/app/Template/project/events.php @@ -5,11 +5,11 @@ <?php foreach ($events as $event): ?> <div class="activity-event"> <p class="activity-datetime"> - <?php if (Helper\contains($event['event_name'], 'subtask')): ?> + <?php if ($this->contains($event['event_name'], 'subtask')): ?> <i class="fa fa-tasks"></i> - <?php elseif (Helper\contains($event['event_name'], 'task')): ?> + <?php elseif ($this->contains($event['event_name'], 'task')): ?> <i class="fa fa-newspaper-o"></i> - <?php elseif (Helper\contains($event['event_name'], 'comment')): ?> + <?php elseif ($this->contains($event['event_name'], 'comment')): ?> <i class="fa fa-comments-o"></i> <?php endif ?> <?= dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?> diff --git a/app/Template/project/export_daily_summary.php b/app/Template/project/export_daily_summary.php index 763cd81c..191d36b6 100644 --- a/app/Template/project/export_daily_summary.php +++ b/app/Template/project/export_daily_summary.php @@ -8,15 +8,15 @@ <form method="get" action="?" autocomplete="off"> - <?= Helper\form_hidden('controller', $values) ?> - <?= Helper\form_hidden('action', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> + <?= $this->formHidden('controller', $values) ?> + <?= $this->formHidden('action', $values) ?> + <?= $this->formHidden('project_id', $values) ?> - <?= Helper\form_label(t('Start Date'), 'from') ?> - <?= Helper\form_text('from', $values, $errors, array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/> + <?= $this->formLabel(t('Start Date'), 'from') ?> + <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/> - <?= Helper\form_label(t('End Date'), 'to') ?> - <?= Helper\form_text('to', $values, $errors, array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?> + <?= $this->formLabel(t('End Date'), 'to') ?> + <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> diff --git a/app/Template/project/export_tasks.php b/app/Template/project/export_tasks.php index 02eb389f..e502085c 100644 --- a/app/Template/project/export_tasks.php +++ b/app/Template/project/export_tasks.php @@ -6,15 +6,15 @@ <form method="get" action="?" autocomplete="off"> - <?= Helper\form_hidden('controller', $values) ?> - <?= Helper\form_hidden('action', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> + <?= $this->formHidden('controller', $values) ?> + <?= $this->formHidden('action', $values) ?> + <?= $this->formHidden('project_id', $values) ?> - <?= Helper\form_label(t('Start Date'), 'from') ?> - <?= Helper\form_text('from', $values, $errors, array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?><br/> + <?= $this->formLabel(t('Start Date'), 'from') ?> + <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/> - <?= Helper\form_label(t('End Date'), 'to') ?> - <?= Helper\form_text('to', $values, $errors, array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?> + <?= $this->formLabel(t('End Date'), 'to') ?> + <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> diff --git a/app/Template/project/feed.php b/app/Template/project/feed.php index 9d10ecb1..14427af9 100644 --- a/app/Template/project/feed.php +++ b/app/Template/project/feed.php @@ -1,21 +1,21 @@ <?= '<?xml version="1.0" encoding="utf-8"?>' ?> <feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom"> <title><?= t('%s\'s activity', $project['name']) ?></title> - <link rel="alternate" type="text/html" href="<?= Helper\get_current_base_url() ?>"/> - <link rel="self" type="application/atom+xml" href="<?= Helper\get_current_base_url().Helper\u('project', 'feed', array('token' => $project['token'])) ?>"/> + <link rel="alternate" type="text/html" href="<?= $this->getCurrentBaseUrl() ?>"/> + <link rel="self" type="application/atom+xml" href="<?= $this->getCurrentBaseUrl().$this->u('project', 'feed', array('token' => $project['token'])) ?>"/> <updated><?= date(DATE_ATOM) ?></updated> - <id><?= Helper\get_current_base_url() ?></id> - <icon><?= Helper\get_current_base_url() ?>assets/img/favicon.png</icon> + <id><?= $this->getCurrentBaseUrl() ?></id> + <icon><?= $this->getCurrentBaseUrl() ?>assets/img/favicon.png</icon> <?php foreach ($events as $e): ?> <entry> <title type="text"><?= $e['event_title'] ?></title> - <link rel="alternate" href="<?= Helper\get_current_base_url().Helper\u('task', 'show', array('task_id' => $e['task_id'])) ?>"/> + <link rel="alternate" href="<?= $this->getCurrentBaseUrl().$this->u('task', 'show', array('task_id' => $e['task_id'])) ?>"/> <id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id> <published><?= date(DATE_ATOM, $e['date_creation']) ?></published> <updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated> <author> - <name><?= Helper\escape($e['author']) ?></name> + <name><?= $this->e($e['author']) ?></name> </author> <content type="html"> <![CDATA[ diff --git a/app/Template/project/index.php b/app/Template/project/index.php index 6c04449e..4f07a83a 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -1,10 +1,10 @@ <section id="main"> <div class="page-header"> <ul> - <?php if (Helper\is_admin()): ?> - <li><i class="fa fa-plus fa-fw"></i><?= Helper\a(t('New project'), 'project', 'create') ?></li> + <?php if ($this->acl->isAdminUser()): ?> + <li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New project'), 'project', 'create') ?></li> <?php endif ?> - <li><i class="fa fa-lock fa-fw"></i><?= Helper\a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> + <li><i class="fa fa-lock fa-fw"></i><?= $this->a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li> </ul> </div> <section> @@ -23,7 +23,7 @@ <?php if ($project['is_private']): ?> <i class="fa fa-lock fa-fw"></i> <?php endif ?> - <?= Helper\a(Helper\escape($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> </li> <?php endforeach ?> </ul> @@ -37,7 +37,7 @@ <?php if ($project['is_private']): ?> <i class="fa fa-lock"></i> <?php endif ?> - <?= Helper\a(Helper\escape($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?> </li> <?php endforeach ?> </ul> diff --git a/app/Template/project/layout.php b/app/Template/project/layout.php index 19fe32b9..0db9f3e8 100644 --- a/app/Template/project/layout.php +++ b/app/Template/project/layout.php @@ -1,13 +1,13 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-folder fa-fw"></i><?= Helper\a(t('All projects'), 'project', 'index') ?></li> + <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-folder fa-fw"></i><?= $this->a(t('All projects'), 'project', 'index') ?></li> </ul> </div> <section class="sidebar-container" id="project-section"> - <?= Helper\template('project/sidebar', array('project' => $project, 'is_owner' => $is_owner)) ?> + <?= $this->render('project/sidebar', array('project' => $project, 'is_owner' => $is_owner)) ?> <div class="sidebar-content"> <?= $project_content_for_layout ?> diff --git a/app/Template/project/new.php b/app/Template/project/new.php index f3926a65..91db75e1 100644 --- a/app/Template/project/new.php +++ b/app/Template/project/new.php @@ -1,20 +1,20 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-folder fa-fw"></i><?= Helper\a(t('All projects'), 'project', 'index') ?></li> + <li><i class="fa fa-folder fa-fw"></i><?= $this->a(t('All projects'), 'project', 'index') ?></li> </ul> </div> <section> - <form method="post" action="<?= Helper\u('project', 'save') ?>" autocomplete="off"> + <form method="post" action="<?= $this->u('project', 'save') ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> - <?= Helper\form_hidden('is_private', $values) ?> - <?= Helper\form_label(t('Name'), 'name') ?> - <?= Helper\form_text('name', $values, $errors, array('autofocus', 'required')) ?> + <?= $this->formCsrf() ?> + <?= $this->formHidden('is_private', $values) ?> + <?= $this->formLabel(t('Name'), 'name') ?> + <?= $this->formText('name', $values, $errors, array('autofocus', 'required')) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <?= Helper\a(t('cancel'), 'project', 'index') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'index') ?> </div> </form> </section> diff --git a/app/Template/project/remove.php b/app/Template/project/remove.php index a98f94eb..0f6fec78 100644 --- a/app/Template/project/remove.php +++ b/app/Template/project/remove.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= Helper\a(t('Yes'), 'project', 'remove', array('project_id' => $project['id'], 'remove' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= Helper\a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Yes'), 'project', 'remove', array('project_id' => $project['id'], 'remove' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/project/search.php b/app/Template/project/search.php index 3bad43e3..c8a3e410 100644 --- a/app/Template/project/search.php +++ b/app/Template/project/search.php @@ -1,24 +1,24 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-check-square-o fa-fw"></i><?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-dashboard fa-fw"></i><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-check-square-o fa-fw"></i><?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-dashboard fa-fw"></i><?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> </ul> </div> <section> <form method="get" action="?" autocomplete="off"> - <?= Helper\form_hidden('controller', $values) ?> - <?= Helper\form_hidden('action', $values) ?> - <?= Helper\form_hidden('project_id', $values) ?> - <?= Helper\form_text('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> + <?= $this->formHidden('controller', $values) ?> + <?= $this->formHidden('action', $values) ?> + <?= $this->formHidden('project_id', $values) ?> + <?= $this->formText('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> </form> <?php if (empty($tasks) && ! empty($values['search'])): ?> <p class="alert"><?= t('Nothing found.') ?></p> <?php elseif (! empty($tasks)): ?> - <?= Helper\template('task/table', array( + <?= $this->render('task/table', array( 'tasks' => $tasks, 'categories' => $categories, 'columns' => $columns, diff --git a/app/Template/project/share.php b/app/Template/project/share.php index 10155492..7c490008 100644 --- a/app/Template/project/share.php +++ b/app/Template/project/share.php @@ -6,14 +6,14 @@ <div class="listing"> <ul class="no-bullet"> - <li><strong><i class="fa fa-share-alt"></i> <?= Helper\a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-rss-square"></i> <?= Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><i class="fa fa-share-alt"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><i class="fa fa-rss-square"></i> <?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></strong></li> </ul> - <input type="text" class="auto-select" readonly="readonly" value="<?= Helper\get_current_base_url().Helper\u('board', 'readonly', array('token' => $project['token'])) ?>"/> + <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('board', 'readonly', array('token' => $project['token'])) ?>"/> </div> - <?= Helper\a(t('Disable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> + <?= $this->a(t('Disable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> <?php else: ?> - <?= Helper\a(t('Enable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?> + <?= $this->a(t('Enable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?> <?php endif ?> diff --git a/app/Template/project/show.php b/app/Template/project/show.php index bdb46ee3..22d710e6 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -9,8 +9,8 @@ <?php endif ?> <?php if ($project['is_public']): ?> - <li><i class="fa fa-share-alt"></i> <?= Helper\a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-rss-square"></i> <?= Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-share-alt"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> + <li><i class="fa fa-rss-square"></i> <?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li> <?php else: ?> <li><?= t('Public access disabled') ?></li> <?php endif ?> @@ -22,11 +22,11 @@ <?php if ($stats['nb_tasks'] > 0): ?> <?php if ($stats['nb_active_tasks'] > 0): ?> - <li><?= Helper\a(t('%d tasks on the board', $stats['nb_active_tasks']), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><?= $this->a(t('%d tasks on the board', $stats['nb_active_tasks']), 'board', 'show', array('project_id' => $project['id'])) ?></li> <?php endif ?> <?php if ($stats['nb_inactive_tasks'] > 0): ?> - <li><?= Helper\a(t('%d closed tasks', $stats['nb_inactive_tasks']), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> + <li><?= $this->a(t('%d closed tasks', $stats['nb_inactive_tasks']), 'project', 'tasks', array('project_id' => $project['id'])) ?></li> <?php endif ?> <li><?= t('%d tasks in total', $stats['nb_tasks']) ?></li> @@ -47,20 +47,20 @@ </tr> <?php foreach ($stats['columns'] as $column): ?> <tr> - <td><?= Helper\escape($column['title']) ?></td> + <td><?= $this->e($column['title']) ?></td> <td><?= $column['task_limit'] ?: '∞' ?></td> <td><?= $column['nb_active_tasks'] ?></td> </tr> <?php endforeach ?> </table> -<?php if (Helper\is_admin()): ?> +<?php if ($this->acl->isAdminUser()): ?> <div class="page-header"> <h2><?= t('Integration') ?></h2> </div> <h3><i class="fa fa-github fa-fw"></i><?= t('Github webhook') ?></h3> -<input type="text" class="auto-select" readonly="readonly" value="<?= Helper\get_current_base_url().Helper\u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> +<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/> <p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhook') ?></a></p> <?php endif ?> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 5107451a..35019fdb 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -2,61 +2,61 @@ <h2><?= t('Actions') ?></h2> <ul> <li> - <?= Helper\a(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?> </li> - <?php if (Helper\is_admin() || $project['is_private']): ?> + <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> <li> - <?= Helper\a(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?> </li> <li> - <?= Helper\a(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?> </li> <?php endif ?> - <?php if (Helper\is_admin() || $is_owner || $project['is_private']): ?> + <?php if ($this->acl->isAdminUser() || $is_owner || $project['is_private']): ?> <li> - <?= Helper\a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Edit board'), 'board', 'edit', array('project_id' => $project['id'])) ?> </li> <li> - <?= Helper\a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?> </li> <li> - <?= Helper\a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?> </li> <?php if ($project['is_private'] == 0): ?> <li> - <?= Helper\a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> + <?= $this->a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <li> - <?= Helper\a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?> </li> <?php endif ?> - <?php if (Helper\is_admin() || $project['is_private']): ?> + <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> <li> - <?= Helper\a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id']), true) ?> + <?= $this->a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id']), true) ?> </li> <li> <?php if ($project['is_active']): ?> - <?= Helper\a(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?> + <?= $this->a(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?> <?php else: ?> - <?= Helper\a(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> + <?= $this->a(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?> <?php endif ?> </li> <li> - <?= Helper\a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?> </li> <?php endif ?> </ul> - <?php if (Helper\is_admin() || $project['is_private']): ?> + <?php if ($this->acl->isAdminUser() || $project['is_private']): ?> <h2><?= t('Exports') ?></h2> <ul> <li> - <?= Helper\a(t('Tasks'), 'project', 'exportTasks', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Tasks'), 'project', 'exportTasks', array('project_id' => $project['id'])) ?> </li> <li> - <?= Helper\a(t('Daily project summary'), 'project', 'exportDailyProjectSummary', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Daily project summary'), 'project', 'exportDailyProjectSummary', array('project_id' => $project['id'])) ?> </li> </ul> <?php endif ?> diff --git a/app/Template/project/tasks.php b/app/Template/project/tasks.php index 6fe20c38..6ca24acf 100644 --- a/app/Template/project/tasks.php +++ b/app/Template/project/tasks.php @@ -1,16 +1,16 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-search fa-fw"></i><?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> - <li><i class="fa fa-dashboard fa-fw"></i><?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-search fa-fw"></i><?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?></li> + <li><i class="fa fa-dashboard fa-fw"></i><?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?></li> </ul> </div> <section> <?php if (empty($tasks)): ?> <p class="alert"><?= t('No task') ?></p> <?php else: ?> - <?= Helper\template('task/table', array( + <?= $this->render('task/table', array( 'tasks' => $tasks, 'categories' => $categories, 'columns' => $columns, diff --git a/app/Template/project/users.php b/app/Template/project/users.php index 691fe9fd..ac27237c 100644 --- a/app/Template/project/users.php +++ b/app/Template/project/users.php @@ -14,17 +14,17 @@ <ul> <?php foreach ($users['allowed'] as $user_id => $username): ?> <li> - <strong><?= Helper\escape($username) ?></strong> + <strong><?= $this->e($username) ?></strong> <?php $is_owner = array_key_exists($user_id, $users['owners']); if ($is_owner): ?> [owner] <?php endif ?> <?php if ($project['is_private'] == 0): ?> <?php if ($is_owner): ?> - (<a href=<?= Helper\u('project', 'setOwner', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 0), true) ?> ><?= t('set user') ?></a> + (<a href=<?= $this->u('project', 'setOwner', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 0), true) ?> ><?= t('set user') ?></a> <?php else: ?> - (<a href=<?= Helper\u('project', 'setOwner', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 1), true) ?> ><?= t('set manager') ?></a> + (<a href=<?= $this->u('project', 'setOwner', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 1), true) ?> ><?= t('set manager') ?></a> <?php endif ?> or - <?= Helper\a(t('revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?>) + <?= $this->a(t('revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?>) <?php endif ?> </li> <?php endforeach ?> @@ -35,14 +35,14 @@ <?php if ($project['is_private'] == 0 && ! empty($users['not_allowed'])): ?> <hr/> - <form method="post" action="<?= Helper\u('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->u('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> + <?= $this->formCsrf() ?> - <?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?> + <?= $this->formHidden('project_id', array('project_id' => $project['id'])) ?> - <?= Helper\form_label(t('User'), 'user_id') ?> - <?= Helper\form_select('user_id', $users['not_allowed']) ?><br/> + <?= $this->formLabel(t('User'), 'user_id') ?> + <?= $this->formSelect('user_id', $users['not_allowed']) ?><br/> <div class="form-actions"> <input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/> @@ -54,11 +54,11 @@ <?php if ($project['is_private'] == 0): ?> <hr/> -<form method="post" action="<?= Helper\u('project', 'allowEverybody', array('project_id' => $project['id'])) ?>"> - <?= Helper\form_csrf() ?> +<form method="post" action="<?= $this->u('project', 'allowEverybody', array('project_id' => $project['id'])) ?>"> + <?= $this->formCsrf() ?> - <?= Helper\form_hidden('id', array('id' => $project['id'])) ?> - <?= Helper\form_checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?> + <?= $this->formHidden('id', array('id' => $project['id'])) ?> + <?= $this->formCheckbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> |