forked from babybuddy/babybuddy
/
note_list.html
71 lines (65 loc) · 2.83 KB
/
note_list.html
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
{% extends 'babybuddy/page.html' %}
{% load datetime i18n widget_tweaks %}
{% block title %}{% trans "Notes" %}{% endblock %}
{% block breadcrumbs %}
<li class="breadcrumb-item active" aria-current="page">{% trans "Notes" %}</li>
{% endblock %}
{% block content %}
<h1>
{% trans "Notes" %}
{% if perms.core.add_note %}
<a href="{% url 'core:note-add' %}" class="btn btn-sm btn-success">
<i class="icon-note" aria-hidden="true"></i> {% trans "Add Note" %}
</a>
{% endif %}
</h1>
{% include 'babybuddy/filter.html' %}
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="thead-inverse">
<tr>
<th>{% trans "Actions" %}</th>
<th>{% trans "Time" %}</th>
{% if not unique_child %}
<th>{% trans "Child" %}</th>
{% endif %}
<th>{% trans "Note" %}</th>
<th>{% trans "Tags" %}</th>
</tr>
</thead>
<tbody>
{% for note in object_list %}
<tr>
<td>
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans "Actions" %}">
{% if perms.core.change_note %}
<a href="{% url 'core:note-update' note.id %}" class="btn btn-primary">
<i class="icon-update" aria-hidden="true"></i>
</a>
{% endif %}
{% if perms.core.delete_note %}
<a href="{% url 'core:note-delete' note.id %}" class="btn btn-danger">
<i class="icon-delete" aria-hidden="true"></i>
</a>
{% endif %}
</div>
</td>
<th scope="row">{{ note.time|datetime_short }}</th>
{% if not unique_child %}
<td><a href="{% url 'core:child' note.child.slug %}">{{ note.child }}</a></td>
{% endif %}
<td>{{ note.note }}</td>
<td>
{% include "core/render_tag_list.html" with tags=note.tags.all %}
</td>
</tr>
{% empty %}
<tr>
<th colspan="4">{% trans "No notes found." %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% include 'babybuddy/paginator.html' %}
{% endblock %}