<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
  {%if user.is_authenticated%}
  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse navbar-ex1-collapse">
    <ul class="nav navbar-nav">
      <li><a href="{%url 'machine'%}">New machine</a></li>
    </ul>
    <form method="GET" class="navbar-form navbar-left" role="search" action="{%url 'machines'%}">
      <div class="form-group">
        <input type="text" name="query_machine" class="form-control" placeholder="Machine...">
      </div>
      <button type="submit" class="btn btn-default">Search!</button>
    </form>
    <form method="GET" action="{%url 'ifaces'%}" class="navbar-form navbar-left" role="search">
      <div class="form-group">
        <input type="text" name="query_iface" class="form-control" placeholder="Iface...">
      </div>
      <button type="submit" class="btn btn-default">Search!</button>
    </form>
    <a class="navbar-brand" href="javascript:void(0)" onclick="show_conflictip_form()">New IP conflict</a>
  </div><!-- /.navbar-collapse -->
{%endif%}
</nav>
