<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="Admin Console" name="description">
<meta content="NZDOS" name="author">
{# <link href="../../favicon.ico" rel="icon"> #}
<title>
{% block title %}Welcome to {{ site_short_title }}{% endblock %}
</title>
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<link href="/assets/css/chosen.css" rel="stylesheet">
<link href="/assets/css/dashboard.css" rel="stylesheet">
<link href="/assets/css/styles.css" rel="stylesheet">
<script src="../../assets/js/ie-emulation-modes-warning.js"></script>
{% block stylesheets %}{% endblock %}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
{% block bodycont %}
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button aria-controls="navbar" aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
<span class="sr-only">
Toggle navigation
</span>
<span class="icon-bar">
</span>
<span class="icon-bar">
</span>
<span class="icon-bar">
</span>
</button>
<a class="navbar-brand" href="#">
{{ site_title }}
</a>
</div>
<div class="navbar-collapse collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
{% include 'top-nav.html.twig' %}
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
{% include '::side-nav.html.twig' %}
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
{% spaceless %}
{% for type, flash_messages in app.session.flashBag.all %}
{% for flash_message in flash_messages %}
<div class="alert alert-{{ type }} fade in">
<a href="#" class="close" data-dismiss="alert">×</a>
{{ flash_message }}
</div>
{% endfor %}
{% endfor %}
<div class="floating-cont">
{% block body %}
{% endblock %}
</div>
{% endspaceless %}
</div>
</div>
<div class="row">
<footer>
{% block footer %}
<a href="/" class="unstyled"><span id="copyright_date"></span> © {{ site_short_title }}</a>
{% endblock %}
</footer>
</div>
</div>
{% endblock %}
{% block javascripts %}{% endblock %}
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/assets/js/jquery.js"></script>
<script type="text/javascript" src="/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/jquery.collection.js"></script>
<script type="text/javascript" src="/assets/js/plugins/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/assets/js/chosen.jquery.js"></script>
<script type="text/javascript">
var addEditor = function(ele) {
if (ele.find('textarea').length > 0) {
ele.find('textarea').each(function(){
CKEDITOR.replace( this, {
toolbar: [
{ name: 'document', items: [ 'Print' ] },
{ name: 'clipboard', items: [ 'Undo', 'Redo' ] },
{ name: 'styles', items: [ 'Format', 'Font', 'FontSize' ] },
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CopyFormatting' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
{ name: 'links', items: [ 'Link', 'Unlink' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
{ name: 'insert', items: [ 'Image', 'Table' ] },
{ name: 'tools', items: [ 'Maximize' ] },
{ name: 'editing', items: [ 'Scayt' ] }
],
customConfig: '',
disallowedContent: 'img{width,height,float}',
extraAllowedContent: 'img[width,height,align]',
extraPlugins: '',
height: 600,
contentsCss: [ '/assets/js/plugins/ckeditor/contents.css' ],
bodyClass: 'document-editor',
format_tags: 'p;h1;h2;h3;pre',
removeDialogTabs: 'image:advanced;link:advanced',
stylesSet: [
{ name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
{ name: 'Cited Work', element: 'cite' },
{ name: 'Inline Quotation', element: 'q' },
{
name: 'Special Container',
element: 'div',
styles: {
padding: '5px 10px',
background: '#eee',
border: '1px solid #ccc'
}
},
{
name: 'Compact table',
element: 'table',
attributes: {
cellpadding: '5',
cellspacing: '0',
border: '1',
bordercolor: '#ccc'
},
styles: {
'border-collapse': 'collapse'
}
},
{ name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
{ name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } }
]
} );
});
}
}
$('.sortable-form-collection').collection({
allow_up: true,
allow_down: true,
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>',
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>',
add: '<a href="#" class="btn btn-success" title="Add element"><span class="glyphicon glyphicon-plus-sign"> Add</span></a>',
remove: '<a href="#" class="btn btn-warning" title="Delete element"><span class="glyphicon glyphicon-trash"> Remove</span></a>',
duplicate: '<a href="#" class="btn btn-default" title="Duplicate element"><span class="glyphicon glyphicon-th-large"> Duplicate</span></a>',
add_at_the_end: true,
after_add: function(collection, element) {
addEditor(element);
$(".chosen_select").chosen();
return true;
}
});
$('.form-collection').collection({
allow_up: false,
allow_down: false,
add: '<a href="#" class="btn btn-success" title="Add element"><span class="glyphicon glyphicon-plus-sign"> Add</span></a>',
remove: '<a href="#" class="btn btn-warning" title="Delete element"><span class="glyphicon glyphicon-trash"> Remove</span></a>',
duplicate: '<a href="#" class="btn btn-default" title="Duplicate element"><span class="glyphicon glyphicon-th-large"> Duplicate</span></a>',
add_at_the_end: true,
after_add: function(collection, element) {
addEditor(element);
$(".chosen_select").chosen();
return true;
}
});
$(".form-group > h4").filter(function () {
return new RegExp("^_").test($(this).text());
}).hide(); // Hide form row titles starting with _
// Add buttstrap classes to elements
$('.main a:not([class])').addClass('btn btn-default'); // Add default button styling
$('.main a:contains(Create a)').toggleClass('btn btn-default').addClass('btn btn-primary'); // Add primary create styling
$('.main table a').toggleClass('btn btn-default').addClass('btn btn-xs btn-default'); // Add small buttons for tables
$('.main input[type=submit]:not([class])').addClass('btn btn-success');
$('.main input[value=Delete]').toggleClass('btn btn-success').addClass('btn btn-danger');
$('.main table:not([class])').addClass('table table-stripped');
addEditor($('html'));
// Always apply right date to copyright
$('#copyright_date').text(new Date().getFullYear());
// Add another set of buttons to top of table to help with usability
jQuery('.main table').before(jQuery('.main table').next().clone());
// Add chosen library to clean up multi option groups
$(".chosen_select").chosen();
</script>
</body>
</html>