2014-02-02 14:21:16 +01:00
{% extends "base.html" %}
2012-07-08 16:23:39 +02:00
2012-07-22 10:47:24 +02:00
{% block head %}
< script type = "text/javascript" src = "/static/js/tinymce/jscripts/tiny_mce/tiny_mce.js" > < / script >
2012-09-26 21:13:11 +02:00
< script type = "text/javascript" >
var external_list = "/tinyMCEExternalList/post/edit/{{ post_id }}";
< / script >
2012-09-11 22:25:58 +02:00
< script type = "text/javascript" src = "/static/js/dynastie.js" > < / script >
2012-07-22 10:47:24 +02:00
{% endblock %}
2012-07-08 16:23:39 +02:00
{% block content %}
2012-10-11 22:26:47 +02:00
< form id = "previewForm" action = "/post/edit/{{ post_id }}" method = "post" > {% csrf_token %}
2012-07-08 16:23:39 +02:00
{{ form.as_p }}
2013-11-03 09:17:24 +01:00
Available tags:
< select id = "available_tags" size = 5 >
{% for tag in all_tags %}< option > {{ tag.name }}
{% endfor %}
< / select >
< input type = "button" onclick = "addTag();" value = "Add Tag" / >
2014-01-04 13:43:38 +01:00
< br / > Editor < select name = "editor" id = "editor" onchange = "switchEditor();" >
{% if editor == "html" %}
< option value = "html" selected = "selected" > HTML
< option value = "text" > Text
{% else %}
< option value = "html" > HTML
< option value = "text" selected = "selected" > Text
{% endif %}
< / select > < br / >
{% if editor == "html" %}
< textarea id = "content" name = "content" cols = "100" rows = "25" class = "mceAdvanced" > {{ content }}< / textarea > < br / >
{% else %}
< textarea id = "content" name = "content" cols = "100" rows = "25" > {{ content }}< / textarea > < br / >
{% endif %}
2012-11-08 21:23:30 +01:00
< input type = "submit" name = "edit" value = "Edit" / > < input type = "button" name = "preview" value = "Preview" onClick = "previewPost({{ blog_id }});" / > < input type = "submit" name = "cancel" value = "Cancel" / >
2012-07-08 16:23:39 +02:00
< / form >
2012-10-04 21:49:33 +02:00
< div class = "comments" >
2012-10-20 19:05:29 +02:00
{% for comment in comments %}
2012-10-04 21:49:33 +02:00
< div class = "comment" >
< div class = "infos" >
2013-02-09 09:48:30 +01:00
< a href = "/comment/edit/{{ comment.id }}" > #{{ comment.id }}< / a > < span class = "author" > {{ comment.author }}< / span > < span class = "mail" > {{ comment.email|default:"no mail" }}< / span > < span class = "date" > {{ comment.date|date:"D d M Y H:m" }}< span > < a href = "/comment/delete/{{ comment.id }}" onclick = "return confirm('Do you really want to delete this item ?')" > delete< / a >
2012-10-04 21:49:33 +02:00
< / div >
< div class = "content" >
2013-02-09 09:48:30 +01:00
{% autoescape off %}
2012-10-04 21:49:33 +02:00
{{ comment.the_comment }}
2013-02-09 09:48:30 +01:00
{% endautoescape %}
2012-10-04 21:49:33 +02:00
< / div >
{% endfor %}
2014-01-04 13:43:38 +01:00
< / div > < br / >
{% if editor == "html" %}
< div id = "markdown_help" style = "display:none" >
{% else %}
< div id = "markdown_help" >
{% endif %}
< b > Markdown syntax< / b > < br / > < br / >
< table >
< tr >
< td class = "markdown_help" >
< pre style = "display:inline" > _italic_< / pre > < span style = "font-style:italic" > italic< / span > < br / >
< pre style = "display:inline" > **bold**< / pre > < span style = "font-weight:bold" > bold< / span > < br / >
< pre style = "display:inline" > ~~line through~~< / pre > < span style = "text-decoration:line-through" > line through< / span > < br / >
2014-03-27 18:25:36 +01:00
< pre style = "display:inline" > ~underline~< / pre > < span style = "text-decoration:underline" > underline< / span > < br / >
2014-01-04 13:43:38 +01:00
< pre style = "display:inline" > >Citation< / pre > < br / >
< pre >
* Unordered list
* Second element
< / pre >
< ul >
< li > Unordered list
< li > Second element
< / ul >
< pre >
1. Ordered list
1. Second element
< / pre >
< ol >
< li > Ordered list
< li > Second element
< / ol >
< 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 / >
2014-05-19 18:20:25 +02:00
< 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 / >
2014-01-04 13:43:38 +01:00
< pre style = "display:inline" > [Link](http://www.wikipedia.org)< / pre > < a href = "http://www.wikipedia.org" > Link< / a > < br / > < br / >
2014-07-22 20:53:11 +02:00
< pre >
2015-09-21 19:05:25 +02:00
Code : 4 whitespaces ahead OR
```language
Code
```
2014-07-22 20:53:11 +02:00
< / pre >
2014-01-04 13:43:38 +01:00
< / td >
< td >
< pre > # Title # or
Title
=====< / pre >
< h1 > Title< / h1 >
< pre > ## Sub title ## or
Sub title
---------< / pre >
< h2 > Sub title< / h2 >
< pre > ### Sub sub title ###< / pre >
< h3 > Sub sub title< / h3 >
< / td >
< / tr >
< / table >
2012-10-04 21:49:33 +02:00
< / div >
2012-07-08 16:23:39 +02:00
{% endblock %}