xref: /webtrees/resources/views/layouts/administration.phtml (revision 84586c024c68dbfa3b15df636ed2b74037428442)
1<?php use Fisharebest\Webtrees\DebugBar; ?>
2<?php use Fisharebest\Webtrees\FlashMessages; ?>
3<?php use Fisharebest\Webtrees\I18N; ?>
4<?php use Fisharebest\Webtrees\View; ?>
5<!DOCTYPE html>
6<html <?= I18N::htmlAttributes() ?>>
7    <head>
8        <meta charset="UTF-8">
9        <meta name="viewport" content="width=device-width, initial-scale=1">
10        <meta name="csrf" content="<?= e(csrf_token()) ?>">
11
12        <title><?= $title ?></title>
13
14        <link rel="icon" href="favicon.ico" type="image/x-icon">
15
16        <?php if (I18N::direction() === 'rtl') : ?>
17            <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor-rtl.css') ?>">
18        <?php else : ?>
19            <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/vendor.css') ?>">
20        <?php endif ?>
21        <link rel="stylesheet" type="text/css" href="<?= e(WT_ASSETS_URL . 'css/administration.css') ?>">
22
23        <?= View::stack('styles') ?>
24
25        <?= DebugBar::renderHead() ?>
26    </head>
27    <body class="container wt-global">
28        <header>
29            <div class="wt-accessibility-links">
30                <a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content">
31                    <?= /* I18N: Skip over the headers and menus, to the main content of the page */ I18N::translate('Skip to content') ?>
32                </a>
33            </div>
34
35            <ul class="nav small d-flex justify-content-end">
36                <li class="nav-item menu-mypage">
37                    <a class="nav-link active" href="<?= e(route('user-page')) ?>"><?= I18N::translate('My page') ?></a>
38                </li>
39                <li class="nav-item dropdown menu-language">
40                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
41                        <?= I18N::translate('Language') ?>
42                    </a>
43                    <div class="dropdown-menu">
44                        <?php foreach (I18N::activeLocales() as $locale) : ?>
45                            <a class="dropdown-item menu-language-<?= $locale->languageTag() ?> <?= WT_LOCALE === $locale->languageTag() ? ' active' : ''?>" data-language="<?= $locale->languageTag() ?>" href="#"><?= $locale->endonym() ?></a>
46                        <?php endforeach ?>
47                    </div>
48                </li>
49                <li class="nav-item menu-logout">
50                    <a class="nav-link" href="<?= e(route('logout')) ?>"><?= I18N::translate('Sign out') ?></a>
51                </li>
52            </ul>
53        </header>
54
55        <div id="content"></div>
56
57        <?php foreach (FlashMessages::getMessages() as $message) : ?>
58            <div class="alert alert-<?= $message->status ?> alert-dismissible" role="alert">
59                <button type="button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>">
60                    <span aria-hidden="true">&times;</span>
61                </button>
62                <?= $message->text ?>
63            </div>
64        <?php endforeach ?>
65
66        <?= $content ?>
67
68        <script src="<?= e(WT_ASSETS_URL . 'js/vendor.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/vendor.js') ?>"></script>
69        <script src="<?= e(WT_ASSETS_URL . 'js/webtrees.js') ?>?<?= filemtime(WT_ROOT . WT_ASSETS_URL . 'js/webtrees.js') ?>"></script>
70
71        <?= View::stack('javascript') ?>
72
73        <?= DebugBar::render() ?>
74    </body>
75</html>
76