summaryrefslogtreecommitdiffstats
path: root/templates/layout.html
blob: 5439633d7c3267ba89d80002b84ba981efc5f21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
  <head>
    <title>Padlite Teams</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Bootstrap -->
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/bootstrap-theme.min.css') }}" rel="stylesheet">

    <link href="{{ url_for('static', filename='css/custom.css') }}" rel="stylesheet">
  </head>
  <body>
    <div class="container">
      <nav class="navbar navbar-default" role="navigation">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <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" href="{{ url_for('index') }}"><b>Padlite-Teams</b></a>

          <div class="nav navbar-left">
            <ol class="breadcrumb">
              <li{% if not breadcrumbs %} class="active"{% endif %}>
                {% if breadcrumbs %}<a href="{{ url_for('index') }}">{% endif %}
                  Home
                {% if breadcrumbs %}</a>{% endif %}
              </li>

            {% for breadcrumb in breadcrumbs %}
              <li{% if loop.last %} class="active"{% endif %}>
                {% if not loop.last %}<a href="{{ breadcrumb.href }}">{% endif %}
                  {{breadcrumb.text}}
                {% if not loop.last %}</a>{% endif %}
              </li>
            {% endfor %}
            </ol>
          </div>
        </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 navbar-right">
            {% if current_user.is_authenticated() %}
              <li>
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                     aria-haspopup="true" aria-expanded="false">
                    <span class="glyphicon glyphicon-user"></span>
                    {{ current_user.name }}
                    <span class="caret"></span>
                  </a>

                  <ul class="dropdown-menu">
                    <li>
                      <a href="{{ url_for('logout') }}">
                        <span class="glyphicon glyphicon-log-out"></span>
                        Logout
                      </a>
                    </li>
                  </ul>
                </li>
              </li>
            {% else %}
              <li>
                <a href="{{ url_for('login') }}">
                  <span class="glyphicon glyphicon-log-in"></span>
                  Login
                </a>
              </li>
            {% endif %}
          </ul>
        </div><!-- /.navbar-collapse -->
      </nav>

      {% for categorie, message in get_flashed_messages(with_categories=true) %}
        {% if categorie == 'message' %}
          <div class="alert alert-danger">{{ message }}</div>
        {% else %}
          <div class="alert alert-{{categorie}}">{{ message }}</div>
        {% endif %}
      {% endfor %}

      {% block content %}{% endblock %}
    </div>

    <script src="{{ url_for('static', filename='js/jquery-1.10.2.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
  </body>
</html>