mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
206 lines
8.1 KiB
Twig
206 lines
8.1 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<title>{{ installation.name }} - {% block title %}{% endblock %}</title>
|
|
|
|
{% stylesheets output="css/all.css" filter="cssrewrite"
|
|
"bundles/chillmain/stylesheets/scratch.css"
|
|
"bundles/chillmain/css/chillmain.css"
|
|
"bundles/chillmain/select2.css"
|
|
"bundles/chillmain/css/pikaday.css" %}
|
|
<link rel="stylesheet" href="{{ asset_url }}"/>
|
|
{% endstylesheets %}
|
|
|
|
{% block css%}<!-- nothing added to css -->{% endblock %}
|
|
|
|
{% javascripts output="js/libs.js"
|
|
"bundles/chillmain/js/modernizr-2.6.2.min.js"
|
|
"bundles/chillmain/js/jquery.js"
|
|
"bundles/chillmain/moment.js"
|
|
"bundles/chillmain/pikaday.js"
|
|
"bundles/chillmain/select2.js"
|
|
"bundles/chillmain/plugins/pikaday.jquery.js" %}
|
|
<script src="{{ asset_url }}" type="text/javascript"></script>
|
|
{% endjavascripts %}
|
|
</head>
|
|
|
|
<body>
|
|
<header class="navigation container">
|
|
<div class="nav grid-2">
|
|
<ul id="navigation-menu">
|
|
<li class="nav-link nav-title"><a href="{{ path('chill_main_homepage') }}">{{ installation.name }}</a>
|
|
</ul>
|
|
</div>
|
|
<div class="grid-4 navigation-search">
|
|
<form action="{{ path('chill_main_search') }}" method="get">
|
|
<input name="q" type="search" placeholder="{{ 'Search'|trans }}" {% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
|
<button type="submit" class="sc-button white border"><i class="fa fa-search"></i></button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="nav grid-6 text-right">
|
|
<ul id="navigation-menu">
|
|
|
|
|
|
{{ chill_menu('section', {
|
|
'layout': 'ChillMainBundle::Menu/section.html.twig',
|
|
}) }}
|
|
|
|
{{ chill_menu('user', {
|
|
'layout': 'ChillMainBundle::Menu/user.html.twig',
|
|
}) }}
|
|
|
|
{% if available_languages|length == 1 %}
|
|
<li class="nav-link">
|
|
<a href="">{{ available_languages[0] | upper }}</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-link more"><a href="">{{ app.request.locale | upper }}</a>
|
|
<ul class="submenu">
|
|
{% for lang in available_languages %}
|
|
<li {% if lang == app.request.locale %}class="active"{% endif %}>
|
|
<a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale' : lang})) }}">{{ lang | upper }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</header>
|
|
{% block layout_content %}
|
|
<div class="container content">
|
|
{# Flash messages ! #}
|
|
{% for flashMessage in app.session.flashbag.get('success') %}
|
|
<div class="grid-8 centered success">
|
|
<span>
|
|
{{ flashMessage|raw }}
|
|
</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for flashMessage in app.session.flashbag.get('danger') %}
|
|
<div class="grid-8 centered error">
|
|
<span>
|
|
{{ flashMessage|raw }}
|
|
</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% for flashMessage in app.session.flashbag.get('info') %}
|
|
<div class="grid-8 centered notice">
|
|
<span>
|
|
{{ flashMessage|raw }}
|
|
</span>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="grid-8 centered">
|
|
<h2>{{ 'Search'|trans }}</h2>
|
|
|
|
<form action="{{ path('chill_main_search') }}" method="get">
|
|
<input name="q" type="search" placeholder="{{ 'Search persons, ...'|trans }}" />
|
|
<center>
|
|
<button type="submit" class="sc-button orange"><i class="fa fa-search"></i> {{ 'Search'|trans }}</button>
|
|
</center>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="padding-top:2em; padding-bottom:2em;">
|
|
{{ chill_menu('homepage', {
|
|
'layout': 'ChillMainBundle::Menu/homepage.html.twig',
|
|
}) }}
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
<footer class="footer">
|
|
<p>License AGPL</p>
|
|
</footer>
|
|
|
|
<script type="text/javascript">
|
|
function init_pikaday(locale) {
|
|
var i18n_trad = {
|
|
fr: {
|
|
previousMonth : 'Mois précédent',
|
|
nextMonth : 'Mois suivant',
|
|
months : ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
|
weekdays : ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
|
weekdaysShort : ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam']
|
|
},
|
|
nl: {
|
|
previousMonth : 'Vorig maand',
|
|
nextMonth : 'Volgende maand',
|
|
months : ['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'],
|
|
weekdays : ['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
|
|
weekdaysShort : ['Zon','Ma','Di','Wo','Do','Vri','Zat']
|
|
}
|
|
};
|
|
|
|
var pikaday_options = {
|
|
format: "D-M-YYYY",
|
|
yearRange: [parseInt(moment().format('YYYY')) - 100, parseInt(moment().format('YYYY'))],
|
|
};
|
|
|
|
if(locale in i18n_trad) {
|
|
pikaday_options.i18n = i18n_trad[locale];
|
|
}
|
|
|
|
$('.datepicker').pikaday(
|
|
pikaday_options
|
|
);
|
|
};
|
|
|
|
init_pikaday('{{ app.request.locale }}');
|
|
|
|
$('.input-text-other-value').each(function() {
|
|
$(this).change(function() {
|
|
checkbox = $(this).parent().find("input[type=checkbox][value=_other]")[0];
|
|
$(checkbox).prop('checked', ($(this).val() !== ""))
|
|
});
|
|
});
|
|
|
|
$('.select2').select2();
|
|
|
|
|
|
$('.sticky-form-buttons').each(function(i,stick_element) {
|
|
if($(stick_element).css('position') !== 'sticky') {
|
|
var sticky_form_buttons_offset_top = $(stick_element).offset().top;
|
|
|
|
function stickyEmulate() {
|
|
if (($(window).scrollTop() + $(window).height()) < sticky_form_buttons_offset_top) {
|
|
//sticky at bottom
|
|
$(stick_element).css('position','fixed');
|
|
$(stick_element).css('bottom','0');
|
|
$(stick_element).css('top','');
|
|
$(stick_element).css('width',$(stick_element).parent().outerWidth());
|
|
} else if (sticky_form_buttons_offset_top < $(window).scrollTop()) {
|
|
//sticky at top
|
|
$(stick_element).css('position','fixed');
|
|
$(stick_element).css('top','0');
|
|
$(stick_element).css('bottom','');
|
|
$(stick_element).css('width',$(stick_element).parent().outerWidth());
|
|
} else {
|
|
//no sticky
|
|
$(stick_element).css('position','initial');
|
|
$(stick_element).css('bottom','');
|
|
$(stick_element).css('width','');
|
|
$(stick_element).css('top','');
|
|
}
|
|
}
|
|
|
|
$(window).scroll(function() {
|
|
stickyEmulate();
|
|
});
|
|
|
|
stickyEmulate();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html> |