summaryrefslogtreecommitdiff
path: root/app/Templates/layout.php
blob: 9bc815c9bf4bcd3efee48858bb1ea12aed791cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">

        <meta name="viewport" content="width=device-width">
        <meta name="mobile-web-app-capable" content="yes">
        <meta name="robots" content="noindex,nofollow">

        <?= Helper\js('assets/js/jquery-1.11.1.min.js') ?>
        <?= Helper\js('assets/js/jquery-ui-1.10.4.custom.min.js') ?>
        <?= Helper\js('assets/js/jquery.ui.touch-punch.min.js') ?>
        <?= Helper\js('assets/js/chosen.jquery.min.js') ?>
        <?= Helper\js('assets/js/app.js') ?>

        <?= Helper\css('assets/css/app.css') ?>
        <?= Helper\css('assets/css/font-awesome.min.css') ?>
        <?= Helper\css('assets/css/jquery-ui-1.10.4.custom.css'); ?>
        <?= Helper\css('assets/css/chosen.min.css'); ?>

        <link rel="icon" type="image/png" href="assets/img/favicon.png">
        <link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
        <link rel="apple-touch-icon" sizes="72x72" href="assets/img/touch-icon-ipad.png">
        <link rel="apple-touch-icon" sizes="114x114" href="assets/img/touch-icon-iphone-retina.png">
        <link rel="apple-touch-icon" sizes="144x144" href="assets/img/touch-icon-ipad-retina.png">

        <title><?= isset($title) ? Helper\escape($title).' - Kanboard' : 'Kanboard' ?></title>
        <?php if (isset($auto_refresh)): ?>
            <meta http-equiv="refresh" content="<?= BOARD_PUBLIC_CHECK_INTERVAL ?>" >
        <?php endif ?>
    </head>
    <body>
    <?php if (isset($no_layout)): ?>
        <?= $content_for_layout ?>
    <?php else: ?>
        <header>
            <nav>
                <a class="logo" href="?">kanboard</a>

                <ul>
                    <?php if (isset($board_selector)): ?>
                    <li>
                        <select id="board-selector" data-placeholder="<?= t('Display another project') ?>">
                            <option value=""></option>
                            <?php foreach($board_selector as $board_id => $board_name): ?>
                                <option value="<?= $board_id ?>"><?= Helper\escape($board_name) ?></option>
                            <?php endforeach ?>
                        </select>
                    </li>
                    <?php endif ?>
                    <li <?= isset($menu) && $menu === 'boards' ? 'class="active"' : '' ?>>
                        <a href="?controller=board"><?= t('Boards') ?></a>
                    </li>
                    <li <?= isset($menu) && $menu === 'projects' ? 'class="active"' : '' ?>>
                        <a href="?controller=project"><?= t('Projects') ?></a>
                    </li>
                    <li <?= isset($menu) && $menu === 'users' ? 'class="active"' : '' ?>>
                        <a href="?controller=user"><?= t('Users') ?></a>
                    </li>
                    <li <?= isset($menu) && $menu === 'config' ? 'class="active"' : '' ?>>
                        <a href="?controller=config"><?= t('Settings') ?></a>
                    </li>
                    <li>
                        <a href="?controller=user&amp;action=logout<?= Helper\param_csrf() ?>"><?= t('Logout') ?></a>
                        (<?= Helper\escape(Helper\get_username()) ?>)
                    </li>
                </ul>
            </nav>
        </header>
        <section class="page">
            <?= Helper\flash('<div class="alert alert-success alert-fade-out">%s</div>') ?>
            <?= Helper\flash_error('<div class="alert alert-error">%s</div>') ?>
            <?= $content_for_layout ?>
         </section>
     <?php endif ?>
    </body>
</html>