summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-04 23:16:59 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-04 23:16:59 -0400
commit6b78b882d8e7e23353fa401dd3b34c7c262dab62 (patch)
tree466a082a4b10b8f0e974be494e8c7040150288b9 /app
parent65921f81ac04d6bca5271b1c6544c8bdc9cfb331 (diff)
Improve web page title on the task view
Diffstat (limited to 'app')
-rw-r--r--app/Helper/LayoutHelper.php1
-rw-r--r--app/Template/layout.php10
2 files changed, 10 insertions, 1 deletions
diff --git a/app/Helper/LayoutHelper.php b/app/Helper/LayoutHelper.php
index 9384da1b..cbda85a3 100644
--- a/app/Helper/LayoutHelper.php
+++ b/app/Helper/LayoutHelper.php
@@ -60,6 +60,7 @@ class LayoutHelper extends Base
*/
public function task($template, array $params)
{
+ $params['page_title'] = $params['task']['project_name'].', #'.$params['task']['id'].' - '.$params['task']['title'];
$params['title'] = $params['task']['project_name'];
return $this->subLayout('task/layout', 'task/sidebar', $template, $params);
}
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 67924e3e..56bbe147 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -30,7 +30,15 @@
<link rel="apple-touch-icon" sizes="114x114" href="<?= $this->url->dir() ?>assets/img/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="144x144" href="<?= $this->url->dir() ?>assets/img/touch-icon-ipad-retina.png">
- <title><?= isset($title) ? $this->text->e($title) : 'Kanboard' ?></title>
+ <title>
+ <?php if (isset($page_title)): ?>
+ <?= $this->text->e($page_title) ?>
+ <?php elseif (isset($title)): ?>
+ <?= $this->text->e($title) ?>
+ <?php else: ?>
+ Kanboard
+ <?php endif ?>
+ </title>
<?= $this->hook->render('template:layout:head') ?>
</head>