]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - templates/admin-planet-compose.html
netboot: Allow booting multiple architectures
[people/shoehn/ipfire.org.git] / templates / admin-planet-compose.html
1 {% extends "base.html" %}
2
3 {% block body %}
4 <div class="page-header">
5 <h2>{{ _("Compose new entry") }}</h2>
6 </div>
7
8 <form class="form-horizontal" action="" method="POST" name="entry">
9 {% raw xsrf_form_html() %}
10
11 {% if entry %}
12 <input type="hidden" name="id" value="{{ entry.id }}">
13 {% end %}
14
15 <div class="form-group">
16 <label class="control-label col-sm-2" for="inputTitle">{{ _("Title") }}</label>
17 <div class="col-sm-10">
18 <input class="form-control" type="text" name="title" id="inputTitle"
19 {% if entry %}value="{{ entry.title }}"{% end %} placeholder="{{ _("Title") }}">
20 </div>
21 </div>
22
23 <div class="form-group">
24 <div class="col-sm-10 col-sm-offset-2">
25 <textarea class="form-control" name="markdown" rows="12" id="inputMarkdown"
26 placeholder="{{ _("Content") }}">{% if entry %}{{ entry.markdown }}{% end %}</textarea>
27 </div>
28 </div>
29
30 <hr>
31
32 <div class="form-group">
33 <label class="control-label col-sm-2">{{ _("Status") }}</label>
34 <div class="col-sm-10">
35 <label class="radio inline">
36 <input type="radio" name="status" value="draft" {% if not entry or not entry.is_published() %}checked{% end %}>
37 {{ _("Draft") }}
38 </label>
39 <label class="radio inline">
40 <input type="radio" name="status" value="published" {% if entry and entry.is_published() %}checked{% end %}>
41 {{ _("Published") }}
42 </label>
43 </div>
44 </div>
45
46 <hr>
47
48 <div class="col-sm-10 col-sm-offset-2">
49 <button type="submit" class="btn btn-primary">{{ _("Save") }}</button>
50 <a class="btn btn-default" href="javascript:preview();">{{ _("Preview") }}</a>
51 <a class="btn btn-default" href="/planet">{{ _("Cancel") }}</a>
52 </div>
53 </form>
54
55 <br class="separator">
56
57 <div id="preview"></div>
58
59 <script type="text/javascript">
60 preview = function() {
61 $.postJSON("/api/planet/render", { text : $("#inputMarkdown").val() },
62 function(data) {
63 $("#preview").html(data.html);
64 }
65 );
66 }
67 </script>
68 {% end block %}