lemma_notes.html
2.39 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
<script type="text/javascript">
ax_change_id = -1;
$("tr.NotesTableRow").click(function(){
selectNotesTr(this.id)});
$("span#lemma-notes-count").empty();
$("span#lemma-notes-count").append("{{ messages|length }}");
</script>
<div id='add_lemma_note'>
<form class="lemma-notes-form" method="post"> {% csrf_token %}
{{ add_note_form.as_p }}
<p class="lexeme-save">
<button type="submit" id="lemma-notes-form-submit">
Zapisz
</button>
<button type="reset" id="lemma-notes-form-cancel">
Wyczyść
</button>
</p>
</form>
</div>
<div id="show_lemma_notes">
{% if messages %}
<p>
<strong>Notatki:</strong>
</p>
<table class='ChangeControlTable' id='lemma-notes-table'>
<tr>
<td class='ColumnHeader'>Data dodania:</td>
<td class='ColumnHeader'>Temat wiadomości:</td>
<td class='ColumnHeader'>Nadawca:</td>
</tr>
{% for message in messages %}
<tr class='NotesTableRow' id="note_{{message.id}}">
<td>{{message.time}}</td>
<td>{{message.topic}}</td>
<td>{{message.sender.username}}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if private_messages %}
<p>
<strong>Prywatne notatki:</strong>
</p>
<table class='ChangeControlTable' id='lemma-notes-table'>
<tr>
<td class='ColumnHeader'>Data modyfikacji:</td>
<td class='ColumnHeader'>Temat wiadomości:</td>
<td class='ColumnHeader'>Nadawca:</td>
</tr>
{% for message in private_messages %}
<tr class='NotesTableRow' id="note_{{message.id}}">
<td>{{message.time}}</td>
<td>{{message.topic}}</td>
<td>{{message.sender.username}}</td>
</tr>
{% endfor %}
</table>
{% endif %}
<p>
<button type="button" id="remove_lemma_note" style="width:120px">Usuń</button>
<button type="button" id="modify_lemma_note" style="width:120px">Modyfikuj</button>
</p>
<p id="lemma_note_text">
</p>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("button#remove_lemma_note").click(function(){removeLemmaNote(window.selected_notes_row_id)});
$("button#modify_lemma_note").click(function(){modifyLemmaNote(window.selected_notes_row_id, '.lemma-notes-form')});
$('.lemma-notes-form #id_message_text').width($(window).width() - $('#left').width() - 60)
});
</script>