Gitlab CSE Unil

annotation.html 8.72 KB
Newer Older
1
2
3
{% extends "adim/annotation.html" %}
{% load static i18n %}

4
5
6
7
8
9
10

{# ================ #}
{# MAIN TOP TAB-BAR #}
{# ================ #}
{% block tool-top-row %}
<div class="col-xs-12">
{% if is_owner or display_shared_annotations %}
11
12
    <ul class="nav nav-tabs adim-view-mod-tabs" role="tablist">
        <li class="nav-item active">
13
            <a class="nav-link" href="#!annoter" role="tab" data-adim-mode="edit" data-toggle="tooltip" title="Ajouter et modifier vos annotations">
14
                <span class="fa fa-edit"></span> Annoter
15
16
17
            </a>
        </li>
        {% if display_shared_annotations %}
18
19
20
        <li class="nav-item">
            <a class="nav-link" href="#!afficher" role="tab" data-adim-mode="review" data-toggle="tooltip" title="Afficher les annotations partagées des autres membres">
                <span class="fa fa-eye"></span> Annotations partagées
21
22
23
24
            </a>
        </li>
        {% endif %}
        {% if is_owner %}
25
26
        <li class="nav-item">
            <a class="nav-link" href="{% url "adim.env.cimaf:cimaf_analysis" anobj_uuid=anobj.uuid %}" role="tab"
27
               data-toggle="tooltip" title="Afficher le module d'analyse des données">
28
                <span class="fa fa-chart-bar"></span> Analyse
29
30
31
32
33
34
35
36
37
38
39
40
            </a>
        </li>
        {% endif %}
    </ul>
{% endif %}
</div>
{% endblock tool-top-row %}


{# ============== #}
{# MAIN CONTAINER #}
{# ============== #}
41
42
43
44
45
46
{% block main_container %}
{% with adim_env="adim-env-cimaf" %}
    {{ block.super }}
{% endwith %}
{% endblock %}

47

48
49
50
51
{# ============= #}
{# Drawing Tools #}
{# ============= #}
{% block draw-tool-tb %}
52
    <label class="btn btn-lg btn-primary" title="Selection (A)">
53
        <input type="radio" name="toolType" value="select" id="tool-select" data-tool-name="select">
54
        <span class="fa fa-mouse-pointer"></span><span class="tool-text"> Select</span>
55
    </label>
56
    <label class="btn btn-lg btn-primary" title="Déplacement (Espace)">
57
        <input type="radio" name="toolType" value="pan" id="tool-pan" data-tool-name="pan">
58
        <span class="fa fa-hand-paper"></span><span class="tool-text"> Pan</span>
59
60
    </label>

61
    <label class="btn btn-lg btn-primary" title="Bords de champ (B)">
62
63
64
        <input type="radio" name="toolType" value="fieldedges" id="tool-fieldedges" data-tool-name="fieldedges">
        <span class="adim-icon-bord-de-champ"></span>
    </label>
65
    <label class="btn btn-lg btn-primary" title="Strie concordante (C)">
66
67
68
        <input type="radio" name="toolType" value="concordantstr" id="tool-concordantstr" data-tool-name="concordantstr">
        <span class="adim-icon-concordant"></span>
    </label>
69
    <label class="btn btn-lg btn-primary" title="Strie discordante (D)">
70
71
72
        <input type="radio" name="toolType" value="discordantstr" id="tool-discordantstr" data-tool-name="discordantstr">
        <span class="adim-icon-discordant"></span>
    </label>
73
    <label class="btn btn-lg btn-primary" title="Zone de concordance (Z)">
74
75
76
        <input type="radio" name="toolType" value="cmsarea" id="tool-cmsarea" data-tool-name="cmsarea">
        <span class="adim-icon-zone-concordance"></span>
    </label>
77
    <label class="btn btn-lg btn-primary" title="Rectangle (R)">
78
        <input type="radio" name="toolType" value="rectangle" id="tool-rectangle" data-tool-name="rectangle">
79
        <span class="far fa-square"></span><span class="tool-text"> Rectangle</span>
80
    </label>
81
    <label class="btn btn-lg btn-primary" title="Flèche (F)">
82
        <input type="radio" name="toolType" value="arrow" id="tool-arrow" data-tool-name="arrow">
83
        <span class="fa fa-arrow-right"></span><span class="tool-text"> Flèche</span>
84
85
86
    </label>
{% endblock %}

87

88
89
90
91
{# =============== #}
{# Tool parameters #}
{# =============== #}
{% block param-tool-tb %}
92
93
94
95
96
97
98
99
100
101
102
103
    <div class="btn-group" id="tool-colorselect" role="group">
        <button id="btnGroupDrop1" type="button" class="btn btn-light tinter dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
        data-attr-name="color" title="Choix de la couleur">
          <span class="adim-icon-color"></span>
        </button>
        <div class="dropdown-menu color-menu right" aria-labelledby="btnGroupDrop1">
          <a class="dropdown-item c4" href="#"></a>
          <a class="dropdown-item c6" href="#"></a>
          <a class="dropdown-item c7" href="#"></a>
        </div>
    </div>

104
    <div class="sldr btn btn-light" id="attr-size-slider">
105
106
107
108
109
        <span class="adim-icon-line-width" title="Epaisseur du trait"></span>
        <input type="text" class="slider" value="7" autocomplete="off"
               data-attr-name="size">
    </div>

110
    <div class="sldr btn btn-light" id="attr-opacity-slider">
111
112
113
114
115
        <span class="adim-icon-opacity" title="Opacité"></span>
        <input type="text" class="slider" value="100" autocomplete="off"
               data-attr-name="opacity">
    </div>

116
    <button class="btn btn-light" id="attr-orderup" type="button" autocomplete="off"
117
            title="Mettre au premier plan. shift-click: avancer de un niveau">
118
        <i class="material-icons">flip_to_front</i>
119
120
    </button>

121
    <button class="btn btn-light" id="attr-orderdown" type="button" autocomplete="off"
122
            title="Mettre à l'arrière-plan. shift-click: reculer d'un niveau">
123
        <i class="material-icons">flip_to_back</i>
124
125
126
127
128
129
130
131
    </button>
{% endblock param-tool-tb %}


{# ================= #}
{# Side Panel Column #}
{# ================= #}
{% block side-col-panel-group %}
132
133
    {% block publication-panel %}{{ block.super }}{% endblock %}

134
    <a class="btn btn-secondary btn-sm btn-block d-inline-flex" data-toggle="collapse" href="#collapseDisplay" role="button"
135
       aria-expanded="false" aria-controls="collapseDisplay">
136
        <div>Afficher</div> <i class="fas fa-chevron-circle-up ml-auto"></i>
137
138
139
140
141
142
    </a>

    <div id="annotation-display-panel">
        <div class="collapse show panel-dark" id="collapseDisplay">
            <div class="card card-body">
              <div class="card-text text-center" id="annotation-display-container">
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
                <div class="btn-group-vertical adim-display-type-selector">
                    <button type="button" class="btn btn-sm btn-adim-layer active"
                            data-type-name="concordantstr,discordantstr">
                        <span class="adim-icon-concordant"></span>&emsp;Stries
                    </button>
                    <button type="button" class="btn btn-sm btn-adim-layer active"
                            data-type-name="cmsarea">
                        <span class="adim-icon-zone-concordance"></span>&emsp;Zones
                    </button>
                    <button type="button" class="btn btn-sm btn-adim-layer active"
                            data-type-name="fieldedges">
                        <span class="adim-icon-bord-de-champ"></span>&emsp;Bords de champ
                    </button>
                    <button type="button" class="btn btn-sm btn-adim-layer active"
                            data-type-name="image">
                        <span class="glyphicon glyphicon-picture"></span>&emsp;Image
                    </button>
                </div>
161
              </div>
162
163
164
            </div>
        </div>
    </div>
165
166
167
168
169

    {% block property-panel %}{{ block.super }}{% endblock %}

    {% block members-panel %}{{ block.super }}{% endblock %}
{#    {{ block.super }}#}
170
171
172
173
174
175
176
177
{% endblock %}


{# ============== #}
{# Property Panel #}
{# ============== #}
{% block property-panel-content %}
    <div class="property-group confidence-prop">
178
        <label class="control-label" for="confidence-input">Confiance :</label>
179
180
181
182
        <input id="confidence-input" name="confidence" type="number" class="form-control rating" data-display="on" data-min="1" data-max="3"/>
    </div>

    <div class="property-group comment-prop">
183
        <label class="control-label" for="prop-annot-comment">Commentaire&hairsp;:</label>
184
185
186
187
        <textarea class="form-control" id="prop-annot-comment" name="comment"></textarea>
    </div>

    <div class="property-group nbconcordance-prop">
188
        <label class="control-label">Concordances:</label>
189
        <span class="badge badge-default" id="prop-annot-nbconcordance" name="nbconcordance"></span>
190
191
192
193
194
    </div>
{% endblock property-panel-content %}



195
196
197
198
199
200
{% block content_js %}
    <script type="application/javascript" src="{% static "js/libs/require.min.js" %}" data-main="{% static "js/cimaf_app" %}{{ JS_MIN }}"></script>
{% endblock %}



201
202
203
204
205
206
207
208
209
210
{% comment %}
{# This js config allow to specify the annotation types to be displayed. #}
{# If not defined, it will be built from the tools found in the tool bars #}
{% block inline_script %}
    {{ block.super }}
<script>
window.ADIM_CONFIG.activeTools = ['select', 'pan', 'drawing', 'lines', 'rectangle', 'arrow'];
</script>
{% endblock inline_script %}
{% endcomment %}