blob: 6cd4bff40684f67517e27abc8e8c55c842c271e5 (
plain)
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
|
{% load i18n %}
<div class="row toolbar">
{% if previous or next %}
<div class='col-md-2'>
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans 'History'%}">
{% if previous %}
<button type="button" class="btn btn-secondary"
data-toggle="tooltip" data-placement="bottom"
title="{{previous}}"
onclick='load_window("{% url histo_url item.pk previous|date:"c"%}");$("#{{window_id}}").hide();return false;'>
<i class="fa fa-step-backward"></i>
</button>
{% endif %}
{% if next %}
<button type="button" class="btn btn-secondary"
data-toggle="tooltip" data-placement="bottom"
onclick='if(confirm("{%trans 'Are you sure to restore to this version? All changes made since this version will be lost.' %}")){load_url("{% url revert_url item.pk item.history_date|date:"c"%}");closeAllWindows();load_window("{% url show_url item.pk None %}");}'
title="{% trans 'Restore this version' %}">
<i class="fa fa-history"></i>
</button>
<button type="button" class="btn btn-secondary"
data-toggle="tooltip" data-placement="bottom"
onclick='load_window("{% url histo_url item.pk next|date:"c" %}");$("#{{window_id}}").hide();return false;'
title="{{next}}">
<i class="fa fa-step-forward"></i>
</button>
{% endif %}
</div>
</div>
<div class='offset-md-6 col-md-4 text-right'>
{% else %}
<div class='offset-md-8 col-md-4 text-right'>
{% endif %}
{% if pin_action and item.SLUG %}
<div class="btn-group btn-group-sm" role="group"
aria-label="{% trans 'Pin' %}">
<a class="btn btn-secondary pin-action" href="#"
onclick='$.get("{% url "pin" item.SLUG item.pk %}", function(){load_shortcut_menu(); display_info("{% trans 'Item pined in your shortcut menu.' %}")});' title="{% trans 'Pin' %}">
<i class="fa fa-thumb-tack"></i>
</a>
</div>
{% endif %}
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans 'Actions' %}">
{% block extra_actions %}{% endblock %}
{% if modify_url %}
<a class="btn btn-success" href='{% url modify_url item.pk %}'
title="{% trans 'Modify' %}">
<i class="fa fa-pencil"></i>
</a>
{% endif %}
{% for url, base_text, icon, extra_text, css_class, is_qa in extra_actions %}
<a class="{% if is_qa %}btn-qa {% endif %}btn btn-success{% if css_class %} {{css_class}}{% endif %}"
{% if is_qa %}href="#" data-target="{{url}}"{% else %}href='{{url}}'{% endif %} title="{{base_text}}">
<i class="{{icon}}"></i> {{extra_text}}
</a>
{% endfor %}
</div>
<div class="btn-group btn-group-sm" role="group"
aria-label="{% trans 'Export' %}">
<a class="btn btn-secondary" href='{% url show_url item.pk "odt" %}'
title='{% trans "Export as OpenOffice.org file"%}'>
ODT <i class="fa fa-file-word-o" aria-hidden="true"></i>
<a class="btn btn-secondary" href='{% url show_url item.pk "pdf" %}'
title='{% trans "Export as PDF file"%}'>
PDF <i class="fa fa-file-pdf-o" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
{% if next %}
<div class="alert alert-warning" role="alert">
{% trans "Relation between items are not historized." %}
</div>
{% endif %}
<script type="text/javascript">
$(document).ready(function(){
register_qa_on_sheet();
});
</script>
|