Dénote

Dénote Git Source Tree

Root/denote/templates/base_user.html

1{% extends "base.html" %}
2 {% block head %}
3 <script type="text/javascript">
4 var hidden_categories = "{{ user.hidden_categories }}";
5 hidden_categories = hidden_categories.split(",");
6 function get_csrf_token() { return '{{ csrf_token }}';}
7 </script>
8 {% endblock %}
9 {% block left %}
10 {% if authenticated %}
11 <a href="/note/add">Add a note</a>
12 {% endif %}
13 <div id="categories">
14{% for meta_note in notes_by_category %}
15<div class="category" category_id="{{ meta_note.category_id }}">
16 <div id="category_{{ meta_note.category_id }}" class="name" ondblclick="edit_category({{ meta_note.category_id }}, '{{ meta_note.category }}')">
17 <img id="minus_{{ meta_note.category_id }}" src="{{ STATIC_URL }}images/denote_minus.png" onclick="hide_category({{ meta_note.category_id }},true);"/><img id="plus_{{ meta_note.category_id }}" src="{{ STATIC_URL }}images/denote_plus.png" onclick="show_category({{ meta_note.category_id }},true);"/>{{ meta_note.category }} ({{ meta_note.notes|length }})
18 </div>
19 <div class="edit_category" id="edit_category_{{ meta_note.category_id }}">
20 <form id="form_edit_category_{{ meta_note.category_id }}" action="/category/edit/{{ meta_note.category_id }}" method="post" onsubmit="return submit_category_name({{ meta_note.category_id }}, '{{ meta_note.category }}');">
21 {% csrf_token %}
22 <input id="cat_name_{{ meta_note.category_id }}" onkeypress="handleKeyPress(event, {{ meta_note.category_id }}, '{{ meta_note.category }}')" onblur="end_edit_category({{ meta_note.category_id }})" name="new_cat_name"/>
23 </form>
24 </div>
25 <div id="content_{{ meta_note.category_id }}" class="content" >
26 {% for note in meta_note.notes %}
27 <div class="note">
28 <a href="/note/{{ note.id}}" oncontextmenu="return DoEdit('{{ note.id}}');"><div class="title">{{ note.title }}</div></a>
29 <div class="date">{{ note.created_date }}</div>
30 <div class="summary">{{ note.short_summary }}</div>
31 </div>
32 {% endfor %}
33 </div>
34</div>
35{% endfor %}
36{% if notes_without_category|length != 0 %}
37<div class="category" category_id="-1">
38 <div id="category_-1" class="name">
39 <img id="minus_-1" src="{{ STATIC_URL }}images/denote_minus.png" onclick="hide_category(-1,true);"/><img id="plus_-1" src="{{ STATIC_URL }}images/denote_plus.png" onclick="show_category(-1,true);"/>Other ({{ notes_without_category|length }})</div>
40 <div id="content_-1" class="content">
41 {% for note in notes_without_category %}
42 <div class="note">
43 <a href="/note/{{ note.id}}" oncontextmenu="return DoEdit('{{ note.id}}');"><div class="title">{{ note.title }}</div></a>
44 <div class="date">{{ note.created_date }}</div>
45 <div class="summary">{{ note.short_summary }}</div>
46 </div>
47 {% endfor %}
48 </div>
49</div>
50{% else %}
51{% if notes_by_category|length == 0 %}
52<b>Any note</b>
53{% endif %}
54{% endif %}
55 </div>
56 {% endblock %}

Archive Download this file

Branches

Tags