Dénote

Dénote Git Source Tree

Root/denote/templates/user_note.html

1{% extends "base_user.html" %}
2
3{% block content %}
4<div class="note">
5 {% if note and note_form != None %}
6 <div id="title" class="title" ondblclick="edit_note();">{{ note.title }}</div>
7 {% else %}
8 <div id="title" class="title">{{ note.title }}</div>
9 {% endif %}
10 {% if note and note.category != None %}
11 <div class="category">{{ note.category.name }}</div>
12 {% endif %}
13 <div id="transformed_content">{{ note.transformed_text|safe }}</div>
14 {% if note and note_form != None %}
15 <div class="edit_button"><input id="edit_button" type="button" value="Edit" onclick="edit_note();"/> <form id="form_delete" action="/note/{{ note.id }}" method="post">{% csrf_token %}<input type="submit" name="delete" value="Delete" onclick="return confirm('Do you really want to delete this note ?')"/></form></div>
16 <div id="div_edit">
17 <form id="form_edit" action="/note/{{ note.id }}" method="post">{% csrf_token %}
18 {{ note_form.as_p }}
19 Category <input name="category" list="all_categories" {% if note.category != None %} value="{{ note.category.name }}" {% endif %}>
20 <datalist id="all_categories">
21{% for category in categories %}
22<option value="{{ category.name }}"></option>
23{% endfor %}
24 </datalist><br/>
25 <input type="submit" name="edit" value="Edit" />
26 <input type="button" value="Cancel" onclick="cancel_edit_note();"/>
27 </form>
28 {% else %}
29 <div class="form_add">
30 <form action="/note/add" method="post">{% csrf_token %}
31 {{ note_form.as_p }}
32 Category <input name="category" list=all_categories>
33 <datalist id="all_categories">
34{% for category in categories %}
35<option value="{{ category.name }}"></option>
36{% endfor %}
37 </datalist><br/>
38 <input type="submit" name="add" value="Add" />
39 <input type="submit" name="cancel" value="Cancel" />
40 </form>
41 {% endif %}
42 <b>Markdown syntax</b><br /><br />
43 <table>
44 <tr>
45 <td class="markdown_help">
46<pre style="display:inline">_italic_</pre> <span style="font-style:italic">italic</span><br/>
47<pre style="display:inline">**bold**</pre> <span style="font-weight:bold">bold</span><br/>
48<pre style="display:inline">~~line through~~</pre> <span style="text-decoration:line-through">line through</span><br/>
49<pre style="display:inline">~underline~</pre> <span style="text-decoration:underline">underline</span><br/>
50<pre style="display:inline">>Citation</pre><br/>
51<pre>
52 * Unordered list
53 * Second element
54</pre>
55<ul>
56 <li>Unordered list
57 <li>Second element
58</ul>
59<pre>
60 1. Ordered list
61 1. Second element
62</pre>
63<ol>
64 <li>Ordered list
65 <li>Second element
66</ol>
67<pre style="display:inline">![Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
68<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
69<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
70<pre>
71 Code : 4 whitespaces ahead OR
72 ```language
73 Code
74 ```
75</pre>
76 </td>
77 <td>
78<pre># Title # or
79 Title
80 =====</pre>
81<h1>Title</h1>
82<pre>## Sub title ## or
83 Sub title
84 ---------</pre>
85<h2>Sub title</h2>
86<pre>### Sub sub title ###</pre>
87<h3>Sub sub title</h3>
88 </td>
89 </tr>
90 </table>
91 </div>
92</div>
93{% endblock %}

Archive Download this file

Branches

Tags