summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/app/sidebar.php27
-rw-r--r--app/Template/config/application.php2
-rw-r--r--app/Template/config/board.php2
-rw-r--r--app/Template/config/calendar.php4
-rw-r--r--app/Template/config/integrations.php4
-rw-r--r--app/Template/config/layout.php3
-rw-r--r--app/Template/config/project.php2
-rw-r--r--app/Template/config/webhook.php4
-rw-r--r--app/Template/dashboard/activity.php (renamed from app/Template/app/activity.php)0
-rw-r--r--app/Template/dashboard/calendar.php (renamed from app/Template/app/calendar.php)0
-rw-r--r--app/Template/dashboard/layout.php (renamed from app/Template/app/layout.php)0
-rw-r--r--app/Template/dashboard/notifications.php (renamed from app/Template/app/notifications.php)0
-rw-r--r--app/Template/dashboard/projects.php (renamed from app/Template/app/projects.php)2
-rw-r--r--app/Template/dashboard/show.php (renamed from app/Template/app/overview.php)6
-rw-r--r--app/Template/dashboard/sidebar.php27
-rw-r--r--app/Template/dashboard/subtasks.php (renamed from app/Template/app/subtasks.php)4
-rw-r--r--app/Template/dashboard/tasks.php (renamed from app/Template/app/tasks.php)2
-rw-r--r--app/Template/header.php6
-rw-r--r--app/Template/layout.php2
-rw-r--r--app/Template/user/sidebar.php4
20 files changed, 50 insertions, 51 deletions
diff --git a/app/Template/app/sidebar.php b/app/Template/app/sidebar.php
deleted file mode 100644
index 66d15b14..00000000
--- a/app/Template/app/sidebar.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<div class="sidebar">
- <h2><?= $this->text->e($user['name'] ?: $user['username']) ?></h2>
- <ul>
- <li <?= $this->app->checkMenuSelection('app', 'index') ?>>
- <?= $this->url->link(t('Overview'), 'app', 'index', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'projects') ?>>
- <?= $this->url->link(t('My projects'), 'app', 'projects', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'tasks') ?>>
- <?= $this->url->link(t('My tasks'), 'app', 'tasks', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'subtasks') ?>>
- <?= $this->url->link(t('My subtasks'), 'app', 'subtasks', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'calendar') ?>>
- <?= $this->url->link(t('My calendar'), 'app', 'calendar', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'activity') ?>>
- <?= $this->url->link(t('My activity stream'), 'app', 'activity', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('app', 'notifications') ?>>
- <?= $this->url->link(t('My notifications'), 'app', 'notifications', array('user_id' => $user['id'])) ?>
- </li>
- <?= $this->hook->render('template:dashboard:sidebar') ?>
- </ul>
-</div> \ No newline at end of file
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
index 259756bc..ee0e147b 100644
--- a/app/Template/config/application.php
+++ b/app/Template/config/application.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Application settings') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('config', 'application') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'application')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
diff --git a/app/Template/config/board.php b/app/Template/config/board.php
index ba1bab59..75cd40ef 100644
--- a/app/Template/config/board.php
+++ b/app/Template/config/board.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Board settings') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('config', 'board') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'board')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
diff --git a/app/Template/config/calendar.php b/app/Template/config/calendar.php
index b7b230df..37084a8b 100644
--- a/app/Template/config/calendar.php
+++ b/app/Template/config/calendar.php
@@ -2,7 +2,7 @@
<h2><?= t('Calendar settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->url->href('config', 'calendar') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'calendar')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
@@ -31,4 +31,4 @@
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
-</section> \ No newline at end of file
+</section>
diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php
index e404c52e..2a29b358 100644
--- a/app/Template/config/integrations.php
+++ b/app/Template/config/integrations.php
@@ -2,7 +2,7 @@
<h2><?= t('Integration with third-party services') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('config', 'integrations') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'integrations')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->hook->render('template:config:integrations', array('values' => $values)) ?>
@@ -14,4 +14,4 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/app/Template/config/layout.php b/app/Template/config/layout.php
index f34caaab..6eafa593 100644
--- a/app/Template/config/layout.php
+++ b/app/Template/config/layout.php
@@ -1,10 +1,9 @@
<section id="main">
<section class="sidebar-container" id="config-section">
-
<?= $this->render($sidebar_template) ?>
<div class="sidebar-content">
<?= $content_for_sublayout ?>
</div>
</section>
-</section> \ No newline at end of file
+</section>
diff --git a/app/Template/config/project.php b/app/Template/config/project.php
index b6b7ec25..b0112773 100644
--- a/app/Template/config/project.php
+++ b/app/Template/config/project.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Project settings') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('config', 'project') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'project')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php
index b96979a0..5db1fa6e 100644
--- a/app/Template/config/webhook.php
+++ b/app/Template/config/webhook.php
@@ -2,7 +2,7 @@
<h2><?= t('Webhook settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->url->href('config', 'webhook') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'save', array('redirect' => 'webhook')) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
@@ -32,4 +32,4 @@
<?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
</li>
</ul>
-</section> \ No newline at end of file
+</section>
diff --git a/app/Template/app/activity.php b/app/Template/dashboard/activity.php
index 71a67fb2..71a67fb2 100644
--- a/app/Template/app/activity.php
+++ b/app/Template/dashboard/activity.php
diff --git a/app/Template/app/calendar.php b/app/Template/dashboard/calendar.php
index a154203b..a154203b 100644
--- a/app/Template/app/calendar.php
+++ b/app/Template/dashboard/calendar.php
diff --git a/app/Template/app/layout.php b/app/Template/dashboard/layout.php
index 2a32ac02..2a32ac02 100644
--- a/app/Template/app/layout.php
+++ b/app/Template/dashboard/layout.php
diff --git a/app/Template/app/notifications.php b/app/Template/dashboard/notifications.php
index b64eb0b7..b64eb0b7 100644
--- a/app/Template/app/notifications.php
+++ b/app/Template/dashboard/notifications.php
diff --git a/app/Template/app/projects.php b/app/Template/dashboard/projects.php
index c0110b07..cdf19bdf 100644
--- a/app/Template/app/projects.php
+++ b/app/Template/dashboard/projects.php
@@ -1,5 +1,5 @@
<div class="page-header">
- <h2><?= $this->url->link(t('My projects'), 'app', 'projects', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
+ <h2><?= $this->url->link(t('My projects'), 'DashboardController', 'projects', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
</div>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('Your are not member of any project.') ?></p>
diff --git a/app/Template/app/overview.php b/app/Template/dashboard/show.php
index 0b354791..bc4e2952 100644
--- a/app/Template/app/overview.php
+++ b/app/Template/dashboard/show.php
@@ -7,6 +7,6 @@
</form>
</div>
-<?= $this->render('app/projects', array('paginator' => $project_paginator, 'user' => $user)) ?>
-<?= $this->render('app/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?>
-<?= $this->render('app/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?> \ No newline at end of file
+<?= $this->render('dashboard/projects', array('paginator' => $project_paginator, 'user' => $user)) ?>
+<?= $this->render('dashboard/tasks', array('paginator' => $task_paginator, 'user' => $user)) ?>
+<?= $this->render('dashboard/subtasks', array('paginator' => $subtask_paginator, 'user' => $user)) ?>
diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php
new file mode 100644
index 00000000..86cc20f8
--- /dev/null
+++ b/app/Template/dashboard/sidebar.php
@@ -0,0 +1,27 @@
+<div class="sidebar">
+ <h2><?= $this->text->e($user['name'] ?: $user['username']) ?></h2>
+ <ul>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'show') ?>>
+ <?= $this->url->link(t('Overview'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'projects') ?>>
+ <?= $this->url->link(t('My projects'), 'DashboardController', 'projects', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'tasks') ?>>
+ <?= $this->url->link(t('My tasks'), 'DashboardController', 'tasks', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'subtasks') ?>>
+ <?= $this->url->link(t('My subtasks'), 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'calendar') ?>>
+ <?= $this->url->link(t('My calendar'), 'DashboardController', 'calendar', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'activity') ?>>
+ <?= $this->url->link(t('My activity stream'), 'DashboardController', 'activity', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('DashboardController', 'notifications') ?>>
+ <?= $this->url->link(t('My notifications'), 'DashboardController', 'notifications', array('user_id' => $user['id'])) ?>
+ </li>
+ <?= $this->hook->render('template:dashboard:sidebar') ?>
+ </ul>
+</div>
diff --git a/app/Template/app/subtasks.php b/app/Template/dashboard/subtasks.php
index cca09481..ee6caf02 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/dashboard/subtasks.php
@@ -1,5 +1,5 @@
<div class="page-header">
- <h2><?= $this->url->link(t('My subtasks'), 'app', 'subtasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
+ <h2><?= $this->url->link(t('My subtasks'), 'DashboardController', 'subtasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
</div>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
@@ -40,4 +40,4 @@
</table>
<?= $paginator ?>
-<?php endif ?> \ No newline at end of file
+<?php endif ?>
diff --git a/app/Template/app/tasks.php b/app/Template/dashboard/tasks.php
index f0ed61e0..71b62572 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/dashboard/tasks.php
@@ -1,5 +1,5 @@
<div class="page-header">
- <h2><?= $this->url->link(t('My tasks'), 'app', 'tasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
+ <h2><?= $this->url->link(t('My tasks'), 'DashboardController', 'tasks', array('user_id' => $user['id'])) ?> (<?= $paginator->getTotal() ?>)</h2>
</div>
<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
diff --git a/app/Template/header.php b/app/Template/header.php
index 3885e671..f47b270f 100644
--- a/app/Template/header.php
+++ b/app/Template/header.php
@@ -2,7 +2,7 @@
<nav>
<h1>
<span class="logo">
- <?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, '', t('Dashboard')) ?>
+ <?= $this->url->link('K<span>B</span>', 'DashboardController', 'show', array(), false, '', t('Dashboard')) ?>
</span>
<span class="title">
<?= $this->text->e($title) ?>
@@ -34,7 +34,7 @@
<li class="user-links">
<?php if ($this->user->hasNotifications()): ?>
<span class="notification">
- <?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'app', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?>
+ <?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'DashboardController', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?>
</span>
<?php endif ?>
@@ -63,7 +63,7 @@
<li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li>
<li>
<i class="fa fa-tachometer fa-fw"></i>
- <?= $this->url->link(t('My dashboard'), 'app', 'index', array('user_id' => $this->user->getId())) ?>
+ <?= $this->url->link(t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?>
</li>
<li>
<i class="fa fa-home fa-fw"></i>
diff --git a/app/Template/layout.php b/app/Template/layout.php
index a80fc288..701b297d 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -44,7 +44,7 @@
<?= $this->hook->render('template:layout:head') ?>
</head>
- <body data-status-url="<?= $this->url->href('app', 'status') ?>"
+ <body data-status-url="<?= $this->url->href('UserHelper', 'status') ?>"
data-login-url="<?= $this->url->href('auth', 'login') ?>"
data-keyboard-shortcut-url="<?= $this->url->href('Doc', 'shortcuts') ?>"
data-timezone="<?= $this->app->getTimezone() ?>"
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 5ea2e355..9da43ced 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -8,7 +8,7 @@
<?php endif ?>
<?php if ($this->user->isAdmin()): ?>
<li>
- <?= $this->url->link(t('User dashboard'), 'app', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
<?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
@@ -80,4 +80,4 @@
<?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
</ul>
-</div> \ No newline at end of file
+</div>