<!DOCTYPE html>
<html>
<head>                                                                                          
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0;">
<title>${title}</title>
<link href="${make_media_url('css/admin.css', 'admin')}" rel="stylesheet" />
<link href="${make_media_url('css/font-awesome.min.css', 'admin')}" rel="stylesheet" />
<link href="${make_media_url('css/responsive-nav.css', 'admin')}" rel="stylesheet" />
<link href="${make_media_url('css/tooltipster.bundle.min.css', 'admin')}" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> 
<%block name="extra_css">
</%block>
<script language="Javascript" src="${make_media_url('js/jquery.min.js', 'admin')}"></script>
<script language="Javascript" src="${make_media_url('js/responsive-nav.min.js', 'admin')}"></script>
<script language="Javascript" src="${make_media_url('js/tooltipster.bundle.min.js', 'admin')}"></script>
<%block name="extra_js">
</%block>
<%block name="extra_header">
</%block>
</head>
<body>
<div id="languages_general">
</div>
<div id="logout">
<%block name="logout"><a href="${url_for('.logout')}"><i class="fa fa-power-off" aria-hidden="true"></i> Logout</a></%block>
</div>

<div id="center_body">
    <div id="header">
        <a href="#nav" id="toggle"><i class="fa fa-bars" aria-hidden="true"></i><span>Menu</span></a>
        <%block name="title_admin"><span id="title_phango">Paramecio</span> <span id="title_framework">Framework!</span></%block>
    </div>
    <div class="content_admin">
        <nav id="menu" class="nav-collapse">
            <ul>
                <li class="menu_title"><%block name="applications"><i class="fa fa-gear" aria-hidden="true"></i>${lang('admin', 'applications', 'Applications')}</li></%block>
                <%block name="menu_list">
                <%
                
                from paramecio2.libraries.config_admin import config_admin

                %>
                % for admin in config_admin:

                    <%
                    
                    class_selected=''
                    
                    %>
                
                    % if len(admin)==3:
                    <%
                    
                    if admin[2]+'/'==path_module:
                        class_selected='selected_menu'
                    
                    %>
                
                    <li><a href="${url_for('.admin', module=admin[2])}" class="${class_selected}">&nbsp;<i class="fa fa-circle-o" aria-hidden="true"></i>${admin[0]}</a></li>
                    
                    % elif len(admin)==3:
                    <%
                    
                    if admin[2]+'/'+admin[3]==path_module:
                        class_selected='selected_menu'
                    
                    %>
                    
                    <li><a href="${url_for('.admin', module=admin[2], submodule=admin[3])}" class="${class_selected}">&nbsp;<i class="fa fa-circle-o" aria-hidden="true"></i>${admin[0]}</a></li>                    
                    
                    % elif len(admin)==1:
                    
                    <li><div class="father_admin">${admin[0]}</div></li>
                    
                    % endif
                
                % endfor
                </%block>
            </ul>
        </nav>
        <div class="contents">
            <h1>${title}</h1>
            <div class="content">
                <%
                from flask import get_flashed_messages
                
                %>
                % for flash in get_flashed_messages():
                
                <div class="flash">${flash}</div>
                
                % endfor
                <script>setTimeout(function () { $(".flash").fadeOut();  }, 3000);</script>
                <%block name="content">
                </%block>
            </div>
    </div>
</div>
<div id="loading_ajax">
</div>
<script>
    var navigation = responsiveNav(".nav-collapse", {customToggle: "#toggle"});
    
    $('.tooltip').tooltipster({
        animation: 'fade',
        delay: 100,
        trigger: 'click'
    });
    
</script>
<%block name="jscript_block">
</%block>
</body>
</html>
