templates/base.back.html.twig line 1

Open in your IDE?
  1. {% set params = app.session.get('params') %}
  2. {# For connexion page (without session), use controller param : parameters #}
  3. {% if params is empty %}
  4.     {% set params = { 'version':'.', 'territory':'.' } %}
  5. {% endif %}
  6. <!DOCTYPE html>
  7. <html id="html" lang="fr">
  8.     <head>
  9.         <meta charset="UTF-8">
  10.         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  11.         {% block meta %}{% endblock %}
  12.         <title>{% block title %}{{ 'welcome'|trans({},'breadcrumb') }}{% endblock %}</title>
  13.         <!-- External CSS and JS-->
  14.         {% include 'generic/librairies.html.twig' %}
  15.         <script src="{{ asset('bundles/bazingajstranslation/js/translator.min.js') }}"></script>
  16.         <script src="{{ url('bazinga_jstranslation_js', { 'domain': 'dashboard' }) }}"></script>
  17.         <!-- Internal CSS -->
  18.         <link rel="stylesheet" href="{{ asset('css/component-chosen.min.css') }}">
  19.         <link rel="stylesheet" href="{{ asset('css/layout.min.css') }}">
  20.         <link rel="stylesheet" href="{{ asset('build/css/colors_old.css') }}">
  21.         <link rel="stylesheet" href="{{ asset('build/css/font.css') }}">
  22.         <link rel="stylesheet" href="{{ asset('build/css/base.css') }}">
  23.         <link rel="stylesheet" href="{{ asset('build/css/modal.css') }}">
  24.         <link rel="stylesheet" href="{{ asset('build/css/button.css') }}">
  25.         <link rel="stylesheet" href="{{ asset('build/css/form.css') }}">
  26.         <link rel="stylesheet" href="{{ asset('build/css/menu.css') }}">
  27.         <link rel="stylesheet" href="{{ asset('build/css/datatables.css') }}">
  28.         <link rel="stylesheet" href="{{ asset('build/css/layout.css') }}">
  29.         <link rel="stylesheet" href="{{ asset('build/css/badge.css') }}">
  30.         <link rel="stylesheet" media="print" href="{{ asset('build/css/print.css') }}">
  31.         <link rel="stylesheet" href="{{ asset('build/css/progress.css') }}">
  32.         <link rel="stylesheet" href="{{ asset('build/css/globals.css') }}">
  33.         <!-- Favicon -->
  34.         <link rel="icon" href="{{ asset('favicon.ico') }}">
  35.         <style>
  36.             .loader {
  37.                 background : url("{{ asset('images/icon-loader.gif') }}") 50% 50% no-repeat;
  38.             }
  39.         </style>
  40.         <!-- Specific CSS -->
  41.         {% block stylesheets %}
  42.         {% endblock %}
  43.         <!-- Internal Javascripts -->
  44.            <script src="{{ asset('js/chosen/chosen.jquery.min.js') }}"></script>
  45.         <script src="{{ asset('js/plugins/loaders/blockui.min.js') }}"></script>
  46.         <script src="{{ asset('js/plugins/forms/styling/uniform.min.js') }}"></script>
  47.         <script src="{{ asset('js/plugins/forms/styling/switchery.min.js') }}"></script>
  48.         <script src="{{ asset('js/plugins/forms/styling/switch.min.js') }}"></script>
  49.         <script src="{{ asset('js/limitless/app.js') }}"></script>
  50.         <script src="{{ asset('js/custom.js') }}"></script>
  51.         <script src="{{ asset('js/dataTables-dateTime.js') }}"></script>
  52.         <script src="{{ asset('js/libDate.js') }}"></script>
  53.         <script src="{{ asset('bundles/fosjsrouting/js/router.min.js') }}"></script>
  54.         <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  55.         <!-- Specific head JS -->
  56.         {% block headjavascripts %}
  57.         {% endblock %}
  58.         <script>
  59.             $('.has-clear input[type="text"]').on('input propertychange', function() {
  60.               var $this = $(this);
  61.               var visible = Boolean($this.val());
  62.               $this.siblings('.form-control-clear').toggleClass('hidden', !visible);
  63.             }).trigger('propertychange');
  64.             $('.form-control-clear').click(function() {
  65.               $(this).siblings('input[type="text"]').val('')
  66.                 .trigger('propertychange').focus();
  67.             });
  68.             $(document).ready(function() {
  69.                 if ($('.js-datepicker').length ) {
  70.                     $('.js-datepicker').datepicker({format:'dd/mm/yyyy',  language: 'fr'});
  71.                 }
  72.                 if ($('.chzn-select').length ) {
  73.                     $(".chzn-select").chosen('destroy');
  74.                     $(".chzn-select").on("liszt:showing_dropdown", function () {
  75.                         $(this).parents("div").css("overflow", "visible");
  76.                     });
  77.                     $(".chzn-select").on("liszt:hiding_dropdown", function () {
  78.                         $(this).parents("div").css("overflow", "");
  79.                     });
  80.                     $(".chzn-select").chosen({
  81.                         no_results_text: "Aucun résultat pour ",
  82.                         placeholder_text_single: " ",
  83.                         placeholder_text_multiple: " ",
  84.                         disable_search: false,
  85.                         disable_search_threshold: 1
  86.                     });
  87.                 }
  88.                 $('[data-toggle="offcanvas"]').on('click', function () {
  89.                     $('.offcanvas-collapse').toggleClass('open')
  90.                 })
  91.             });
  92.             // "required" support for Chosen; see https://github.com/harvesthq/chosen/issues/515, http://jsfiddle.net/hq7b426j/1/
  93.             $.fn.oldChosen = $.fn.chosen
  94.             $.fn.chosen = function (options) {
  95.               var select = $(this),
  96.                   is_creating_chosen = !!options;
  97.               if (is_creating_chosen && select.css('position') === 'absolute') {
  98.                 // if we are creating a chosen and the select already has the appropriate styles added
  99.                 // we remove those (so that the select hasn't got a crazy width), then create the chosen
  100.                 // then we re-add them later
  101.                 select.removeAttr('style');
  102.               }
  103.               var ret = select.oldChosen(options)
  104.               // only act if the select has display: none, otherwise chosen is unsupported (iPhone, etc)
  105.               if (is_creating_chosen && select.css('display') === 'none') {
  106.                 // https://github.com/harvesthq/chosen/issues/515#issuecomment-33214050
  107.                 // only do this if we are initializing chosen (no params, or object params) not calling a method
  108.                 select.attr('style', 'display:visible; position:absolute; clip:rect(0,0,0,0)');
  109.                 select.attr('tabindex', -1);
  110.               }
  111.               return ret
  112.             }
  113.             function extraitNombre(str)
  114.             {
  115.                 return Number(str.replace(/[^\d]/g, ""))
  116.             }
  117.         </script>
  118.     </head>
  119.     <body class="sidebar-xs">
  120.         <!-- Page content -->
  121.         <div class="page-content">
  122.             <!-- Main sidebar -->
  123.             {% block menu %}
  124.                 {% include 'menu/menu.side.html.twig' %}
  125.             {% endblock %}
  126.             <!-- Main content -->
  127.             <div class="content-wrapper">
  128.                 {% include 'menu/menu.burger.html.twig' %}
  129.                 <!-- Breadcrumb -->
  130.                 {% block breadcrumb %}
  131.                     <div id="menu2" class="row">
  132.                         <div id="breadcrumb" class="col-8">
  133.                             <a href="{{ path('index') }}" class="breadcrumb-item root-item"> {{ 'Home'|trans({},'breadcrumb') }}
  134.                                 {% if has_parameter_granted('territory') %}
  135.                                     {{ get_parameter_value('territory') }}
  136.                                 {% else %}
  137.                                     {{ 'territory'|trans({},'breadcrumb') }}
  138.                                 {% endif %}
  139.                             </a>
  140.                             {% block nav %}{% endblock %}
  141.                         </div>
  142.                         <div id="user_bloc" class="col-4" style="display:none">
  143.                             {% include 'menu/menu.user.html.twig' %}
  144.                         </div>
  145.                     </div>
  146.                 {% endblock %}
  147.                 <!-- Content area -->
  148.                 <div id="main">
  149.                     {% block body %}
  150.                     {% endblock %}
  151.                 </div>
  152.             </div>
  153.         </div>
  154.     </body>
  155.     <script>
  156.         $('#confirm-traiter').on('show.bs.modal', function(e) {
  157.             $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
  158.             $(this).find('.modal-header').html('Etes-vous de vouloir traiter la commande n°' + $(e.relatedTarget).data('string'));
  159.         });
  160.         $('#confirm-lettre').on('show.bs.modal', function(e) {
  161.             $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
  162.         });
  163.         $('#confirm-suspension').on('show.bs.modal', function(e) {
  164.             $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
  165.             $(this).find('.modal-header').html('Etes-vous de vouloir traiter la commande n°' + $(e.relatedTarget).data('string'));
  166.         });
  167.         $('#confirm-restitution').on('show.bs.modal', function(e) {
  168.             $(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
  169.             $(this).find('.modal-header').html('Etes-vous de vouloir traiter la commande n°' + $(e.relatedTarget).data('string'));
  170.         });
  171.         $('#confirm-valider').on('show.bs.modal', function(e) {
  172.             $(this).find('.btn-ok').click(function(e) {
  173.                 location.reload();
  174.             });
  175.             $(this).find('.modal-header').html('Saisie du badge pour la commande n° ' + $(e.relatedTarget).data('string'));
  176.             $(this).find('.modal-header').append('<div id="idC" style="display: none" value="">'+$(e.relatedTarget).data('string')+'</div>');
  177.         });
  178.     </script>
  179.     <!-- Specific Javascripts -->
  180.     {% block javascripts %}
  181.         <script src="{{ url('bazinga_jstranslation_js', { 'domain': 'dashboard' }) }}"></script>
  182.     {% endblock %}
  183. </html>