<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{% block title %}Welcome!{% endblock %}</title>
<link href="{{ asset('css/fontawesome.all.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/styles.css') }}" rel="stylesheet">
{% block stylesheets %}{% endblock %}
</head>
<body>
{# Set this in the base twig template because we're going to use this all the time! #}
{% set CURRENT_URL = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light border-bottom">
<a href="#" class="navbar-brand">
<img src="{{ asset('img/AA_logo_340x20.png') }}" alt="">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="{{ path('home') }}">Home
<span class="sr-only">(current)</span>
</a>
</li>
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ app.user.firstName }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ path('app_forgot_password_request') }}">Reset Password</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>
</div>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{ path('app_login') }}">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('app_register') }}">Register</a>
</li>
{% endif %}
</ul>
</div>
</nav>
<div class="d-flex" id="wrapper">
{% include "partials/sidebar.html.twig" %}
<div id="page-content-wrapper">
{% set __alerts = {
'success': {'class': 'success', 'icon':'wb-check', 'text':'Successes'},
'info': {'class': 'info', 'icon':'wb-info', 'text':'Information'},
'warning': {'class': 'warning', 'icon':'wb-alert', 'text':'Warnings'},
'error': {'class': 'danger', 'icon':'wb-alert', 'text':'Errors'}
} %}
{% if app.session.flashBag.peekAll() | length %}
{% for type, message_array in app.session.flashBag.all() | sort %}
{% if attribute(__alerts, type) %}
<div class="alert dark alert-icon alert-{{ attribute(__alerts, type)['class'] }}" role="alert">
<h4>{{ attribute(__alerts, type)['text'] }}</h4>
<i class="icon {{ attribute(__alerts, type)['icon'] }}" aria-hidden="true"></i>
<ul>
{% for message in message_array %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% block links %}
{% endblock %}
{% block body %}{% endblock %}
</div>
</div>
<!-- Bootstrap core JavaScript -->
<script src="{{ asset('js/jquery.min.js') }}"></script>
<script src="{{ asset('js/jquery-ui.min.js') }}"></script>
<script src="{{ asset('js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('js/fontawesome.min.js') }}"></script>
{% block javascripts %}{% endblock %}
</body>
</html>