Gitlab CSE Unil

essai.html 3.39 KB
Newer Older
Julien Furrer's avatar
Julien Furrer committed
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
94
95
96
{% extends "base.html" %}
{% load static i18n %}

{% block page_head %}{% endblock %}

{% block main_container %}
<div class="container" id="main-home">
    <div class="row">
        <div class="col-sm-12">
            <div id="aom-list-panel" class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        {% trans "Liste des annotables" %}
                        <button class="btn btn-xs btn-success pull-right">
                            <span class="glyphicon glyphicon-plus"></span>&nbsp;
                            {% trans "Ajouter une image" %}
                        </button>
                    </h3>
                </div>
                <div class="panel-body">
                    <div id="aom-list-container"></div>
                    <div id="aom-dropzone">
                        <div class="well text-center lead">
                                <small>
                                    {% trans "Pour ajouter une image, glissez le fichier ici ou cliquez sur" %}
                                </small>&nbsp;
                                <button class="btn btn-success">
                                    <span class="glyphicon glyphicon-plus"></span>&nbsp;
                                    {% trans "Ajouter une image" %}
                                </button>
                        </div>
                    </div>
                </div>


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


{% block js_templates %}
{# ===== MODAL DLG EditName ===== #}
<div class="modal" id="aom-edit-name-dlg">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">{% trans "Changer le nom du document à annoter" %}</h4>
      </div>
      <div class="modal-body">
          <p>
              <input type="text" class="form-control" name="ao-name" placeholder="{% trans "Nom du document à annoter" %}"/>
          </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-sm btn-default" data-dismiss="modal">{% trans "Annuler" %}</button>
        <button type="button" class="btn btn-sm btn-primary btn-submit">{% trans "Enregistrer" %}</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/template" id="aom-list-item">
      <span class="name" title="Clicker pour éditer"><%= name %></span>
    <a href="<%= '{% url "adim.app:annotate" anobj_id="_" %}'.replace('_', id) %>">
      <img src="<%= image_thumb %>">
    </a>
</script>
<script type="text/template" id="aom-list-item-popup-content">
<dl class="dl-horizontal">
    <dt>{% trans "Modifié le" %} :</dt>
    <dd>(last modif date)</dd>
    <dt>{% trans "Annotations" %} :</dt>
    <dd><%= annotations.length %></dd>
</dl>
</script>

{% endblock %}

{% block inline_script %}
<script>
    window.ADIM_CONFIG = {
        mode: "edit",
        csrfToken: "{{ csrf_token }}",
        api: {
            baseUrl: "{% url "api-root" %}"
        }
    };
</script>
{% endblock %}

{% block content_js %}
    {{ block.super }}
    <script src="{% static "js/libs/require.min.js" %}" data-main="{% static "js/anobj_mgr" %}"></script>
{% endblock %}