-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathform.twig
More file actions
70 lines (67 loc) · 2.52 KB
/
Copy pathform.twig
File metadata and controls
70 lines (67 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'layout.twig' %}
{% block body %}
<style>
.docs-header__menu-add {
visibility: hidden;
}
</style>
<section data-module="writing">
<textarea name="module-settings" hidden>
{
"page": {{ page | json_stringify | escape }}
}
</textarea>
<header class="writing-header">
<div class="writing-header__inner-container">
{% set currentPageId = 0 %}
{% if page is not empty %}
{% set currentPageId = page._id %}
{% endif %}
<div class="select-wrapper">
{% if parentsChildrenOrdered is not empty %}
<label for="parent">Parent Page</label>
{% else %}
<label for="parent">New Page at the</label>
{% endif %}
<select id="parent" name="parent">
<option value="0">Root</option>
{% for entry in parentSelectOptions %}
{% set _page = entry.page %}
{% if toString(_page._id) != toString(currentPageId) %}
<option value="{{ toString(_page._id) }}" {{ page is not empty and toString(page._parent) == toString(_page._id) ? 'selected' : ''}}>
{{- entry.indent -}}{{- _page.title -}}
</option>
{% endif %}
{% endfor %}
</select>
</div>
{% if parentsChildrenOrdered is not empty %}
<div class="select-wrapper">
<label for="above">Put Above</label>
<select id="above" name="above">
<option value="0">—</option>
{% for _page in parentsChildrenOrdered %}
<option value="{{ toString(_page._id) }}">{{ _page.title }}</option>
{% endfor %}
</select>
</div>
{% endif %}
{% if page is not empty %}
<div class="uri-input-wrapper">
<label for="uri-input">Alias</label>
<input type="text" id="uri-input" class="uri-input" name="uri-input" placeholder="URI (Optional)" value="{{ page.uri }}">
</div>
{% endif %}
</div>
</header>
<div class="writing-editor">
<div id="editorjs"></div>
</div>
<div class="writing-buttons">
{% include 'components/button.twig' with {label: 'Save changes', name: 'js-submit-save', icon: 'check'} %}
{% if toString(page._id) is not empty %}
{% include 'components/button.twig' with {label: 'Delete doc', name: 'js-submit-remove', icon: 'trash', style: 'warning'} %}
{% endif %}
</div>
</section>
{% endblock %}