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