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