formwork/admin/views/admin.php

93 lines
3.7 KiB
PHP
Raw Normal View History

2018-06-16 16:41:58 +02:00
<!DOCTYPE html>
<html>
<head>
<title><?php if (!empty($title)): ?><?= $title ?> | <?php endif; ?>Formwork Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2019-05-09 14:24:43 +02:00
<meta name="robots" content="noindex, nofollow">
<?php
2018-08-27 20:17:00 +02:00
if (isset($csrfToken)):
?>
<meta name="csrf-token" content="<?= $csrfToken ?>">
<?php
endif;
2018-07-02 00:32:08 +02:00
?>
<?php
if ($notification = $this->notification()):
?>
<meta name="notification" content="<?= $notification['text']?>" data-type="<?= $notification['type']?>" data-interval="5000">
<?php
endif;
?>
2019-04-10 21:57:51 +02:00
<link rel="shortcut icon" href="<?= $this->assets()->uri('images/icon.png') ?>">
<link rel="stylesheet" href="<?= $this->assets()->uri('css/admin.min.css', true) ?>">
<script src="<?= $this->assets()->uri('js/app.min.js', true) ?>"></script>
<script>Formwork.config = <?= json_encode($appConfig) ?>;</script>
2018-06-16 16:41:58 +02:00
</head>
<body>
2019-04-19 15:38:32 +02:00
<button type="button" class="toggle-navigation hide-from-s"><i class="i-bars"></i></button>
2018-06-23 10:19:49 +02:00
<div class="sidebar show-from-s">
2020-02-27 22:50:09 +01:00
<div class="logo"><a href="<?= $this->uri('/dashboard/') ?>"><img src="<?= $this->assets()->uri('images/icon.png') ?>" alt=""> Formwork</a></div>
2019-10-14 22:45:32 +02:00
<a href="<?= $this->uri('/users/' . $admin->user()->username() . '/profile/') ?>">
2018-06-27 16:13:52 +02:00
<div class="admin-user-card">
<div class="admin-user-avatar">
2019-10-14 22:45:32 +02:00
<img src="<?= $admin->user()->avatar()->uri() ?>" alt="">
2018-06-27 16:13:52 +02:00
</div>
<div class="admin-user-details">
2019-10-14 22:45:32 +02:00
<div class="admin-user-fullname"><?= $this->escape($admin->user()->fullname()) ?></div>
<div class="admin-user-username"><?= $this->escape($admin->user()->username()) ?></div>
2018-06-27 16:13:52 +02:00
</div>
2018-06-16 17:49:27 +02:00
</div>
</a>
2018-06-27 16:13:52 +02:00
<div class="sidebar-wrapper">
<h3 class="caption"><?= $this->label('admin.manage') ?></h3>
<ul class="sidebar-navigation">
<?php
2019-10-14 22:45:32 +02:00
if ($admin->user()->permissions()->has('dashboard')):
?>
2018-09-10 21:05:27 +02:00
<li class="<?= ($location === 'dashboard') ? 'active' : '' ?>">
2018-06-27 16:13:52 +02:00
<a href="<?= $this->uri('/dashboard/') ?>"><?= $this->label('dashboard.dashboard') ?></a>
</li>
<?php
endif;
2019-10-14 22:45:32 +02:00
if ($admin->user()->permissions()->has('pages')):
?>
2018-09-10 21:05:27 +02:00
<li class="<?= ($location === 'pages') ? 'active' : '' ?>">
2018-06-27 16:13:52 +02:00
<a href="<?= $this->uri('/pages/') ?>"><?= $this->label('pages.pages') ?></a>
</li>
<?php
endif;
2019-10-14 22:45:32 +02:00
if ($admin->user()->permissions()->has('options')):
?>
2018-09-10 21:05:27 +02:00
<li class="<?= ($location === 'options') ? 'active' : '' ?>">
2018-06-27 16:13:52 +02:00
<a href="<?= $this->uri('/options/') ?>"><?= $this->label('options.options') ?></a>
</li>
<?php
endif;
2019-10-14 22:45:32 +02:00
if ($admin->user()->permissions()->has('users')):
?>
2018-09-10 21:05:27 +02:00
<li class="<?= ($location === 'users') ? 'active' : '' ?>">
2018-06-27 16:13:52 +02:00
<a href="<?= $this->uri('/users/') ?>"><?= $this->label('users.users') ?></a>
</li>
<?php
endif;
?>
2018-06-27 16:13:52 +02:00
<li>
<a href="<?= $this->uri('/logout/') ?>"><?= $this->label('login.logout') ?></a>
</li>
</ul>
</div>
2018-06-16 17:49:27 +02:00
</div>
<div class="title-bar">
<span class="panel-title"><?= $this->label('admin.panel') ?></span>
<a href="<?= $this->siteUri() ?>" class="view-site" target="_blank"><span class="show-from-xs"><?= $this->label('admin.view-site') ?></span> <i class="i-external-link-square"></i></a>
</div>
2018-06-16 16:41:58 +02:00
<main class="main">
2018-06-16 17:49:27 +02:00
<?= $content ?>
</main>
2019-10-14 22:45:32 +02:00
<?= $modals ?>
2018-06-16 16:41:58 +02:00
</body>
</html>