{% extends 'RxGrabBundle:Layouts:global.html.twig' %}

{% block body %}

    <nav class="top-bar" data-topbar role="navigation">
        <ul class="title-area">
            <li class="name">
                <h1><a href="{{ path('rx_grab_general_user') }}"><img class="rxgrab-logo" src="{{ asset('bundles/rxgrab/images/logo.png') }}" /></a></h1>
            </li>
        </ul>
        <section class="top-bar-section">
            <!-- Right Nav Section -->
            <ul class="right">
                <li><a href="javascript:void(0)" class="rxgrab-main-menu" id="rxgrab-main-menu" data-content-id="#rxgrab-main-menu-content">Menu</a></li>
                <li><a href="javascript:void(0)"><i class="fi-torso"></i> {{ app.session.get('generalUserData').fullName }}</a></li>
                <li class="hide-for-small-only"><div style="width: 100px;">&nbsp;</div></li>
                <li>
                    <span class="has-tip tip-bottom hide-for-small-only" data-tooltip aria-haspopup="true" title="Settings"><a href="javascript:void(0)" class="rxgrab-large-font-title"><i class="fi-widget"></i></a></span>
                    <a href="javascript:void(0)" class="show-for-small-only"><i class="fi-widget"></i> Settings</a>
                </li>
                <li>
                    <span class=" has-tip tip-left hide-for-small-only" data-tooltip aria-haspopup="true" title="Logout"><a href="{{ path('rx_grab_general_user_logout') }}" class="rxgrab-large-font-title"><i class="fi-power"></i></a></span>
                    <a href="{{ path('rx_grab_general_user_logout') }}" class="show-for-small-only"><i class="fi-power"></i> Logout</a>
                </li>
            </ul>
        </section>
    </nav>
    <div id="rxgrab-main-menu-container">
        <div id="rxgrab-main-menu-content">
            <a href="javascript:void(0)" id="rxgrab-main-menu-content-close"><i class="fi-x"></i></a>
            <div>
                <div class="row">
                    <div class="xxlarge-3 xlarge-3 large-3 medium-3 small-12 columns rxgrab-menu-list-container-one">
                        <h5>Menus</h5>
                        <ul>
                            <li><a href="javascript:void(0)" class="rxgrab-main-tabs-link" data-id="rxgrab-main-tab-home"><i class="fi-home"></i> Home</a></li>
                            <li><a href="javascript:void(0)" class="rxgrab-main-tabs-link" id="rxgrab-main-tab-scheduleRequest-link" data-url="{{ path('rx_grab_schedule_request') }}" data-id="rxgrab-main-tab-scheduleRequest" data-label="Schedule Request"><i class="fi-book-bookmark"></i> Schedule Request</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="rxgrab-block-main">{% block main %}{% endblock %}</div>

    <div id="global-modal" class="reveal-modal" data-reveal>
        <a class="close-reveal-modal" title="Close">&#215;</a>
    </div>

    <div id="global-alert-modal" class="reveal-modal" data-reveal>
        <a class="close-reveal-modal" title="Close message">&#215;</a>
        <div id="global-alert-modal-message"></div>
    </div>

    {% if app.session.has('schedule_request_healthFacilityId') %}

        <script>
            //<![CDATA
                jQ(document).ready(function(){
                    var menuLink = jQ('#rxgrab-main-tab-scheduleRequest-link');
                    if(global.RxGrabMainTabs.newTab(menuLink)) {
                        global.doForm('#'+menuLink.data('id'), '#'+menuLink.data('id')+'-content', '{{ path('rx_grab_schedule_request_form') }}', 'new', 0);
                    }
                });
            //]>
        </script>

    {% endif %}

{% endblock %}