{% block navbar %}
<div class="container-fluid navbar-inverse navbar-fixed-top">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      {% if not current_user.is_authenticated %}
         <a class="navbar-brand" href="{{ url_for('vmanager.index') }}" rel="home"><span><img style="max-width:100px; margin-top: -7px;" src="../static/images/hex24.png"></span> proxmaster</a>
      {% else %}
         <a class="navbar-brand" href="{{ url_for('vmanager.index') }}" rel="home"><span><img style="max-width:100px; margin-top: -7px;" src="../static/images/hex24.png"></span> proxmaster</a>
      {% endif %}
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">

        {% if current_user.is_authenticated %}
        <li class="dropdown">
          <a href="#" class="dropdown-togle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Solution Market<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="{{ url_for('vmanager.market') }}">Applications</a></li>
            <li><a href="{{ url_for('vmanager.market') }}">Schemas</a></li>
          </ul>


        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Community<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="{{ url_for('vmanager.dashboard') }}">Groups</a></li>
            <li><a href="{{ url_for('vmanager.dashboard') }}">Blog</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">r5</a></li>
          </ul>
        </li>
        {% endif %}

      </ul>

      <ul class="nav navbar-nav navbar-right">
        {% if not current_user.is_authenticated %}
        <li><a href="{{ url_for('auth.register') }}">Register</a></li>
        <li><a href="{{ url_for('auth.login') }}">Login</a></li>
        {% else %}
        <li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="{{ current_user.gravatar(20) }}"> {{ current_user.email }} <span class="caret"></span></a>
          <ul class="dropdown-menu">

            <li><a href="{{ url_for('vmanager.dashboard') }}"><span class="glyphicon glyphicon-eye-open"></span> Dashboard</a></li>
            <li><a href="{{ url_for('vmanager.profile') }}"><span class="glyphicon glyphicon-flag"></span> Policy</a></li>
            <li><a href="{{ url_for('vmanager.profile') }}"><span class="glyphicon glyphicon-list"></span> Drafts</a></li>

            <li role="separator" class="divider"></li>
            <li><a href="{{ url_for('vmanager.profile') }}"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
            <li><a href="{{ url_for('vmanager.profile') }}"><span class="glyphicon glyphicon-question-sign"></span> Help</a></li>
            <li><a href="{{ url_for('vmanager.profile') }}"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
            <li><a href="{{ url_for('auth.logout') }}"><span class="glyphicon glyphicon-off"></span> Logout</a></li>
          </ul>
        </li>
        {% endif %}
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
{% endblock %}


