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 hidden_categories = "{{ user.hidden_categories }}";
5 hidden_categories = hidden_categories.split(",");
6 </script>
7 {% endblock %}
8 {% block left %}
9 {% if authenticated %}
10 <a href="/note/add">Add a note</a>
11 {% endif %}
12 <div id="categories">
13{% for meta_note in notes_by_category %}
14<div class="category" category_id="{{ meta_note.category_id }}">
15 <div id="category_{{ meta_note.category_id }}" class="name" ondblclick="edit_category({{ meta_note.category_id }}, '{{ meta_note.category }}')">
16 <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 }})
17 </div>
18 <div class="edit_category" id="edit_category_{{ meta_note.category_id }}">
19 <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 }}');">
20 {% csrf_token %}
21 <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"/>
22 </form>
23 </div>
24 <div id="content_{{ meta_note.category_id }}" class="content" >
25 {% for note in meta_note.notes %}
26 <div class="note">
27 <a href="/note/{{ note.id}}" oncontextmenu="return DoEdit('{{ note.id}}');"><div class="title">{{ note.title }}</div></a>
28 <div class="date">{{ note.created_date }}</div>
29 <div class="summary">{{ note.short_summary }}</div>
30 </div>
31 {% endfor %}
32 </div>
33</div>
34{% endfor %}
35{% if notes_without_category|length != 0 %}
36<div class="category" category_id="-1">
37 <div id="category_-1" class="name">
38 <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>
39 <div id="content_-1" class="content">
40 {% for note in notes_without_category %}
41 <div class="note">
42 <a href="/note/{{ note.id}}" oncontextmenu="return DoEdit('{{ note.id}}');"><div class="title">{{ note.title }}</div></a>
43 <div class="date">{{ note.created_date }}</div>
44 <div class="summary">{{ note.short_summary }}</div>
45 </div>
46 {% endfor %}
47 </div>
48</div>
49{% else %}
50{% if notes_by_category|length == 0 %}
51<b>Any note</b>
52{% endif %}
53{% endif %}
54 </div>
55 {% endblock %}

Archive Download this file

Branches

Tags