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