153 lines
14 KiB
Twig
153 lines
14 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="de-DE">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<title>PSC Admin</title>
|
|
<meta name="description" content="">
|
|
<meta name="author" content="">
|
|
<base href="{{ app.request.getBaseURL() }}/"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<script>
|
|
var jwt_token = '{{tokenService.generateToken()}}';
|
|
</script>
|
|
{% block stylesheets %}
|
|
{% endblock %}
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
|
|
<link rel="apple-touch-icon" sizes="57x57" href="/apps/icons/apple-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/apps/icons/apple-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/apps/icons/apple-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/apps/icons/apple-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/apps/icons/apple-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/apps/icons/apple-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/apps/icons/apps/icons/apple-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/apps/icons/apple-icon-152x152.png"><link rel="apple-touch-icon" sizes="180x180" href="/apps/icons/apple-icon-180x180.png"><link rel="icon" type="image/png" sizes="192x192" href="/apps/icons/android-icon-192x192.png"><link rel="icon" type="image/png" sizes="32x32" href="/apps/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="96x96" href="/apps/icons/favicon-96x96.png"><link rel="icon" type="image/png" sizes="16x16" href="/apps/icons/favicon-16x16.png"><link rel="manifest" href="/apps/icons/manifest.json"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/apps/icons/ms-icon-144x144.png"><meta name="theme-color" content="#ffffff">
|
|
|
|
|
|
</head>
|
|
<body class="min-h-screen bg-slate-100 text-gray-900 overflow-y-auto dark:text-gray-100 dark:bg-gray-900 antialiased">
|
|
<div class="flex h-full w-full overflow-x-clip">
|
|
<div x-data x-show="$store.sideBar.isOpen" x-transition.opacity.500ms="" @click="$store.sideBar.close()" class="fixed inset-0 z-20 w-full h-full bg-gray-900/50 lg:hidden"></div>
|
|
<aside x-data :class="$store.sideBar.isOpen ? 'translate-x-0 max-w-[20em] shadow-2xl lg:max-w-[var(--sidebar-width)]' : '-translate-x-full lg:translate-x-0 lg:max-w-[var(--collapsed-sidebar-width)] lg:shadow-2xl rtl:lg:-translate-x-0 rtl:translate-x-full'" class="fixed inset-y-0 left-0 z-20 flex h-screen flex-col overflow-hidden w-[var(--sidebar-width)] bg-white transition-all rtl:left-auto rtl:right-0 lg:z-0 lg:border-r rtl:lg:border-l rtl:lg:border-r-0 dark:bg-gray-800 dark:border-gray-700 -translate-x-full lg:translate-x-0 lg:shadow-2xl rtl:lg:-translate-x-0 rtl:translate-x-full">
|
|
<header class="border-b h-[4rem] shrink-0 flex items-center justify-center relative dark:border-gray-700">
|
|
<div class="flex items-center justify-center px-6 w-full lg:px-4" x-show="$store.sideBar.isOpen || false || false">
|
|
<button x-data type="button" class="shrink-0 hidden lg:flex items-center justify-center w-10 h-10 text-psc-500 rounded-full outline-none hover:bg-gray-500/5 focus:bg-primary-500/10" :aria-label="$store.sideBar.isOpen ? 'Collapse sidebar' : 'Expand sidebar'" @click="$store.sideBar.isOpen ? $store.sideBar.close() : $store.sideBar.open()" x-transition:enter="lg:transition delay-100" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" aria-label="Collapse sidebar">
|
|
<svg class="h-6 w-6" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M20.25 7.5L16 12L20.25 16.5M3.75 12H12M3.75 17.25H16M3.75 6.75H16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
</button>
|
|
<div class="flex w-full relative justify-center">
|
|
<img src="{{ asset('images/logo.png') }}" class="fill-current w-48" alt="PrintshopCreator Logo">
|
|
</div>
|
|
</div>
|
|
<button x-data type="button" class="shrink-0 flex items-center justify-center w-10 h-10 text-psc-500 rounded-full outline-none hover:bg-psc-500/5 focus:bg-primary-500/10" :aria-label="$store.sideBar.isOpen ? 'Collapse sidebar' : 'Expand sidebar'" @click="$store.sideBar.isOpen ? $store.sideBar.close() : $store.sideBar.open()" x-show="(! $store.sideBar.isOpen) && true" x-transition:enter="lg:transition delay-100" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" aria-label="Expand sidebar">
|
|
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path>
|
|
</svg>
|
|
</button>
|
|
</header>
|
|
<nav class="flex-1 py-6 overflow-x-hidden overflow-y-auto">
|
|
|
|
<ul class="px-6 space-y-3">
|
|
<li>
|
|
{{ knp_menu_render('backend.menu.main', {'template': '@PSCBackendDashboard/menu/knp_tailwind_menu.html.twig', 'ancestorClass': 'open', 'currentClass': 'active'}) }}
|
|
</li>
|
|
</ul>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
{{ render(controller('PSC\\System\\SettingsBundle\\Controller\\FtpController::myDataTailwindAction')) }}
|
|
<hr/>
|
|
{% endif %}
|
|
<p class="text-center text-psc">{{ date("now")|date('d.m.Y H:i:s') }}</p>
|
|
</nav>
|
|
</aside>
|
|
<div x-data :class="{'lg:pl-[var(--collapsed-sidebar-width)] rtl:lg:pr-[var(--collapsed-sidebar-width)]': ! $store.sideBar.isOpen,' lg:pl-[var(--sidebar-width)] rtl:lg:pr-[var(--sidebar-width)]': $store.sideBar.isOpen,}" class="flex-col gap-y-6 w-screen flex-1 rtl:lg:pl-0 h-full transition-all" style="display: flex">
|
|
<header class="sticky top-0 z-10 flex h-16 w-full shrink-0 items-center border-b bg-white dark:bg-gray-800 dark:border-gray-700">
|
|
<div class="flex items-center w-full px-2 sm:px-4 md:px-6 lg:px-6">
|
|
<button x-data :aria-label="$store.sideBar.isOpen ? 'Collapse sidebar' : 'Expand sidebar'" @click="$store.sideBar.isOpen ? $store.sideBar.close() : $store.sideBar.open()" class="shrink-0 flex items-center justify-center w-10 h-10 text-psc-500 rounded-full outline-none hover:bg-gray-500/5 focus:bg-primary-500/10 lg:mr-4 rtl:lg:mr-0 rtl:lg:ml-4 lg:hidden" aria-label="Expand sidebar">
|
|
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path>
|
|
</svg>
|
|
</button>
|
|
<div class="flex items-center justify-between flex-1">
|
|
<div class="flex-1 flex flex-col md:flex-row">
|
|
<div class="mr-3">
|
|
{{ render(controller('PSC\\Backend\\DashboardBundle\\Controller\\ShopController::myEditableShopsTailwindAction', { tw: true })) }}
|
|
</div>
|
|
<div class="hidden md:block swarm">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
{% if app.request.locale == 'de_DE' %}
|
|
<a href="{{ app.request.uri }}?_locale=en" class="flex w-full items-center whitespace-nowrap rounded-md p-2 text-sm outline-none hover:text-white focus:text-white hover:bg-psc-500 focus:bg-psc-500">EN</a>
|
|
{% else %}
|
|
<a href="{{ app.request.uri }}?_locale=de" class="flex w-full items-center whitespace-nowrap rounded-md p-2 text-sm outline-none hover:text-white focus:text-white hover:bg-psc-500 focus:bg-psc-500" style="margin-right: 5px;">DE</a>
|
|
{% endif %}
|
|
</div>
|
|
<div x-data="{userMenu: false }">
|
|
<div x-on:click="userMenu = ! userMenu" class="filament-dropdown-trigger cursor-pointer ml-4 rtl:mr-4 rtl:ml-0" aria-expanded="true">
|
|
<button class="block" aria-label="User menu">
|
|
<div class="w-10 h-10 rounded-full bg-gray-200 bg-cover bg-center" style="background-image: url('https://ui-avatars.com/api/?name={{ app.user.email }}&color=FFFFFF&background=111827')"></div>
|
|
</button>
|
|
</div>
|
|
<div x-show="userMenu" class="absolute z-10 w-full divide-y divide-gray-100 rounded-lg bg-white shadow-lg ring-1 ring-black/5 transition max-w-[14rem] right-0 mt-1 mr-2 dark:divide-gray-700 dark:bg-gray-800 dark:ring-white/10 max-w-[14rem]">
|
|
<div class="flex w-full p-3 text-sm">
|
|
<svg class="mr-2 h-5 w-5 rtl:ml-2 rtl:mr-0 text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path>
|
|
</svg>
|
|
<span class="">
|
|
{{ app.user.email }}
|
|
</span>
|
|
</div>
|
|
<div class=" w-full p-3 text-sm">
|
|
<div>
|
|
<button x-data type="button" class="block flex w-full items-center whitespace-nowrap rounded-md p-2 text-sm outline-none hover:text-white focus:text-white hover:bg-psc-500 focus:bg-psc-500" x-show="$store.theme.theme === 'dark'" @click="$store.theme.light()" style="">
|
|
<svg wire:loading.remove.delay="" wire:target="" class="filament-dropdown-list-item-icon mr-2 h-5 w-5 rtl:ml-2 rtl:mr-0 group-hover:text-white group-focus:text-white text-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
|
|
</svg>
|
|
<span class="filament-dropdown-list-item-label truncate w-full text-start">Toggle light mode</span>
|
|
</button>
|
|
<!-- <button x-data type="button" class="block flex w-full items-center whitespace-nowrap rounded-md p-2 text-sm outline-none hover:text-white focus:text-white hover:bg-psc-500 focus:bg-psc-500" x-show="$store.theme.theme === 'light'" @click="$store.theme.dark()" style="">
|
|
<svg wire:loading.remove.delay="" wire:target="" class="filament-dropdown-list-item-icon mr-2 h-5 w-5 rtl:ml-2 rtl:mr-0 group-hover:text-white group-focus:text-white text-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
|
|
</svg>
|
|
<span class="filament-dropdown-list-item-label truncate w-full text-start">Toggle dark mode</span>
|
|
</button>-->
|
|
</div>
|
|
|
|
<a href="{{ path('psc_backend_logout') }}" class="block flex w-full items-center whitespace-nowrap rounded-md p-2 text-sm outline-none hover:text-white focus:text-white hover:bg-psc-500 focus:bg-psc-500" title="Logout">
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="filament-dropdown-list-item-icon mr-2 h-5 w-5 rtl:ml-2 rtl:mr-0 group-hover:text-white group-focus:text-white text-primary-500">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75" />
|
|
</svg>
|
|
|
|
<span class="truncate w-full text-start">{{ 'logout'|trans }}</span></a>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="flex-1 w-full px-4 mx-auto md:px-6 lg:px-8 {% block containerdiv %}{% endblock %}">
|
|
<header class="filament-header space-y-2 items-start justify-between sm:flex sm:space-y-0 sm:space-x-4 sm:rtl:space-x-reverse py-4">
|
|
{% block header %}
|
|
{% endblock %}
|
|
</header>
|
|
|
|
{% block body %}
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% block javascripts %}
|
|
{% endblock %}
|
|
{% block importmap %}{{ importmap('backend/tailwind') }}{% endblock %}
|
|
{% if instanceService.getInstance().supporttoken %}
|
|
<script>
|
|
$.post("{{ instanceService.getInstance().formatedSupportUrl }}/apilogin?shop_uuid={{ instanceService.getShop().uuid|url_encode }}&shop_name={{ instanceService.getShop().title|url_encode }}&user_uuid={{ instanceService.getUser().uuid|url_encode }}&user_name={{ instanceService.getUser().username|url_encode }}&X-AUTH-TOKEN={{ instanceService.getInstance().supporttoken }}&to=bridge", function(msg){
|
|
if(msg != "") {
|
|
$(".swarm").html(msg);
|
|
}
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
</body>
|
|
|
|
</html>
|