<div class="navbar" id="bg_image" data-image-count="9">
  <div class="navbar-inner">
      <a href="<%= MetacatUI.root || "/" %>" class="home">
        <img alt="Metacat" src="<%= MetacatUI.root %>/img/metacat_logo.png?v=<%=MetacatUI.metacatUIVersion%>" class="logo">
        <span class="title"><%= MetacatUI.appModel.get("repositoryName")%></span>
      </a>
      <a id="nav-trigger"><i class="icon-reorder icon"></i><i class="icon-remove icon hidden"></i></a>
      <ul class="nav" id="main-nav">
        <li><a class="show-new-search" href="<%= MetacatUI.root %>/data">Data</a></li>
        <li><a class="show-new-search" href="<%= MetacatUI.root %>/<%=MetacatUI.appModel.get('portalTermPlural')%>"><%=MetacatUI.appModel.get('portalTermPlural')%></a></li>
        <!-- Uncomment this line to enable portal listing from main app menu. -->
        <!-- <li><a href="<%= MetacatUI.root %>/search">Portals</a></li> -->
        <li><a href="<%= MetacatUI.root %>/profile">Summary</a></li>
        <li><a href="<%= MetacatUI.root %>/about">About</a></li>
        <li class="input input-append">
        	<form id="direct-search" action="#">
	        	<label class="tooltip-this" data-title="Go directly to a dataset by pasting its full DOI or ID here.">Jump to:</label>
	        	<input type="text" name="direct-search" value="" placeholder="DOIx or ID" class="direct-search" form="direct-search"/>
	        	<button class="btn direct-search" form="direct-search">Go</button>
	        </form>
        </li>
        <li class="minimal-nav hidden">
          <a href="<%=MetacatUI.root%>/">Hosted by <%=MetacatUI.appModel.get('title')%></a>
        </li>
        <% if (loggedIn && username) {
        	print(
        	'<li class="dropdown minimal-nav user-menu">',
				'<a href="" class="dropdown-toggle" data-toggle="dropdown">',
					'<i class="icon icon-on-left icon-user"></i><span class="user-name">',
          (firstName || formattedName),
          '</span><i class="icon icon-caret-down icon-on-right"></i>',
				'</a>',
				'<ul class="dropdown-menu hidden">',
					'<li class="dropdown-header">', formattedName, '</li>',
					'<li class="divider"></li>',
					'<li><a href="' + MetacatUI.root + '/submit" class="show-new-editor">Submit data</a></li>');

          if( MetacatUI.appModel.get("enableUserProfiles") ){ %>
            <li><a href="<%=(MetacatUI.root + '/profile/' + username)%>">My Profile</a></li>
          <% }

					print('<li><a href="' + MetacatUI.root + '/data/my-data">My datasets</a></li>');

          if(MetacatUI.appModel.get("showMyPortals") !== false && MetacatUI.appModel.get("enableUserProfiles") && MetacatUI.appModel.get("enableUserProfileSettings")){ %>
            <li>
              <a href="<%= MetacatUI.root %>/profile/<%=username%>/s=settings/s=portals">
                My <%= MetacatUI.appModel.get("portalTermPlural") %>
              </a>
            </li>
          <% }
					print('<li class="divider"></li>',
					'<li><a href="' + MetacatUI.root + '/signout">Sign out</a></li>',
				'</ul>',
			'</li>');
        } else {
        	print(
        		'<li id="SignIn" class="share-feature minimal-nav"><a href="' + MetacatUI.root + '/signin">Sign In</a></li>'
        	);
        } %>

      </ul>
  </div><!-- /.navbar-inner -->
</div><!-- /.navbar -->
