{# vim: ft=htmljinja
#}
<!DOCTYPE html>
<html>
    <head>
        <title>Kék Rózsák{% block title %}{% endblock %}</title>
        <meta charset="utf8" />
{% stylesheets 'bundles/kekrozsakfront/css/*' filter='cssrewrite' output='css/kekrozsak.css' %}
        <link rel="stylesheet" type="text/css" href="{{ asset_url }}" />
{% endstylesheets %}
        <link rel="stylesheet" type="text/css" href="{{ asset('js/jquery-cluetip/jquery.cluetip.css') }}" />
{% block additional_css %}{% endblock %}
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-cluetip/lib/jquery.hoverIntent.js')}}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-cluetip/jquery.cluetip.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery.tinyscrollbar.min.js') }}"></script>
        <script type="text/javascript" src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
        <script type="text/javascript" src="{{ path('fos_js_routing_js', {callback: 'fos.Router.setData'}) }}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-form/jquery.form.js') }}"></script>
{% javascripts 'bundles/kekrozsakfront/js/*' output='js/kekrozsak.js' %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% block additional_js %}{% endblock %}
    </head>
    <body>
        <div id="popup-container">
            <div id="popup-close"></div>
            <div id="popup-inside">
                <div id="popup-title"></div>
                <div id="popup-scrollable">
                    <div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
                    <div class="viewport">
                        <div class="overview" id="popup-content"></div>
                    </div>
                </div>
            </div>
        </div>
        <div id="top-line-wrapper">
            <div id="top-line">
{% if app.user %}
{% include 'KekRozsakFrontBundle:Box:UserProfile.html.twig' %}
{% include 'KekRozsakFrontBundle:Box:Events.html.twig' %}
                <div id="konyvtar-gomb">
                    <span class="gomb"><a href="{{ path('KekRozsakFrontBundle_bookList') }}">[könyvtár gomb]</a></span>
                </div>
{% else %}
{% include 'KekRozsakFrontBundle:Box:Login.html.twig' %}
{% endif %}
{#
                <div id="search-box">
                    <input type="text" />
                    <button type="submit">Keresés</button>
                </div>
#}
                <div id="moonphase">
                    <img src="{{ asset('bundles/kekrozsakfront/images/moonphase/' ~ moonphase.phaseNum ~ '_small.png') }}" alt="{{ moonphase.percent }}" />
                </div>
            </div>
            <div id="top-line-padding"></div>
        </div>
        <div id="wrapper">
            <div id="menu">
{# TODO: Dynamically generate menu #}
                <ul>
                    <li><a href="{{ path('KekRozsakFrontBundle_homepage') }}">Főoldal - Aktuális</a></li>
                    <li><a href="{{ path('KekRozsakFrontBundle_articleView', { slug: 'rolunk' }) }}">Rólunk</a></li>
                    <li><a href="{{ path('KekRozsakFrontBundle_articleView', { slug: 'a-magiarol-roviden' }) }}">A Mágiáról röviden</a></li>
                    <li><a href="{{ path('KekRozsakFrontBundle_articleView', { slug: 'rendek' }) }}">Rendek</a></li>
                    <li><a href="{{ path('KekRozsakFrontBundle_articleView', { slug: 'a-regiek' }) }}">A régiek</a></li>
{% if app.user %}
                    <li><a href="{{ path('KekRozsakSecurityBundle_logout') }}">Kijelentkezés</a></li>
{% else %}
                    <li><a href="{{ path('KekRozsakSecurityBundle_registration') }}">Jelentkezés</a></li>
{% endif %}
                </ul>
            </div>
            <div id="header">
                <h1>Kék Rózsák</h1>
            </div>
            <div id="content-wrapper">
                <div id="content-outline">
                    <div id="content">
{% if helpUrl is not null %}
                            <span id="help-button"><a href="{{ helpUrl }}">[Súgó]</a></span><br class="clear" />
{% endif %}
{% block content %}{% endblock %}
                    </div>
                </div>
                <div id="hirek">
                    <div id="news-close-button"></div><br class="clear" />
                    <h3>Hírek</h3>
                    <div id="news-list">Betöltés...</div>
                </div>
                <div id="news-button"></div>
            </div>{# div#content-wrapper #}
        </div>{# div#wrapper #}
        <div id="bottom-line-wrapper">
            <div id="bottom-line-padding"></div>
            <div id="bottom-line"{% if app.environment == 'dev' %} style="bottom: 39px;"{% endif %}>
            </div>
        </div>
        <script type="text/javascript">
            var environment = '{{ app.environment }}';
{% if app.user %}
            $('#profil-mutato').click(function() {
                if ($('#profil-box').is(':visible'))
                {
                    $('#profil-box').hide();
                }
                else
                {
                    $('#profil-box').show();
                }
            });
            $('#jog-lista').cluetip({
                splitTitle: '|',
                showTitle:  false
            });
            $('.program').cluetip({
                cluezIndex: 1000
            });
            $('#event-shower').click(function() {
                if ($('#event-box').is(':visible'))
                {
                    $('#event-box').hide();
                }
                else
                {
                    $('#event-box').show();
                }
            });
            $('.userdata').cluetip();
{% else %}
            $('#login-mutato').click(function() {
                if ($('#login-box').is(':visible'))
                {
                    $('#login-box').hide();
                }
                else
                {
                    $('#login-box').show();
                }
            });
{% endif %}
        </script>
{% block bottomscripts %}{% endblock %}
    </body>
</html>
