templates/bundles/EasyAdminBundle/default/layout.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale|split('_')|first|default('en') }}" dir="{{ easyadmin_config('design.rtl') ? 'rtl' : 'ltr' }}">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="robots" content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate, nocache" />
  7.     <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  8.     <meta name="generator" content="EasyAdmin" />
  9.     <title>{% block page_title %}{{ block('content_title')|striptags|raw }}{% endblock %}</title>
  10.     {% block head_stylesheets %}
  11.         {# <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"> #}
  12.     {% endblock %}
  13.     {% block head_custom_stylesheets %}
  14.         {% for css_asset in easyadmin_config('design.assets.css') %}
  15.             <link rel="stylesheet" href="{{ asset(css_asset) }}">
  16.         {% endfor %}
  17.         <style>
  18.         
  19.             .custom-file-input {
  20.                 z-index: -99999 !important;
  21.             }
  22.     </style>
  23.     {% endblock head_custom_stylesheets %}
  24.     {% if easyadmin_config('design.brand_color') != 'hsl(230, 55%, 60%)' %}
  25.         <style>
  26.             :root { --color-primary: {{ easyadmin_config('design.brand_color') }}; }
  27.         </style>
  28.     {% endif %}
  29.     {% block head_favicon %}
  30.         {% set favicon = easyadmin_config('design.assets.favicon') %}
  31.         <link rel="icon" type="{{ favicon.mime_type }}" href="{{ asset(favicon.path) }}" />
  32.     {% endblock %}
  33.     {% block head_javascript %}
  34.         <script src="{{ asset('bundles/easyadmin/app.js') }}"></script>
  35.     {% endblock head_javascript %}
  36. </head>
  37. {% block body %}
  38.     <body id="{% block body_id %}{% endblock %}" class="easyadmin {% block body_class %}{% endblock %}">
  39.     <script>
  40.         document.body.classList.add(
  41.             'easyadmin-content-width-' + (localStorage.getItem('easyadmin/content/width') || 'normal'),
  42.             'easyadmin-sidebar-width-' + (localStorage.getItem('easyadmin/sidebar/width') || 'normal')
  43.         );
  44.     </script>
  45.     {% block wrapper_wrapper %}
  46.         <div id="main-wrapper" class="mini-sidebar" data-theme="light" data-layout="vertical" data-navbarbg="skin6" data-sidebartype="full"
  47.              data-sidebar-position="fixed" data-header-position="fixed" data-boxed-layout="full">
  48.             {% block wrapper %}
  49.                 <header class="topbar" data-navbarbg="skin6">
  50.                     {% block header %}
  51.                  
  52.                         <nav class="navbar top-navbar navbar-expand-md navbar-light" role="navigation">
  53.                             {# LOGO #}
  54.                             <div data-logobg="skin6" class="navbar-header">
  55.                                 
  56.                                 <div id="header-logo" class="navbar-brand">
  57.                                    
  58.                                     <a class="logo-icon {{ easyadmin_config('site_name')|length > 14 ? 'logo-long' }}" title="{{ easyadmin_config('site_name')|striptags }}" href="{{ path('easyadmin') }}">
  59.                                         <img class="img-fluid" src="{{asset('assets/img/logo-transparent.png')}}" >
  60.                                     </a>
  61.                                         
  62.                                     
  63.                                     {# <span class="logo-text">
  64.                                         <img src="{{ asset('/assets/img/logo-text.png') }}" alt="">
  65.                                     </span> #}
  66.                                 </div>
  67.                                 
  68.                                 
  69.                             </div>
  70.                             
  71.                             <div class="navbar-collapse collapse">
  72.                                 <ul class="navbar-nav float-left mr-auto ml-3 pl-1"></ul>
  73.                                 {% set _user_name = easyadmin_read_property(app.user, easyadmin_config('user.name_property_path'))|default('user.unnamed'|trans(domain = 'EasyAdminBundle')) %}
  74.                                 {% set _logout_path = easyadmin_logout_path() %}
  75.                                 {% set _user_has_logout = _logout_path is not empty %}
  76.                                 {% set _user_is_impersonated = is_granted('ROLE_PREVIOUS_ADMIN') %}
  77.                                 {% block header_custom_menu %}
  78.                                 <ul class="navbar-nav float-right">
  79.                                     <li class="nav-item d-none d-md-block">
  80.                                         <a class="nav-link" href="javascript:void(0)">
  81.                                             {% block listing_search_wrapper %}{% endblock listing_search_wrapper %}
  82.                                         </a>
  83.                                     </li>
  84.                                     <li class="nav-item dropdown">
  85.                                         <a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  86.                                             {% if easyadmin_config('user.display_avatar') %}
  87.                                                 {% set _avatar_image_path = easyadmin_read_property(app.user, easyadmin_config('user.avatar_property_path')) %}
  88.                                                 {% if null == _avatar_image_path %}
  89.                                                     <i class="fa fa-fw {{ app.user is not null ? 'fa-user-circle' : 'fa-user-times' }} user-avatar"></i>
  90.                                                 {% else %}
  91.                                                     <img class="user-avatar" src="{{ _avatar_image_path }}" />
  92.                                                 {% endif %}
  93.                                             {% endif %}
  94.                                             <span class="ml-2 d-none d-lg-inline-block"><span>Hello,</span>
  95.                                                 <span class="text-dark">
  96.                                                     {% if easyadmin_config('user.display_name') %}
  97.                                                         <span class="user-name">{{ _user_name }}</span>
  98.                                                     {% endif %}
  99.                                                 </span>
  100.                                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down svg-icon"><polyline points="6 9 12 15 18 9"></polyline></svg></span>
  101.                                         </a>
  102.                                         {% set _user_menu_content %}
  103.                                             {% block user_menu %}
  104.                                                 {% if _user_has_logout or _user_is_impersonated %}
  105.                                                     <div class="dropdown-menu dropdown-menu-right user-dd">
  106.                                                         {% if _user_has_logout %}
  107.                                                             <a class="dropdown-item" href="{{ _logout_path }}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power svg-icon mr-2 ml-1"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>
  108.                                                                 {{ 'user.signout'|trans(domain = 'EasyAdminBundle') }}</a>
  109.                                                         {% endif %}
  110.                                                         {% if _user_is_impersonated %}
  111.                                                             <a class="user-action user-action-exit-impersonation" href="?_switch_user=_exit">{{ 'user.exit_impersonation'|trans(domain = 'EasyAdminBundle') }}</a>
  112.                                                         {% endif %}
  113.                                                     </div>
  114.                                                 {% endif %}
  115.                                             {% endblock user_menu %}
  116.                                         {% endset %}
  117.                                         {{ _user_menu_content }}
  118.                                     </li>
  119.                                 </ul>
  120.                             </div>
  121.                             {% endblock header_custom_menu %}
  122.                         </nav>
  123.                     {% endblock header %}
  124.                 </header>
  125.                 <aside class="left-sidebar test" data-sidebarbg="skin6">
  126.                     <div class="user-info">
  127.                         <strong>{{'Username'|trans}}</strong> : {{app.user}}
  128.                         <br>
  129.                         <strong>
  130.                             {{'Email'|trans}}
  131.                         </strong> : {{app.user.email}}
  132.                         <br>
  133.                     </div>
  134.                     {% block sidebar %}
  135.                         <div class="scroll-sidebar ps-container ps-theme-default ps-active-y" data-sidebarbg="skin6">
  136.                             {% block main_menu_wrapper %}
  137.                                 {{ include([
  138.                                     _entity_config is defined ? _entity_config.templates.menu,
  139.                                     easyadmin_config('design.templates.menu'),
  140.                                     '@EasyAdmin/default/menu.html.twig'
  141.                                 ]) }}
  142.                             {% endblock main_menu_wrapper %}
  143.                         </div>
  144.                     {% endblock sidebar %}
  145.                 </aside>
  146.                 <div class="page-wrapper">
  147.                     {% block flash_messages %}
  148.                         {{ include(_entity_config is defined ? _entity_config.templates.flash_messages : '@EasyAdmin/default/flash_messages.html.twig') }}
  149.                     {% endblock flash_messages %}
  150.                     {% block content_header_wrapper %}
  151.                         {% set _has_content_help = _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  152.                         {% block content_header %}
  153.                         <div class="page-breadcrumb">
  154.                             <div class="row">
  155.                                 <div class="col-5">
  156.                                     <h3 class="page-title text-truncate text-dark font-weight-medium mb-1">{% block content_title %}{% endblock %}</h3>
  157.                                     <div class="d-flex align-items-center">
  158.                                         <nav aria-label="breadcrumb">
  159.                                             <ol class="breadcrumb m-0 p-0">
  160.                                                 {% if _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  161.                                                     <li class="breadcrumb-item">
  162.                                                         <a>{{ _entity_config[app.request.query.get('action')]['help']|trans(domain = _entity_config.translation_domain)|raw }}</a>
  163.                                                     </li>
  164.                                                 {% endif %}
  165.                                             </ol>
  166.                                         </nav>
  167.                                     </div>
  168.                                 </div>
  169.                                 <div class="col-7">
  170.                                     {% block global_actions_wrapper %}
  171.                                         <div class="global-actions">{% block global_actions %}{% endblock %}</div>
  172.                                     {% endblock %}
  173.                                 </div>
  174.                             </div>
  175.                         </div>
  176.                         {% endblock content_header %}
  177.                     {% endblock content_header_wrapper %}
  178.                     {% block content %}
  179.                         <div class="container-fluid">
  180.                             <div class="row">
  181.                                 <div class="col-lg-12">
  182.                                     <div class="card">
  183.                                         <div class="card-body">
  184.                                             <section id="main" class="content-body">
  185.                                                 {% block main %}{% endblock %}
  186.                                             </section>
  187.                                         </div>
  188.                                         {% block content_footer_wrapper %}
  189.                                             <div class="card-footer">
  190.                                                 {% block content_footer %}{% endblock %}
  191.                                             </div>
  192.                                         {% endblock %}
  193.                                     </div>
  194.                                 </div>
  195.                             </div>
  196.                         </div>
  197.                     {% endblock content %}
  198.                 </div>
  199.             {% endblock wrapper %}
  200.         </div>
  201.     {% endblock wrapper_wrapper %}
  202.     {% block body_javascript %}{% endblock body_javascript %}
  203.     {% block body_custom_javascript %}
  204.         {# <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script> #}
  205.         {% for js_asset in easyadmin_config('design.assets.js') %}
  206.             <script src="{{ asset(js_asset) }}"></script>
  207.         {% endfor %}
  208.         <script>
  209.             var ejecutarEscucha = null;
  210.             function setearEscucha(){
  211.                 var ejecutarEscucha = null;
  212.                 ejecutarEscucha = function (){
  213.                     $(".input-file-container").click(function(event){
  214.                         if (isDoubleClicked($(this))){
  215.                             console.log(1)                        
  216.                         }else{
  217.                             $(this).children("input")[0].click()
  218.                         }
  219.                     });
  220.                 
  221.                 }
  222.                 ejecutarEscucha();
  223.             }
  224.             setearEscucha()
  225.             function isDoubleClicked(element) {
  226.                 //if already clicked return TRUE to indicate this click is not allowed
  227.                 if (element.data("isclicked")) return true;
  228.                 //mark as clicked for 1 second
  229.                 element.data("isclicked", true);
  230.                 setTimeout(function () {
  231.                     element.removeData("isclicked");
  232.                 }, 1000);
  233.                 //return FALSE to indicate this click was allowed
  234.                 return false;
  235.             }
  236.         </script>
  237.     {% endblock body_custom_javascript %}
  238.     </body>
  239. {% endblock body %}
  240. </html>