base.html 5.67 KB
Newer Older
Timo Heikkilä's avatar
Timo Heikkilä committed
1
2
3
4

{% import "bootstrap/wtf.html" as wtf %}

<!doctype html>
Timo Heikkilä's avatar
Timo Heikkilä committed
5
<html>
Timo Heikkilä's avatar
Timo Heikkilä committed
6
7
8
9
10
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
11
12
13
14
    <link rel="stylesheet" href="{{ url_for('static', filename='lib/css/bootstrap.min.css') }}" ></link>
    <script src="{{ url_for('static', filename='lib/js/jquery-3.3.1.slim.min.js') }}" ></script>
    <script src="{{ url_for('static', filename='lib/js/popper.min.js') }}" ></script>
    <script src="{{ url_for('static', filename='lib/js/bootstrap.min.js') }}" ></script>
Timo Heikkilä's avatar
Timo Heikkilä committed
15
    <title>Onni</title>
Timo Heikkilä's avatar
Timo Heikkilä committed
16
17

    <!-- Bootstrap core CSS -->
18
    <link href="/lib/css/bootstrap.min.css" rel="stylesheet">
Timo Heikkilä's avatar
Timo Heikkilä committed
19
20
    
    <!-- Custom styles for this template -->
Timo Heikkilä's avatar
Timo Heikkilä committed
21
22
23
    
    <link href="/static/css/slider.css" rel="stylesheet">
    
Timo Heikkilä's avatar
Timo Heikkilä committed
24
25
26
27
  </head>
  <body>
    <header>
<!-- Navigation -->
28
<nav class="navbar navbar-expand bg-light fixed-top">
29

30
31
  
  
Timo Heikkilä's avatar
Timo Heikkilä committed
32
        {% if pages %}  
33
34
35
36
37
38
39

            <div class="navbar-brand font-weight-light"><span class="text-primary font-weight-bold">ID:{{ session['user']}}</span>
            </div>
            <div class="progress-bar progress-bar-striped" role="progressbar" style="width: {{ progress_bar_percentage }}%;" aria-valuemin="0" aria-valuemax="100">{{ _('Task progress:') }} {{   progress_bar_percentage }}%
            </div>


Timo Heikkilä's avatar
Timo Heikkilä committed
40
        {% else %}
41
42
43
44
45
46
47
48
  
  
          <div class="col-1 navbar-brand">
          <a href="{{ url_for('index') }}">
          <img class="mt-1 mb-1" src="/static/img/onni_LOGO-horizontal-RGB-transparent_bg_cut.png" alt="Logo" height=40">
          </a>
          
          
Timo Heikkilä's avatar
Timo Heikkilä committed
49
50
51
52
                  {% block navbar %}
                    {% with messages = get_flashed_messages() %}
                        {% if messages %}
                            {% for message in messages %}
53
54
55
                            
                                <a class="pl-5 text-align-center text-danger">{{ message }}</a>
                            
Timo Heikkilä's avatar
Timo Heikkilä committed
56
57
58
59
                            {% endfor %}
                        {% endif %}
                    {% endwith %}
                  {% endblock %}
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78


          
          
          
          </div>


     
     
       {% if current_user.is_authenticated %}



            <div class="col-11 text-primary text-right">
          


         <a class="nav-item" href="{{ url_for('researcher_info') }}" class="nav-link">Info |</a>
79
         <a class="nav-item" href="{{ url_for('create.create_experiment') }}" class="nav-link">Create |</a>
80
81
         <a class="nav-item" href="" class="nav-link">Archives |</a>
         <a class="nav-item" href="{{ url_for('logout') }}" class="nav-link">Logout |</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
82
83
84
85



        <a class="nav-item dropdown">
86
        <a class="nav-item dropdown-toggle text-align-right" href="#" id="navbarDropdown_auth" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Timo Heikkilä's avatar
Timo Heikkilä committed
87
88
          Language 
        </a>
89
        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown_auth">
Timo Heikkilä's avatar
Timo Heikkilä committed
90
91
92
93
94
95
          <a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Greek',   lang='el') }}">Greek</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
96
          <a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
97
        </div>
98
99
100
101
102
103
104
105
106
107
108
109
        </div>
        
        {% endif %}
                  

                  
        {% if current_user.is_anonymous %}
        
        <div class="col-11 text-primary text-right">
        
        

Timo Heikkilä's avatar
Timo Heikkilä committed
110
111
112
113

        <a class="nav-item dropdown-toggle text-align-right" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          Language
        </a>
114
        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
Timo Heikkilä's avatar
Timo Heikkilä committed
115
          
Timo Heikkilä's avatar
Timo Heikkilä committed
116
117
118
119
120
121
          <a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Greek',   lang='el') }}">Greek</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
          <a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
122

Timo Heikkilä's avatar
Timo Heikkilä committed
123
124
125
        </div>
                
                
126
        {% endif %}
Timo Heikkilä's avatar
Timo Heikkilä committed
127
128
            
            
129
        {% endif %}
Timo Heikkilä's avatar
Timo Heikkilä committed
130
131
132
133
134
135
136
137
138
139
140
            
            
</nav>
</header>
      
<main role="main" class="container">
          {% block content %}{% endblock %}
</main>
    <footer class="footer">
      <div class="container">
          <br>
141
        <span class="text-muted">Developed by Timo Heikkilä | Human Emotion Systems Labratory, Turku PET Centre | <a href="http://emotion.utu.fi">emotion.utu.fi</a></span>
Timo Heikkilä's avatar
Timo Heikkilä committed
142
143
144
145
146
147
148
149
150
151
152
153
      </div>
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
  </body>
</html>