Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (115 sloc) 4.67 KB
{% extends 'MopaBootstrapBundle::base' ~ theme_type|default('_less')~ '.html.twig' %}
{% block head_style %}
{% stylesheets
'@MopaBootstrapSandboxBundle/Resources/public/less/mopabootstrapsandboxbundle.less'
'@MopaBootstrapSandboxBundle/Resources/public/css/prettify.css'
'@MopaBootstrapBundle/Resources/public/less/mopabootstrapbundle.less'
'@MopaBootstrapBundle/Resources/public/bootstrap/docs/assets/css/docs.min.css'
'@MopaBootstrapBundle/Resources/public/components/smalot-bootstrap-datetimepicker/build/build_standalone.less'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}
{% endblock head_style %}
{% block body_tag %}
<body data-spy="scroll" data-target="#navbar-example">
{% endblock body_tag %}
{% block head_script %}
{% javascripts
'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock head_script %}
{% block navbar %}
{% embed '@MopaBootstrap/Navbar/navbar.html.twig' with { fixedTop: true, inverse: true, id: 'navbar-example' } %}
{% block brand %}
<a class="navbar-brand" href="{{ path('mopa_bootstrap_welcome') }}">Mopa Bootstrap</a>
{% endblock %}
{% block menu %}
{{ mopa_bootstrap_menu('MopaBootstrapSandboxBundle:Builder:createMainMenu') }}
{{ mopa_bootstrap_menu('exampledropdown', {'automenu': 'navbar', 'pull-right': true}) }}
{% endblock %}
{% endembed %}
{% endblock navbar %}
{% block body %}
{{ parent() }}
{% block fork_me %}
<a href="http://github.com/phiamo/MopaBootstrapBundle"><img style="position: absolute; top: 40px; right: 0; border: 0; z-index: 1025;" src="{{ asset('bundles/mopabootstrapsandbox/img/github_forkme_ribbon.png') }}" alt="Fork me on GitHub"></a>
{% endblock fork_me %}
{% endblock body%}
{% block content_row %}
{{ parent() }}
{% if showTemplate is defined or showForm is defined %}
<div class="row">
{% if showForm is defined %}
<div class="col-lg-6">
<p><strong>FormType Code</strong></p>
<pre class="prettyprint">{{ classSource(showForm) }}</pre>
</div>
{% endif %}
{% if showTemplate is defined %}
<div class="col-lg-6">
<p><strong>Template Code</strong></p>
<pre class="prettyprint">{{ twigSource(showTemplate) }}</pre>
</div>
{% endif %}
</div>
{% endif %}
{% endblock content_row %}
{% block foot_script %}
{% javascripts
'@MopaBootstrapBundle/Resources/public/bootstrap/js/tooltip.js'
'@MopaBootstrapBundle/Resources/public/bootstrap/js/*.js'
'@MopaBootstrapBundle/Resources/public/js/mopabootstrap-collection.js'
'@MopaBootstrapBundle/Resources/public/js/mopabootstrap-subnav.js'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{{ parent() }}
<script type="text/javascript" src="{{ asset('bundles/mopabootstrapsandbox/js/prettify.js') }}"></script>
<script type="text/javascript">
$(document).ready(function(){
window.prettyPrint && prettyPrint();
});
</script>
{% javascripts
'@MopaBootstrapBundle/Resources/public/components/smalot-bootstrap-datetimepicker/js/bootstrap-datetimepicker.js'
'@MopaBootstrapBundle/Resources/public/components/smalot-bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fr.js'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
$(function(){
$('[data-provider="datepicker"]').datetimepicker({
autoclose: true,
format: 'dd/mm/yyyy',
language: 'fr',
minView: 'month',
pickerPosition: 'bottom-left',
todayBtn: true,
startView: 'month'
});
$('[data-provider="datetimepicker"]').datetimepicker({
autoclose: true,
format: 'dd/mm/yyyy hh:ii',
pickerPosition: 'bottom-left',
todayBtn: true
});
$('[data-provider="timepicker"]').datetimepicker({
autoclose: true,
format: 'hh:ii',
formatViewType: 'time',
maxView: 'day',
minView: 'hour',
pickerPosition: 'bottom-left',
startView: 'day'
});
// Restore value from hidden input
$('input[type=hidden]', '.date').each(function(){
if($(this).val()) {
$(this).parent().datetimepicker('setValue');
}
});
});
</script>
{% endblock foot_script %}