{% load static %}

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>Ammico : Home</title>
  
  <link rel="stylesheet" type="text/css" href="{% static 'ammico/css/lib.css' %}"/>
  <link rel="stylesheet" type="text/css" href="{% static 'ammico/css/app.css' %}"/>
  
</head>
<body ng-controller="homeCtrl" ng-app="ammico" ng-cloak>
  <div class="navbar navbar-inverse" role="navigation">
      <div class="container">
        <div class="navbar-header row">
          <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 row logo" href="#/">
              <img src="{% static 'ammico/img/ammico_logo_small.png' %}">
          </a>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav" ng-controller="routeClassCtrl">
            <li ng-class="{active:isActive('/my_visit')}"><a href="#/my_visit">Ma dernière Visite</a></li>
            <li ng-class="{active:isActive('/visites')}"><a href="#/visites">Mes Visites</a></li>
            <li ng-class="{active:isActive('/books')}"><a href="#/books">Mes Books</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right" ng-controller="routeClassCtrl">
            <li ng-hide="globals.userLogged" ng-class="{active:isActive('/login')}"><a href="#/auth/login">Login</a></li>
            <li ng-show="globals.userLogged"><a href="#/auth/logout">Logout</a></li>
          </ul>
          <form class="search navbar-form navbar-right" role="search" ng-submit="searchSubmit()">
            <div class="form-group has-feedback">
                <input class="form-control" type="text" ng-model="q" placeholder="Chercher" />
                <span class="glyphicon glyphicon-search form-control-feedback" aria-hidden="true"></span>
            </div>
          </form>
        </div>
      </div>
  </div>
  <div class="container-fluid ammico-content">
      <div ng-view></div>
    <footer>
      <div class="row">
        <div class="footer-img col-sm-6">
            <a href="http://www.iri.centrepompidou.fr" target="_blank">
                <img src="{% static 'ammico/img/logo_IRI_footer.png' %}" alt="Logo IRI" />
            </a>
        </div>
        <div class="col-sm-6 text-right">
            ammico vBeta - ©2014
        </div>
      </div>
    </footer>
  </div>
  
  <script src="{% static 'ammico/js/lib.js' %}"></script>
  <script src="{% static 'ammico/js/templates.js' %}"></script>
  <script src="{% static 'ammico/js/app.js' %}"></script>
  
  <script type="text/javascript">
      angular.module("ammico")
          .value('context', {
              {% if context.token %} token: "{{ context.token }}", {% endif %}
  			  idExpo: "{{ context.idExpo }}",
			  record: angular.fromJson('{"record": "record value"}'),
              urls: {
                  ammicoUrl: "{{ context.ammicoUrl }}",
                  searchUrl: "{{ context.searchUrl }}",
              }
          });

  </script>
</body>
</html>
