base.html.twig 4.63 KB
Newer Older
arnaudbey's avatar
add app  
arnaudbey committed
1
2
3
4
5
6
7
8
9
10
11
{% set logged = app.user is not null ? true : false %}
{% set generalParameters = getGeneralParameters() %}

<!DOCTYPE html>
<html lang="{{ app.request.locale|split('_')[0] }}">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <meta charset="UTF-8"/>
Arnaud Bey's avatar
Arnaud Bey committed
12
        <title>{% block title %}MAGIC WORD{% endblock %}</title>
Arnaud Bey's avatar
Arnaud Bey committed
13
        <link rel="stylesheet" href="{{ asset('css/bootstrap.css')}}" type="text/css"/>
arnaudbey's avatar
add app  
arnaudbey committed
14
15
16
17
18
19
20
        <link rel="stylesheet" href="{{ asset('css/main.css')}}" type="text/css"/>
        {% block stylesheets %}{% endblock %}
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
    </head>
    <body>
        {% block topToHideWhilePlaying %}
        <a href="{{ path('home') }}">
Arnaud Bey's avatar
Arnaud Bey committed
21
            <div id="header-logo"></div>
arnaudbey's avatar
add app  
arnaudbey committed
22
23
24
25
        </a>
        <div class="header-buttons">
            <div class="btn-group-sm btn-group-vertical">
            {% if logged %}
Arnaud Bey's avatar
Arnaud Bey committed
26
                <a href="{{ path('fos_user_security_logout') }}" class="btn btn-secondary btn-sm">
Arnaud Bey's avatar
Arnaud Bey committed
27
                    <i class="fas fa-sign-out-alt"></i>
Arnaud Bey's avatar
Arnaud Bey committed
28
                    <span class="d-none d-md-inline">{{ 'logout' | trans }}</span>
arnaudbey's avatar
add app  
arnaudbey committed
29
                </a>
Arnaud Bey's avatar
WIP UI    
Arnaud Bey committed
30
                {% if is_granted('ROLE_ADMIN') %}
Arnaud Bey's avatar
Arnaud Bey committed
31
                    <a class="btn btn-secondary btn-sm" href="{{ path('admin_index') }}">
Arnaud Bey's avatar
Arnaud Bey committed
32
33
                        <i class="fas fa-tools"></i>
                          <span class="d-none d-md-inline">Administration</span>
Arnaud Bey's avatar
Arnaud Bey committed
34
                    </a>
Arnaud Bey's avatar
WIP UI    
Arnaud Bey committed
35
                {% endif %}
arnaudbey's avatar
add app  
arnaudbey committed
36
37
            {% else %}
                {% if getGeneralParameters().selfRegistration %}
Arnaud Bey's avatar
Arnaud Bey committed
38
                <a href="{{ path('fos_user_registration_register') }}" class="btn btn-secondary btn-sm">
arnaudbey's avatar
add app  
arnaudbey committed
39
                    <i class="fa fa-user-plus" aria-hidden="true"></i>
Arnaud Bey's avatar
Arnaud Bey committed
40
                    <span class="d-none d-md-inline">{{ 'register' | trans }}</span>
arnaudbey's avatar
add app  
arnaudbey committed
41
42
                </a>
                {% endif %}
Arnaud Bey's avatar
Arnaud Bey committed
43
                <a href="{{ path('fos_user_security_login') }}" class="btn btn-secondary btn-sm">
Arnaud Bey's avatar
Arnaud Bey committed
44
                    <i class="fas fa-sign-in-alt"></i>
Arnaud Bey's avatar
Arnaud Bey committed
45
                    <span class="d-none d-md-inline">{{ 'login' | trans }}</span>
arnaudbey's avatar
add app  
arnaudbey committed
46
47
                </a>
            {% endif %}
Arnaud Bey's avatar
Arnaud Bey committed
48
            </div>
arnaudbey's avatar
add app  
arnaudbey committed
49
50
        </div>
        {% endblock %}
Arnaud Bey's avatar
Arnaud Bey committed
51
52
53
54
55
56
57
        <div class="container pb-4">
          {% for label, flashes in app.session.flashbag.all %}
              {% for flash in flashes %}
              <div class="alert alert-{{ label }}" role="alert">{{ flash }}</div>
              {% endfor %}
          {% endfor %}
          {% block body %}{% endblock %}
arnaudbey's avatar
add app  
arnaudbey committed
58

Arnaud Bey's avatar
Arnaud Bey committed
59
60
61
62
63
64
          <div class="modal" tabindex="-1" id="please-wait" role="dialog" data-backdrop="static" data-keyboard=false>
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <div class="modal-body noselect">
                  <img src="{{ asset('img/squares.gif')}}"/>
                  <h3 id="please-wait-message"></h3>
arnaudbey's avatar
add app  
arnaudbey committed
65
                </div>
Arnaud Bey's avatar
Arnaud Bey committed
66
              </div>
arnaudbey's avatar
add app  
arnaudbey committed
67
            </div>
Arnaud Bey's avatar
Arnaud Bey committed
68
          </div>
arnaudbey's avatar
add app  
arnaudbey committed
69

Arnaud Bey's avatar
Arnaud Bey committed
70
          <div class="modal" tabindex="-1" id="info-modal" role="dialog">
Arnaud Bey's avatar
Arnaud Bey committed
71
72
73
74
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <div class="modal-body noselect">
                  <h3 id="info-modal-message"></h3>
arnaudbey's avatar
add app  
arnaudbey committed
75
                </div>
Arnaud Bey's avatar
Arnaud Bey committed
76
              </div>
arnaudbey's avatar
add app  
arnaudbey committed
77
            </div>
Arnaud Bey's avatar
Arnaud Bey committed
78
79
80
81
82
          </div>

        </div>
        {% block bottomToHideWhilePlaying %}
        <div id="footer">
Arnaud Bey's avatar
Arnaud Bey committed
83
84
85
86
87
88
          <span class="badge badge-light">
            <a class="" href="https://gricad-gitlab.univ-grenoble-alpes.fr/lzbk/MagicWord">
              <i class="fab fa-gitlab"></i> Source
            </a>
          </span>
          -
Arnaud Bey's avatar
Arnaud Bey committed
89
          {{ generalParameters.footer|raw}}
arnaudbey's avatar
add app  
arnaudbey committed
90
        </div>
Arnaud Bey's avatar
Arnaud Bey committed
91
        {% endblock %}
arnaudbey's avatar
add app  
arnaudbey committed
92
93

        <div id="users-device-size">
Arnaud Bey's avatar
Arnaud Bey committed
94
          <div id="xs" class="d-block d-sm-none"></div>
Arnaud Bey's avatar
Arnaud Bey committed
95
96
97
98
          <div id="sm" class="d-none d-sm-inline d-md-none"></div>
          <div id="md" class="d-none d-md-inline d-lg-none"></div>
          <div id="lg" class="d-none d-lg-inline d-xl-none"></div>
          <div id="xl" class=".d-none d-xl-inline"></div>
arnaudbey's avatar
add app  
arnaudbey committed
99
100
101
102
103
104
105
106
        </div>

        <script type="text/javascript" src="{{ asset('js/translations.js')}}"></script>
        <script type="text/javascript" src="{{ asset('js/main.js')}}"></script>
        <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
        {% block javascripts %}{% endblock %}
    </body>
</html>