summaryrefslogtreecommitdiff
path: root/app/Template/layout.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
commiteeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch)
tree511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Template/layout.php
parent65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff)
Helpers refactoring
Diffstat (limited to 'app/Template/layout.php')
-rw-r--r--app/Template/layout.php34
1 files changed, 15 insertions, 19 deletions
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 7baecde9..cf74c8ab 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -11,16 +11,13 @@
<?php endif ?>
<?php if (! isset($not_editable)): ?>
- <?= $this->js('assets/js/app.js') ?>
+ <?= $this->asset->js('assets/js/app.js') ?>
<?php endif ?>
- <?= $this->css($this->u('app', 'colors'), false, 'all') ?>
- <?= $this->css('assets/css/app.css') ?>
- <?= $this->css('assets/css/print.css', true, 'print') ?>
-
- <?php if ($this->config->get('application_stylesheet')): ?>
- <style><?= $this->config->get('application_stylesheet') ?></style>
- <?php endif ?>
+ <?= $this->asset->css($this->url->href('app', 'colors'), false, 'all') ?>
+ <?= $this->asset->css('assets/css/app.css') ?>
+ <?= $this->asset->css('assets/css/print.css', true, 'print') ?>
+ <?= $this->asset->customCss() ?>
<link rel="icon" type="image/png" href="assets/img/favicon.png">
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
@@ -30,19 +27,19 @@
<title><?= isset($title) ? $this->e($title) : 'Kanboard' ?></title>
</head>
- <body data-status-url="<?= $this->u('app', 'status') ?>"
- data-login-url="<?= $this->u('auth', 'login') ?>"
- data-timezone="<?= $this->getTimezone() ?>"
- data-js-lang="<?= $this->jsLang() ?>">
+ <body data-status-url="<?= $this->url->href('app', 'status') ?>"
+ data-login-url="<?= $this->url->href('auth', 'login') ?>"
+ data-timezone="<?= $this->app->getTimezone() ?>"
+ data-js-lang="<?= $this->app->jsLang() ?>">
<?php if (isset($no_layout) && $no_layout): ?>
<?= $content_for_layout ?>
<?php else: ?>
<header>
<nav>
- <h1><?= $this->a('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->summary($this->e($title)) ?>
+ <h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->text->truncate($this->e($title)) ?>
<?php if (! empty($description)): ?>
- <span class="column-tooltip" title='<?= $this->e($this->markdown($description)) ?>'>
+ <span class="column-tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -50,7 +47,7 @@
<ul>
<?php if (isset($board_selector) && ! empty($board_selector)): ?>
<li>
- <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
+ <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
<option value=""></option>
<?php foreach($board_selector as $board_id => $board_name): ?>
<option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option>
@@ -59,15 +56,14 @@
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Logout'), 'auth', 'logout') ?>
- <span class="username hide-tablet">(<?= $this->a($this->e($this->getFullname()), 'user', 'show', array('user_id' => $this->userSession->getId())) ?>)</span>
+ <?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
+ <span class="username hide-tablet">(<?= $this->user->getProfileLink() ?>)</span>
</li>
</ul>
</nav>
</header>
<section class="page">
- <?= $this->flash('<div class="alert alert-success alert-fade-out">%s</div>') ?>
- <?= $this->flashError('<div class="alert alert-error">%s</div>') ?>
+ <?= $this->app->flashMessage() ?>
<?= $content_for_layout ?>
</section>
<?php endif ?>