<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/">Annotation tool</a>
    </div>
    <!-- /.navbar-header -->
    <ul class="nav navbar-top-links navbar-right">
        {% if current_user.is_authenticated %}
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
            </a>
            <ul class="dropdown-menu dropdown-user">
                <li><a href="{{ url_for('auth.logout') }}">Salir</a></li>
            </ul>
        </li>
        {% endif %}
    </ul>
     {% if current_user.is_authenticated %}
    <div class="navbar-default sidebar" role="navigation">
        <div class="sidebar-nav navbar-collapse">
            <ul class="nav" id="side-menu">
                {% if current_user.is_admin %}
                <li>
                    <a href="{{ url_for('main.users') }}"><i class="fa fa-users fa-fw"></i>Usuarios</a>
                </li>
                <li>
                    <a href="{{ url_for('main.labels') }}"><i class="fa fa-sticky-note fa-fw"></i>Etiquetas</a>
                </li>
                <li>
                    <a href="{{ url_for('main.advanced') }}"><i class="fa fa-gears fa-fw"></i>Avanzado</a>
                </li>
                {% endif %}
                {% if users_with_pictures %}
                <li>
                    <a href="#"><i class="fa fa-folder-open fa-fw"></i> Catalogos<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        {% for user in users_with_pictures %}
                        <li>
                            <a href="{{ url_for('main.cataloguser', userid=user.id) }}" class="presentation")>
                                <i class="fa fa-picture-o fa-fw"></i> {{user.username}}
                                </a>
                        </li>
                        {% endfor %}
                    </ul>
                    <!-- /.nav-second-level -->
                </li>
                <li>
                    <a href="{{ url_for('main.create_dataset') }}" title="Generar dataset completo"><i class="fa fa-file-zip-o fa-fw" ></i>Dataset</a>
                </li>
                <li>
                    <a href="{{ url_for('main.export_train') }}" title="Descargar relacion imagen:id-etiqueta en txt"><i class="fa fa-download fa-fw" ></i>Train file</a>
                </li>
                <li>
                    <a href="{{ url_for('main.export_labels') }}" title="Descargar relacion id-etiqueta:nombre-etiqueta en txt"><i class="fa fa-download fa-fw" ></i>Labels file</a>
                </li>
                {% endif %}
            </ul>
        </div>
        <!-- /.sidebar-collapse -->
    </div>
    {% endif %}
    <!-- /.navbar-static-side -->
</nav>
