staff.twig 5.04 KB
Newer Older
1
{% extends "schools/index.twig" %}
2

3
{% import "schools/index.twig" as macros %}
4
5
6
7
8
9
10

{% block schoolTitle %}
    {{ parent() }} <small>Εκπαιδευτικοί</small>
{% endblock %}

{% block navItems %}
    <li role="presentation" class="pull-right">
11
        <a href="#" class="btn btn-primary btn-add-teacher" title="Καταχώρηση εκπαιδευτικού">
12
13
14
15
16
17
18
19
            <i class="visible-xs fa fa-plus"></i>
            <span class="hidden-xs">Καταχώρηση εκπαιδευτικού</span>
        </a>
    </li>
{% endblock %}

{% block schoolContent %}
<div id="school-staff">
kanellov's avatar
kanellov committed
20
21
22
23
24
    <p>
        Σε αυτή τη καρτέλα καταχωρούνται ο Δ/ντης του σχολείου, ο Υπεύθυνος 
        σχολικού εργαστηρίου και οι εκπαιδευτικοί που θα έχουν εξουσιοδότηση 
        καταχώρησης πληροφοριών στο σύστημα.
    </p>
25
26
27
28
29
30
31
32
33
34
35
36
37
    <div class="table-responsive">
        <table class="table table-hover table-striped">
            <thead>
                <tr>
                    <th>Όνομα</th>
                    <th>Επώνυμο</th>
                    <th>Τηλέφωνο</th>
                    <th>Email</th>
                    <th>Ειδικότητα</th>
                    <th>Θέση</th>
                </tr>
            </thead>
            <tbody>
38
39
40
41
42
                {% for teacher in staff %}
                    <tr data-teacher="{{ teacher|json_encode }}" data-id="{{ teacher.id }}">
                        <td class="name">{{ teacher.name }}</td>
                        <td class="surname">{{ teacher.surname }}</td>
                        <td class="telephone">{{ teacher.telephone }}</td>
43
                        <td class="email">
44
                            <a href="mailto:{{ teacher.email }}">{{ teacher.email }}</a>
45
                        </td>
46
47
                        <td class="branch">{{ teacher.branch }}</td>
                        <td class="position">{{ teacher.position }}</td>
48
49
                    </tr>
                    {% else %}
50
51
                    <tr class="no-records">
                        <td colspan="6" class="text-center text-muted">
kanellov's avatar
kanellov committed
52
                            Δεν έχουν καταχωρηθεί εκπαιδευτικοί.
53
54
55
56
57
58
59
60
61
62
63
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
            <tfoot>
            <tr>
                <th colspan="6"></th>
            </tr>
            </tfoot>
        </table>
    </div>
64
65
    <div class="modal fade" id="teacher-form-modal" tabindex="-1" role="dialog" aria-labelledby="teacher-from">
        <form class="form-horizontal" data-url="{{ path_for('school.staff') }}">
66
67
68
69
70
71
72
73
74
75
76
77
78
            <div class="modal-dialog" role="form">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title">Στοιχεία εκπαιδευτικού</h4>
                    </div>
                    <div class="modal-body">
                        {{ macros.input('name', 'Όνομα', '', 'text', {'required': ''}) }}
                        {{ macros.input('surname', 'Επώνυμο', '', 'text', {'required': ''}) }}
                        {{ macros.input('telephone', 'Τηλέφωνο','', 'tel', {'required': ''}) }}
                        {{ macros.input('email', 'Email','', 'email', {'required': ''}) }}
kanellov's avatar
kanellov committed
79
                        {{ macros.select('branch_id', 'Ειδικότητα', branches, '', {'required': ''}) }}
kanellov's avatar
kanellov committed
80
81
                        {{ macros.checkbox('is_principle', 'Διευθυντής') }}
                        {{ macros.checkbox('is_responsible', 'Υπεύθυνος εργαστηρίου') }}
82
83
84
                        <input type="hidden" name="id" value="">
                    </div>
                    <div class="modal-footer">
85
                        <button type="button" class="btn btn-danger pull-left remove">Διαγραφή</button>
86
87
88
89
90
91
92
93
                        <button type="button" class="btn btn-default" data-dismiss="modal">Κλείσιμο</button>
                        <button type="submit" class="btn btn-primary">Αποθήκευση</button>
                    </div>
                </div>
            </div>
        </form>
    </div>

94
95
96
97
    <script type="text/template" id="teacher-row">
        <td class="name"><%= teacher.name %></td>
        <td class="surname"><%= teacher.surname %></td>
        <td class="telephone"><%= teacher.telephone %></td>
98
        <td class="email">
99
            <a href="mailto:<%= teacher.email %>"><%= teacher.email %></a>
100
        </td>
101
102
        <td class="branch"><%= teacher.branch %></td>
        <td class="positionLabel"><%= teacher.position %></td>
103
104
105
106
107
108
109
    </script>

</div>
{% endblock %}

{% block inlinejs %}
    {{ parent() }}
110
    <script src="{{ base_url }}/js/schools/staff.js"></script>
111
{% endblock %}