entries.html
3.93 KB
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
{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %}{% trans "Hasła" %}{% endblock %}
{% block styles %}
<!-- for autocomplete -->
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<!-- https://datatables.net/ -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.22/sc-2.0.3/datatables.min.css"/>
<!--link rel="stylesheet" type="text/css" href="{% static 'entries/css/panels.css' %}"-->
<link rel="stylesheet" type="text/css" href="{% static 'entries/css/entries.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'common/css/role_colours.css' %}">
{% endblock %}
{% block scripts %}
<!-- https://datatables.net/ -->
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.22/sc-2.0.3/datatables.min.js"></script>
<script src="{% static 'common/js/csrf.js' %}"></script>
<!--script src="{% static 'entries/js/panels.js' %}"></script-->
<script src="{% static 'entries/js/forms.js' %}"></script>
<script src="{% static 'entries/js/utils.js' %}"></script>
<script src="{% static 'entries/js/entries.js' %}"></script>
{% endblock %}
{% block lastvisited %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="nav-last" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans "Ostatnio oglądane" %}
</a>
<div class="dropdown-menu" id="last-visited-dropdown" aria-labelledby="nav-last">
{% for lemma, eid in request.session.last_visited|slice:":-1" %}
<a class="dropdown-item text-uppercase last-visited" data-entry="{{ eid }}" href="#">{{ lemma }}</a>
{% endfor %}
</div>
</li>
{% endblock %}
{% block settings %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="nav-options" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans "Opcje" %}
</a>
<div class="dropdown-menu px-1" id="options-dropdown" aria-labelledby="nav-options">
<div class="form-check custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="show-realisation-descriptions"{% if request.session.show_reals_desc %} checked{% endif %}>
<label class="custom-control-label" for="show-realisation-descriptions">
{% trans "Wyświetlaj opisy realizacji" %}
</label>
</div>
</div>
</li>
{% endblock %}
{% block content %}
<div class="row h-100 m-0 p-0 bg-secondary">
<!-- left panel: list of entries -->
<div id="entries-list" class="col-2 h-100 w-100 px-0 border-right border-primary">
<div id="filter-div" class="col p-0 bg-primary">
<button type="button" id='filter-button' class="btn btn-primary" data-toggle="modal" data-target="#entry-filters">
{% trans "Filtrowanie" %}
</button>
</div>
<div id="entries-list-div" class="col p-0 h-100 w-100 overflow-auto">
{% include "entries_list.html" %}
</div>
</div>
<!-- right panel: entry display (syntax, semantics, examples) -->
<div id="entry-display" class="col h-100 p-0">
{% include "entry_display.html" %}
</div>
</div>
<div class="modal fade" id="entry-filters" tabindex="-1" role="dialog" aria-labelledby="entry-filtersLabel" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="entry-filtersLabel">{% trans "Filtrowanie haseł" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body text-dark">
{% crispy entries_form %}
</div>
</div>
</div>
</div>
{% endblock %}