src/Application/Internit/ContentBundle/Resources/views/template/standard_layout.html.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <[email protected]>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {%- set _preview = block('preview') is defined ? block('preview')|trim : null %}
  8. {% set _form = block('form') is defined ? block('form')|trim : null %}
  9. {% set _show = block('show') is defined ? block('show')|trim : null %}
  10. {% set _list_table = block('list_table') is defined ? block('list_table')|trim : null %}
  11. {% set _list_filters = block('list_filters') is defined ? block('list_filters')|trim : null %}
  12. {% set _tab_menu = block('tab_menu') is defined ? block('tab_menu')|trim : null %}
  13. {% set _content = block('content') is defined ? block('content')|trim : null %}
  14. {% set _title = block('title') is defined ? block('title')|trim : null %}
  15. {% set _breadcrumb = block('breadcrumb') is defined ? block('breadcrumb')|trim : null %}
  16. {% set _actions = block('actions') is defined ? block('actions')|trim : null %}
  17. {% set _navbar_title = block('navbar_title') is defined ? block('navbar_title')|trim : null %}
  18. {% set _list_filters_actions = block('list_filters_actions') is defined ? block('list_filters_actions')|trim : null -%}
  19. <!DOCTYPE html>
  20. <html {% block html_attributes %}class="no-js"{% endblock %}>
  21.     <head>
  22.         <link rel="shortcut icon" href="{{ asset('bundles/applicationinternitcontent/images/favicon.png') }}">
  23.         {% block meta_tags %}
  24.             <meta http-equiv="X-UA-Compatible" content="IE=edge">
  25.             <meta charset="UTF-8">
  26.             <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  27.         {% endblock %}
  28.         <meta data-sonata-admin='{{ {
  29.             config: {
  30.                 CONFIRM_EXIT: sonata_admin.adminPool.getOption('confirm_exit'),
  31.                 USE_SELECT2: sonata_admin.adminPool.getOption('use_select2'),
  32.                 USE_ICHECK: sonata_admin.adminPool.getOption('use_icheck'),
  33.                 USE_STICKYFORMS: sonata_admin.adminPool.getOption('use_stickyforms'),
  34.                 DEBUG: sonata_admin.adminPool.getOption('js_debug'),
  35.             },
  36.             translations: {
  37.                 CONFIRM_EXIT: 'confirm_exit'|trans({}, 'SonataAdminBundle'),
  38.             },
  39.         }|json_encode()|raw }}'
  40.         >
  41.         {% block stylesheets %}
  42.             <link href="https://fonts.googleapis.com/css?family=Muli:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&display=swap" rel="stylesheet">
  43.             {% for stylesheet in sonata_admin.adminPool.getOption('stylesheets', []) %}
  44.                 <link rel="stylesheet" href="{{ asset(stylesheet) }}">
  45.             {% endfor %}
  46.         {% endblock %}
  47.         {% block javascripts %}
  48.             {% block sonata_javascript_config %}
  49.             {% endblock %}
  50.             {% block sonata_javascript_pool %}
  51.                 {% for javascript in sonata_admin.adminPool.getOption('javascripts', []) %}
  52.                     <script src="{{ asset(javascript) }}"></script>
  53.                 {% endfor %}
  54.             {% endblock %}
  55.             {# localize moment #}
  56.             {% set localeForMoment = canonicalize_locale_for_moment() %}
  57.             {% if localeForMoment %}
  58.                 <script src="{{ asset(
  59.                     'bundles/sonatacore/vendor/moment/locale/' ~
  60.                     localeForMoment ~
  61.                     '.js'
  62.                 ) }}"></script>
  63.             {% endif %}
  64.             {# localize select2 #}
  65.             {#
  66.             {% if sonata_admin.adminPool.getOption('use_select2') %}
  67.                 {% set localeForSelect2 = canonicalize_locale_for_select2() %}
  68.                 {% if localeForSelect2 %}
  69.                     <script src="{{ asset('bundles/sonatacore/vendor/select2/select2_locale_' ~ localeForSelect2 ~ '.js') }}"></script>
  70.                 {% endif %}
  71.             {% endif %}
  72.             #}
  73.             <script type="text/javascript" src="{{ asset('bundles/applicationinternitproposal/js/vue.min.js') }}"></script>
  74.         <!-- <script type="text/javascript" src="{{ asset('bundles/applicationinternitproposal/js/vueDev.js') }}"></script>-->
  75.         {% endblock %}
  76.         <title>
  77.         {% block sonata_head_title %}
  78.             {{ 'Admin'|trans({}, 'SonataAdminBundle') }}
  79.             {% if _title is not empty %}
  80.                 {{ _title|striptags|raw }}
  81.             {% else %}
  82.                 {% if action is defined %}
  83.                     -
  84.                     {% for menu in breadcrumbs_builder.breadcrumbs(admin, action) %}
  85.                         {% if not loop.first %}
  86.                             {% if loop.index != 2 %}
  87.                                 &gt;
  88.                             {% endif %}
  89.                             {%- set translation_domain = menu.extra('translation_domain', 'messages') -%}
  90.                             {%- set label = menu.label -%}
  91.                             {%- if translation_domain is not same as(false) -%}
  92.                                 {%- set label = label|trans(menu.extra('translation_params', {}), translation_domain) -%}
  93.                             {%- endif -%}
  94.                             {{ label }}
  95.                         {% endif %}
  96.                     {% endfor %}
  97.                 {% endif %}
  98.             {% endif %}
  99.         {% endblock %}
  100.         </title>
  101.     </head>
  102.     <body
  103.             {% block body_attributes -%}
  104.                 class="sonata-bc skin-black fixed
  105.                 {% if app.request.cookies.get('sonata_sidebar_hide') -%}
  106.                     sidebar-collapse
  107.                 {%- endif -%}"
  108.             {%- endblock -%}
  109.     >
  110.     <div >
  111.     <div class="wrapper">
  112.         {% block sonata_left_side %}
  113.             {# active or '' #}
  114.             <aside class="main-sidebar active" style="background-image: linear-gradient(#B01618, #B01618);">
  115.               {% block logo %}
  116.                   {% spaceless %}
  117.                       <a class="logo" href="{{ path('sonata_admin_dashboard') }}">
  118.                           <img src="{{ asset('img/logo-calper.jpg') }}" alt="Internit Logo" style="max-width: 130px !important; width: 130px !important;">
  119.                       </a>
  120.                   {% endspaceless %}
  121.               {% endblock %}
  122.                 <section class="sidebar">
  123.                     {% block sonata_side_nav %}
  124.                         {# {% block side_bar_before_nav %} {% endblock %}
  125.                         {% block side_bar_nav %}
  126.                             {{ knp_menu_render('sonata_admin_sidebar', {template: get_global_template('knp_menu_template')}) }}
  127.                         {% endblock side_bar_nav %} #}
  128.                         <ul class="sidebar-menu" style="overflow-y: auto;">
  129.                            <span id="tooltipNew" style="background-color: #4A0D0E;"></span>
  130.                           <li class="treeview  first {#content-submenu#}">
  131.                             
  132.                             <a href="{{ path('sonata_admin_dashboard') }}" class="">
  133.                               <i class="fas fa-home"></i>
  134.                               <span>Home</span>
  135.                             </a>
  136.                           {#
  137.                             <ul class="sidebar-submenu">
  138.                               <li class="subitem">
  139.                                 <a href="#">
  140.                                   <span>Nome</spam>
  141.                                 </a>
  142.                               </li>
  143.                               <li class="subitem">
  144.                                 <a href="#">
  145.                                   <span>Nome</spam>
  146.                                 </a>
  147.                               </li>
  148.                               <li class="subitem">
  149.                                 <a href="#">
  150.                                   <span>Nome</spam>
  151.                                 </a>
  152.                               </li>
  153.                             </ul>
  154.                             #}
  155.                           </li>
  156.                           {# {% if is_granted('ROLE_CORRETOR') == true %}
  157.                             <li class="treeview">
  158.                               <a href="{{ path('admin_internit_commission_commission_commission') }}" class="" title="Configurações">
  159.                                 <i class="fas fa-cog"></i>
  160.                                 <span>Comissões</span>
  161.                               </a>                             
  162.                             </li>
  163.                           {% endif %}
  164.                           {% if is_granted('ROLE_IMOBILIARIA') == true %}
  165.                             <li class="treeview">
  166.                               <a href="{{ path('admin_internit_commission_commission_receivement') }}" class="" title="Configurações">
  167.                                 <i class="fas fa-cog"></i>
  168.                                 <span>Recebimentos</span>
  169.                               </a>                             
  170.                             </li>
  171.                           {% endif %}
  172.                           {% if is_granted('ROLE_CONSTRUTORA') == true %}
  173.                             <li class="treeview">
  174.                               <a href="{{ path('admin_internit_commission_commission_payment') }}" class="" title="Configurações">
  175.                                 <i class="fas fa-cog"></i>
  176.                                 <span>Pagamentos</span>
  177.                               </a>                             
  178.                             </li>
  179.                           {% endif %} #}
  180.                           {#
  181.                           <li class="treeview">
  182.                             <a href="/admin/sonata/user/group/list" class="">
  183.                               <i class="fas fa-cog"></i>
  184.                               <span>Grupos</span>
  185.                             </a>
  186.                           </li>
  187.                           #}
  188.                           {% if is_granted('ROLE_CORRETOR') == true %}
  189.                           {#<li class="treeview">
  190.                             <a href="{{ path('admin_internit_realestate_realty_list') }}" class="">
  191.                               <i class="fas fa-building"></i>
  192.                               <span>Empreendimentos</span>
  193.                             </a>
  194.                           </li>#}
  195.                           {% endif %}
  196.                           {% if is_granted('ROLE_IMOBILIARIA') == true %}
  197.                           <li class="treeview last">
  198.                             <a href="{{ path('admin_internit_realestate_realestate_list') }}" class="">
  199.                               <i class="fas fa-hotel"></i>
  200.                               <span>Imobiliárias</span>
  201.                             </a>
  202.                           </li>
  203.                           {% endif %}
  204.                           {% if is_granted('ROLE_IMOBILIARIA') == true %}
  205.                           <li class="treeview last">
  206.                             <a href="{{ path('admin_sonata_user_user_list') }}" class="">
  207.                               <i class="fas fa-user-tie"></i>
  208.                               <span>Usuários</span>
  209.                             </a>
  210.                           </li>
  211.                           {% endif %}
  212.                           {#{% if is_granted('ROLE_CORRETOR') == true %}
  213.                           <li class="treeview">
  214.                             <a href="{{ path('admin_internit_realestate_realty_listMirror') }}" class="" >
  215.                               <i class="fas fa-search-dollar"></i>
  216.                               <span>Espelho de vendas</span>
  217.                             </a>
  218.                           </li>
  219.                           {% endif %}#}
  220.                         {#  <li class="treeview">
  221.                             <a href="{{ path('admin_internit_proposal_proposal_realtyList') }}" class="">
  222.                               <i class="fas fa-file-alt"></i>
  223.                               <span>Propostas</span>
  224.                             </a>
  225.                           </li>#}
  226.                {#           <li class="treeview">
  227.                             <a href="{{ path('admin_internit_requestkey_requestkey_createRequest') }}" class="">
  228.                               <i class="fas fa-key"></i>
  229.                               <span>Solicitar Chave</span>
  230.                             </a>
  231.                           </li>   #}
  232.                           {% if is_granted('ROLE_CONSTRUTORA') == true %}
  233.                           <li class="treeview last">
  234.                             <a href="{{ path('admin_internit_lead_product_list') }}" class=" " title="Leads">
  235.                               <i class="fas fa-address-card"></i>
  236.                               <span>Leads</span>
  237.                             </a>
  238.                           </li>
  239.                           {% endif %}
  240.                {#           {% if is_granted('ROLE_CONSTRUTORA') == true %}
  241.                           <li class="treeview last">
  242.                             <a href="{{ path('admin_internit_chatbotlead_product_list') }}" class=" " title="Leads">
  243.                               <i class="fas fa-robot"></i>
  244.                               <span>Leads do Chatbot</span>
  245.                             </a>
  246.                           </li>
  247.                           {% endif %}   #}
  248.                           {% if 'ROLE_IMOBILIARIA' in app.user.roles %}
  249.                           <li class="treeview">
  250.                             <a class="" 
  251.                               href="{{ path('admin_internit_lead_realestateemail_list') }}" title="E-mails para leads">
  252.                               <i class="fas fa-address-book"></i>
  253.                               <span>E-mails de leads das imobiliárias</span>
  254.                             </a>
  255.                           </li>
  256.                           {% endif %}
  257.                        {#   <li class="treeview">
  258.                             <a href="{{ path('admin_internit_salesgoal_salesgoal_showSalesGoal') }}" class="">
  259.                               <i class="fas fa-chart-line"></i>
  260.                               <span>Metas de Vendas</span>
  261.                             </a>
  262.                           </li> #}
  263.                       {#    <li class="treeview">
  264.                             <a href="{{ path('admin_internit_ranking_ranking_showRanking') }}" class="">
  265.                               <i class="fas fa-medal"></i>
  266.                               <span>Ranking</span>
  267.                             </a>
  268.                           </li>#}
  269.                    {#      <li class="treeview">
  270.                             <a href="{{ path('admin_internit_contact_contactus_create') }}" class="" title="Fale Conosco">
  271.                               <i class="fas fa-headset"></i>
  272.                               <span>Fale Conosco</span>
  273.                             </a>
  274.                           </li>#}
  275.                        {#   {% if is_granted('ROLE_CORRETOR') == true %}
  276.                           <li class="treeview">
  277.                             <a href="{{ path('admin_internit_client_client_list') }}" class="" title="Cadastrar Cliente">
  278.                               <i class="fas fa-user-plus"></i>
  279.                               <span>Clientes</span>
  280.                             </a>
  281.                           </li>
  282.                           {% endif %}#}
  283.                           
  284.                           {#{% if is_granted('ROLE_IMOBILIARIA') == true %}#}
  285.                            {# <li class="treeview">
  286.                               <a href="{{ path('admin_internit_quiz_quiz_view') }}" class="" title="Quiz">
  287.                                 <i class="fas fa-trophy"></i>
  288.                                 <span>Quiz</span>
  289.                               </a>
  290.                             </li>#}
  291.                           {#{% endif %}#}
  292.                         {#  {% if is_granted('ROLE_CONSTRUTORA') == true %}
  293.                           <li class="treeview last">
  294.                             <a href="{{ path('admin_internit_communication_communication_create') }}" class=" " title="Comunicados">
  295.                               <i class="fas fa-envelope"></i>
  296.                               <span>Comunicados</span>
  297.                             </a>
  298.                           </li>
  299.                           {% endif %}#}
  300.                    {#       {% if is_granted('ROLE_CONSTRUTORA') == true %}
  301.                             <li class="treeview">
  302.                               <a href="/admin/internit/learningresource/learningresource/list" class="" title="EAD">
  303.                                 <i class="fas fa-book"></i>
  304.                                 <span>EAD</span>
  305.                               </a>                             
  306.                             </li>
  307.                           {% endif %}#} 
  308.                           {# O método hasRole foi criado para verificar se um User tem o ROLE específico.
  309.                             A função is_granted é parte do framework e verifica se o User tem o ROLE específico OU 
  310.                             que esteja em uma posição maior na hierarquia. #}
  311.                           {% if app.user.hasRole(['ROLE_CONSTRUTORA']) %}
  312.                             <li class="treeview">
  313.                               <a href="/admin/internit/builder/builder/create" class="" title="Construtora">
  314.                                 <i class="fas fa-pencil-ruler"></i>
  315.                                 <span>Construtora</span>
  316.                               </a>                             
  317.                             </li>
  318.                           {% endif %}
  319.                           {% if app.user.hasRole(['ROLE_CONSTRUTORA']) %}
  320.                             <li class="treeview">
  321.                               <a href="/admin/internit/setting/setting/1/edit" class="" title="Configurações">
  322.                                 <i class="fas fa-cog"></i>
  323.                                 <span>Configurações</span>
  324.                               </a>                             
  325.                             </li>
  326.                           {% endif %}
  327.                         </ul>
  328.                     {% endblock sonata_side_nav %}
  329.                 </section>
  330.             </aside>
  331.         {% endblock sonata_left_side %}
  332.         {% block sonata_wrapper %}
  333.           <div  class="conteudo">
  334.             {% block sonata_header %}
  335.             <header class="header">
  336.               {% block sonata_header_noscript_warning %}
  337.               <noscript>
  338.                 <div class="noscript-warning">
  339.                   {{ 'noscript_warning'|trans({}, 'SonataAdminBundle') }}
  340.                 </div>
  341.               </noscript>
  342.               {% endblock %}
  343.               {% block sonata_nav %}
  344.               <nav class="navbar navbar-static-top" role="navigation">
  345.                   {#
  346.                       {{ app.session.get('menuOption') }}
  347.                       {{ app.session.set('menuOption', 0) }}
  348.                   #}
  349.                   {# class active #}
  350.                 <a href="javascript:;" class="toggleMenu active" role="button" title="Menu">
  351.                   <span></span>
  352.                   <span></span>
  353.                   <span></span>
  354.                 </a>
  355.                 <div class="mark-beta"><h5> Versão Beta</h5></div>
  356.                 {% block sonata_top_nav_menu %}
  357.                 {#% if app.user and is_granted(sonata_admin.adminPool.getOption('role_admin')) %#}
  358.                 <div class="navbar-custom-menu">
  359.                   <ul class="nav navbar-nav">
  360.                     {% block sonata_top_nav_menu_add_block %}
  361.                   {#  <li class="dropdown notificacao">
  362.                       <a class="dropdown-toggle" href="{{ path('admin_internit_communication_communication_showCommunication') }}">
  363.                         <i class="fas fa-envelope"></i> <!--span class="number">0</span-->
  364.                       </a>
  365.                     </li>#}
  366.                     {% endblock %}
  367.                     {% block sonata_top_nav_menu_user_block %}
  368.                     <li class="dropdown user-menu">
  369.                       <a class="dropdown-toggle" data-toggle="dropdown" href="#">
  370.                         <span>{{app.user.getFirstname()}}</span>
  371.                       </a>
  372.                       <ul class="dropdown-menu dropdown-user">
  373.                         {#% include get_global_template('user_block') %#}
  374.                         <li class="dropdown user-menu open">
  375.                           <ul class="dropdown-menu dropdown-user">
  376.                             <li class="user-footer">
  377.                                 <div class="pull-left">
  378.                                     <a href="/admin/sonata/user/user/{{ app.user.id }}/edit" class="btn btn-default btn-flat"><i class="fa fa-user"></i> Perfil</a>
  379.                                 </div>
  380.                                 <div class="pull-right">
  381.                                     <a href="/admin/logout" class="btn btn-default btn-flat"><i class="fas fa-sign-out-alt"></i> Sair</a>
  382.                                 </div>
  383.                             </li>
  384.                           </ul>
  385.                         </li>
  386.                       </ul>
  387.                     </li>
  388.                     {% endblock %}
  389.                   </ul>
  390.                 </div>
  391.                 {#% endif %#}
  392.                 {% endblock %}
  393.               </nav>
  394.               {% endblock sonata_nav %}
  395.             </header>
  396.             {% endblock sonata_header %}
  397.             <div class="content-wrapper">
  398.                 {% block sonata_page_content %}
  399.                     <section class="content-header">
  400.                         {% block sonata_page_content_header %}
  401.                             {% block sonata_page_content_nav %}
  402.                                 {% if _navbar_title is not empty
  403.                                   or _tab_menu is not empty
  404.                                   or _actions is not empty
  405.                                   or _list_filters_actions is not empty
  406.                                  %}
  407.                                     <nav class="navbar navbar-default" role="navigation">
  408.                                         <div class="container-fluid">
  409.                                             {% block tab_menu_navbar_header %}
  410.                                                 {% if _navbar_title is not empty %}
  411.                                                     <div class="navbar-header">
  412.                                                         <a class="navbar-brand" href="#">{{ _navbar_title|raw }}</a>
  413.                                                     </div>
  414.                                                 {% endif %}
  415.                                             {% endblock %}
  416.                                             <div class="navbar-collapse">
  417.                                                 {% if _tab_menu is not empty %}
  418.                                                     <div class="navbar-left">
  419.                                                         {{ _tab_menu|raw }}
  420.                                                     </div>
  421.                                                 {% endif %}
  422.                                                 {% if admin is defined and action is defined and action == 'list' and admin.listModes|length > 1 %}
  423.                                                     <div class="nav navbar-right btn-group">
  424.                                                         {% for mode, settings in admin.listModes %}
  425.                                                             <a href="{{ admin.generateUrl('list', app.request.query.all|merge({_list_mode: mode})) }}" class="btn btn-default navbar-btn btn-sm{% if admin.getListMode() == mode %} active{% endif %}"><i class="{{ settings.class }}"></i></a>
  426.                                                         {% endfor %}
  427.                                                     </div>
  428.                                                 {% endif %}
  429.                                                 {% block sonata_admin_content_actions_wrappers %}
  430.                                                     {% if _actions|replace({ '<li>': '', '</li>': '' })|trim is not empty %}
  431.                                                         <ul class="nav navbar-nav navbar-right">
  432.                                                         {% if _actions|split('</a>')|length > 2 %}
  433.                                                             <li class="dropdown sonata-actions">
  434.                                                                 <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ 'link_actions'|trans({}, 'SonataAdminBundle') }} <b class="caret"></b></a>
  435.                                                                 <ul class="dropdown-menu" role="menu">
  436.                                                                     {{ _actions|raw }}
  437.                                                                 </ul>
  438.                                                             </li>
  439.                                                         {% else %}
  440.                                                             {{ _actions|raw }}
  441.                                                         {% endif %}
  442.                                                         </ul>
  443.                                                     {% endif %}
  444.                                                 {% endblock sonata_admin_content_actions_wrappers %}
  445.                                                 {% if _list_filters_actions is not empty %}
  446.                                                     {{ _list_filters_actions|raw }}
  447.                                                 {% endif %}
  448.                                             </div>
  449.                                         </div>
  450.                                     </nav>
  451.                                 {% endif %}
  452.                             {% endblock sonata_page_content_nav %}
  453.                         {% endblock sonata_page_content_header %}
  454.                     </section>
  455.                     <section class="content">
  456.                         {% block sonata_admin_content %}
  457.                             {% block notice %}
  458.                                 {% include '@SonataCore/FlashMessage/render.html.twig' %}
  459.                             {% endblock notice %}
  460.                             {% if _preview is not empty %}
  461.                                 <div class="sonata-ba-preview">{{ _preview|raw }}</div>
  462.                             {% endif %}
  463.                             {% if _content is not empty %}
  464.                                 <div class="sonata-ba-content">{{ _content|raw }}</div>
  465.                             {% endif %}
  466.                             {% if _show is not empty %}
  467.                                 <div class="sonata-ba-show">{{ _show|raw }}</div>
  468.                             {% endif %}
  469.                             {% if _form is not empty %}
  470.                                 <div class="sonata-ba-form">{{ _form|raw }}</div>
  471.                             {% endif %}
  472.                             {% if _list_filters is not empty %}
  473.                                 <div class="row">
  474.                                     {{ _list_filters|raw }}
  475.                                 </div>
  476.                             {% endif %}
  477.                             {% if _list_table is not empty %}
  478.                                 <div class="row">
  479.                                     {{ _list_table|raw }}
  480.                                 </div>
  481.                             {% endif %}
  482.                         {% endblock sonata_admin_content %}
  483.                     </section>
  484.                 {% endblock sonata_page_content %}
  485.             </div>
  486.           </div>
  487.         {% endblock sonata_wrapper %}
  488.     </div>
  489.     {% if sonata_admin.adminPool.getOption('use_bootlint') %}
  490.         {% block bootlint %}
  491.             {# Bootlint - https://github.com/twbs/bootlint#in-the-browser #}
  492.             <script type="text/javascript">
  493.                 javascript:(function(){var s=document.createElement("script");s.onload=function(){bootlint.showLintReportForCurrentDocument([], {hasProblems: false, problemFree: false});};s.src="https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js";document.body.appendChild(s)})();
  494.             </script>
  495.         {% endblock %}
  496.     {% endif %}
  497.     </div>
  498.     </body>
  499. </html>