<div class="navbar navbar-default {% if top %} navbar-fixed-top navbar-2{% endif %} screen-only hidden-xs">

  <div class="navbar-inner">
	<button class="btn pull-left btn-info" ng-click="print()">
      <i class="glyphicon glyphicon-print"></i>
      Print
    </button>

	<ul class="nav navbar-nav">
	  <li class="divider-vertical"></li>
	</ul>

	<button class="btn pull-left btn-info"
            ng-show="!profile.readonly"
            ng-click="addEpisode()">
      <i class="glyphicon glyphicon-plus"></i>
      Add Patient
    </button>

	<ul class="nav navbar-nav">
	  <li class="divider-vertical"></li>
	</ul>

    <ul class="nav navbar-nav nav-tabs" role="tablist">
	  {% for team in teams %}{% if not team.parent %}
      <li ng-class="{active: currentTag == '{{team.name }}' }"><a href="#/{% if discharged %}discharge{% else %}list{% endif %}/{{team.name}}">{{team.title}}</a></li>
	  {% endif %}{% endfor %}
    </ul>
    
	<ul class="nav navbar-nav">
	  <li class="divider-vertical"></li>
	</ul>

	<form class="navbar-search pull-right">
	  <input ng-model="query.hospital_number" ui-event="{focus: 'focusOnQuery()', blur: 'blurOnQuery()'}"
             type="text" class="input-small" placeholder="Hospital #">
	  <input ng-model="query.name" ui-event="{focus: 'focusOnQuery()', blur: 'blurOnQuery()'}"
             type="text" class="input-small" placeholder="Name">
	</form>

	<ul class="nav navbar-nav pull-right">
	  <li class="divider-vertical"></li>
	</ul>
  </div>
</div>


<div class="navbar navbar-nav navbar-default {% if top %}navbar-fixed-top navbar-3{% endif %} screen-only hidden-xs" id="subtags-nav">
  <div class="navbar-inner">
    <ul class="nav navbar-nav nav-tabs" role="tablist" id="subtags">
	  {% for team in teams %}
        {% if team.parent %}
            <li ng-class="{active: currentTag == '{{team.parent.name }}' && currentSubTag == '{{team.name}}' }"
                ng-show="currentTag == '{{team.parent.name}}'">
              <a href="#/{% if discharged %}discharge{% else %}list{% endif %}/{{team.parent.name}}/{{team.name}}">{{team.title}}</a>
            </li>
        {% endif %}
      {% endfor %}
    </ul>
  </div>
</div>
