app/Resources/views/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta content="IE=edge" http-equiv="X-UA-Compatible">
  6.         <meta content="width=device-width, initial-scale=1" name="viewport">
  7.         <meta content="Admin Console" name="description">
  8.         <meta content="NZDOS" name="author">
  9.         {# <link href="../../favicon.ico" rel="icon"> #}
  10.         <title>
  11.             {% block title %}Welcome to {{ site_short_title }}{% endblock %}
  12.         </title>
  13.         <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
  14.         <link href="/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
  15.         <link href="/assets/css/chosen.css" rel="stylesheet">
  16.         <link href="/assets/css/dashboard.css" rel="stylesheet">
  17.         <link href="/assets/css/styles.css" rel="stylesheet">
  18.         <script src="../../assets/js/ie-emulation-modes-warning.js"></script>
  19.         {% block stylesheets %}{% endblock %}
  20.         <!--[if lt IE 9]>
  21.             <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  22.             <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  23.         <![endif]-->
  24.     </head>
  25.     <body>
  26.         {% block bodycont %}
  27.         <nav class="navbar navbar-inverse navbar-fixed-top">
  28.             <div class="container-fluid">
  29.                 <div class="navbar-header">
  30.                     <button aria-controls="navbar" aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
  31.                         <span class="sr-only">
  32.                             Toggle navigation
  33.                         </span>
  34.                         <span class="icon-bar">
  35.                         </span>
  36.                         <span class="icon-bar">
  37.                         </span>
  38.                         <span class="icon-bar">
  39.                         </span>
  40.                     </button>
  41.                     <a class="navbar-brand" href="#">
  42.                         {{ site_title }}
  43.                     </a>
  44.                 </div>
  45.                 <div class="navbar-collapse collapse" id="navbar">
  46.                     <ul class="nav navbar-nav navbar-right">
  47.                         {% include 'top-nav.html.twig' %}
  48.                     </ul>
  49.                 </div>
  50.             </div>
  51.         </nav>
  52.         <div class="container-fluid">
  53.             <div class="row">
  54.                 <div class="col-sm-3 col-md-2 sidebar">
  55.                     {% include '::side-nav.html.twig' %}
  56.                 </div>
  57.                 <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
  58.                     {% spaceless %}
  59.                         {% for type, flash_messages in app.session.flashBag.all %}
  60.                             {% for flash_message in flash_messages %}
  61.                                 <div class="alert alert-{{ type }} fade in">
  62.                                     <a href="#" class="close" data-dismiss="alert">&times;</a>
  63.                                     {{ flash_message }}
  64.                                 </div>
  65.                             {% endfor %}
  66.                         {% endfor %}
  67.                         <div class="floating-cont">
  68.                             {% block body %}
  69.                             {% endblock %}
  70.                         </div>
  71.                     {% endspaceless %}
  72.                 </div>
  73.             </div>
  74.             <div class="row">
  75.                 <footer>
  76.                     {% block footer %}
  77.                         <a href="/" class="unstyled"><span id="copyright_date"></span> &copy; {{ site_short_title }}</a>
  78.                     {% endblock %}
  79.                 </footer>
  80.             </div>
  81.         </div>
  82.         {% endblock %}
  83.         {% block javascripts %}{% endblock %}
  84.         <!-- Bootstrap core JavaScript
  85.     ================================================== -->
  86.         <!-- Placed at the end of the document so the pages load faster -->
  87.         <script type="text/javascript" src="/assets/js/jquery.js"></script>
  88.         <script type="text/javascript" src="/assets/js/bootstrap.min.js"></script>
  89.         <script type="text/javascript" src="/assets/js/jquery.collection.js"></script>
  90.         <script type="text/javascript" src="/assets/js/plugins/ckeditor/ckeditor.js"></script>
  91.         <script type="text/javascript" src="/assets/js/chosen.jquery.js"></script>
  92.         <script type="text/javascript">
  93.             var addEditor = function(ele) {
  94.                 if (ele.find('textarea').length > 0) {
  95.                     ele.find('textarea').each(function(){
  96.                         CKEDITOR.replace( this, {
  97.                             toolbar: [
  98.                                 { name: 'document', items: [ 'Print' ] },
  99.                                 { name: 'clipboard', items: [ 'Undo', 'Redo' ] },
  100.                                 { name: 'styles', items: [ 'Format', 'Font', 'FontSize' ] },
  101.                                 { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CopyFormatting' ] },
  102.                                 { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
  103.                                 { name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
  104.                                 { name: 'links', items: [ 'Link', 'Unlink' ] },
  105.                                 { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
  106.                                 { name: 'insert', items: [ 'Image', 'Table' ] },
  107.                                 { name: 'tools', items: [ 'Maximize' ] },
  108.                                 { name: 'editing', items: [ 'Scayt' ] }
  109.                             ],
  110.                             customConfig: '',
  111.                             disallowedContent: 'img{width,height,float}',
  112.                             extraAllowedContent: 'img[width,height,align]',
  113.                             extraPlugins: '',
  114.                             height: 600,
  115.                             contentsCss: [ '/assets/js/plugins/ckeditor/contents.css' ],
  116.                             bodyClass: 'document-editor',
  117.                             format_tags: 'p;h1;h2;h3;pre',
  118.                             removeDialogTabs: 'image:advanced;link:advanced',
  119.                             stylesSet: [
  120.                                 { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
  121.                                 { name: 'Cited Work', element: 'cite' },
  122.                                 { name: 'Inline Quotation', element: 'q' },
  123.                                 {
  124.                                     name: 'Special Container',
  125.                                     element: 'div',
  126.                                     styles: {
  127.                                         padding: '5px 10px',
  128.                                         background: '#eee',
  129.                                         border: '1px solid #ccc'
  130.                                     }
  131.                                 },
  132.                                 {
  133.                                     name: 'Compact table',
  134.                                     element: 'table',
  135.                                     attributes: {
  136.                                         cellpadding: '5',
  137.                                         cellspacing: '0',
  138.                                         border: '1',
  139.                                         bordercolor: '#ccc'
  140.                                     },
  141.                                     styles: {
  142.                                         'border-collapse': 'collapse'
  143.                                     }
  144.                                 },
  145.                                 { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
  146.                                 { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } }
  147.                             ]
  148.                         } );
  149.                     });
  150.                 }
  151.             }
  152.             $('.sortable-form-collection').collection({
  153.                 allow_up: true,
  154.                 allow_down: true,
  155.                 up: '<a href="#" class="btn btn-default pull-right col-md-offset-1" title="Element up"><span class="glyphicon glyphicon-arrow-up"> Up</span></a>',
  156.                 down: '<a href="#" class="btn btn-default pull-right col-md-offset-1" title="Element down"><span class="glyphicon glyphicon-arrow-down"> Down</span></a>',
  157.                 add: '<a href="#" class="btn btn-success" title="Add element"><span class="glyphicon glyphicon-plus-sign"> Add</span></a>',
  158.                 remove: '<a href="#" class="btn btn-warning" title="Delete element"><span class="glyphicon glyphicon-trash"> Remove</span></a>',
  159.                 duplicate: '<a href="#" class="btn btn-default" title="Duplicate element"><span class="glyphicon glyphicon-th-large"> Duplicate</span></a>',
  160.                 add_at_the_end: true,
  161.                 after_add: function(collection, element) {
  162.                     addEditor(element);
  163.                     $(".chosen_select").chosen();
  164.                     return true;
  165.                  }
  166.             });
  167.             $('.form-collection').collection({
  168.                 allow_up: false,
  169.                 allow_down: false,
  170.                 add: '<a href="#" class="btn btn-success" title="Add element"><span class="glyphicon glyphicon-plus-sign"> Add</span></a>',
  171.                 remove: '<a href="#" class="btn btn-warning" title="Delete element"><span class="glyphicon glyphicon-trash"> Remove</span></a>',
  172.                 duplicate: '<a href="#" class="btn btn-default" title="Duplicate element"><span class="glyphicon glyphicon-th-large"> Duplicate</span></a>',
  173.                 add_at_the_end: true,
  174.                 after_add: function(collection, element) {
  175.                     addEditor(element);
  176.                     $(".chosen_select").chosen();
  177.                     return true;
  178.                  }
  179.             });
  180.             $(".form-group > h4").filter(function () {
  181.                 return new RegExp("^_").test($(this).text());
  182.             }).hide(); // Hide form row titles starting with _
  183.             // Add buttstrap classes to elements
  184.             $('.main a:not([class])').addClass('btn btn-default'); // Add default button styling
  185.             $('.main a:contains(Create a)').toggleClass('btn btn-default').addClass('btn btn-primary'); // Add primary create styling
  186.             $('.main table a').toggleClass('btn btn-default').addClass('btn btn-xs btn-default'); // Add small buttons for tables
  187.             $('.main input[type=submit]:not([class])').addClass('btn btn-success');
  188.             $('.main input[value=Delete]').toggleClass('btn btn-success').addClass('btn btn-danger');
  189.             $('.main table:not([class])').addClass('table table-stripped');
  190.             addEditor($('html'));
  191.             // Always apply right date to copyright
  192.             $('#copyright_date').text(new Date().getFullYear());
  193.             // Add another set of buttons to top of table to help with usability
  194.             jQuery('.main table').before(jQuery('.main table').next().clone());
  195.             // Add chosen library to clean up multi option groups
  196.             $(".chosen_select").chosen();
  197.         </script>
  198.     </body>
  199. </html>