blob: 0a22513959cfd0f53811b45a2cc840b613d3832c (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
<aside class="home">
<details class="hidephone" id="json">
<summary>File</summary>
<div class="submenu">
<h2>Import page as file</h2>
<form action="<?= $this->url('artupload') ?>" method="post" enctype="multipart/form-data">
<input type="file" name="pagefile" id="pagefile" accept=".json">
<label for="pagefile">JSON Page file</label>
<input type="hidden" name="erase" value="0">
<input type="hidden" name="datecreation" value="0">
</br>
<input type="text" name="id" id="id" placeholder="new id (optionnal)">
<label for="id">change ID</label>
</br>
<input type="checkbox" name="datecreation" id="datecreation" value="1">
<label for="datecreation">Reset date creation as now</label>
</br>
<input type="checkbox" name="author" id="author" value="1">
<label for="author">Reset author(s) as just you</label>
</br>
<input type="checkbox" name="erase" id="erase" value="1">
<label for="erase">Replace if already existing</label>
</br>
<input type="submit" value="upload">
</form>
<h2>Export database</h2>
<p>Future feature</p>
</div>
</details>
<details class="hidephone" id="display">
<summary>Display</summary>
<div class="submenu">
<h2>Worksapce</h2>
<form action="">
<ul>
<?php foreach ($user->display() as $id => $setting) { ?>
<li>
<input type="checkbox" name="display[<?= $id ?>]" id="display_<?= $id ?>" value="true" <?= $setting ? 'checked' : '' ?>>
<label for="display_<?= $id ?>"><?= $id ?></label>
</li>
<?php } ?>
</ul>
<input type="submit" value="update display">
</form>
<h2>Columns</h2>
<form action="<?= $this->url('homecolumns') ?>" method="post">
<ul>
<?php
foreach (Model::COLUMNS as $col) { ?>
<li>
<input type="checkbox" name="columns[]" value="<?= $col ?>" id="col_<?= $col ?>" <?= in_array($col, $user->columns()) ? 'checked' : '' ?>>
<label for="col_<?= $col ?>"><?= $col ?></label>
</li>
<?php } ?>
</ul>
<input type="submit" value="update columns">
</form>
</div>
</details>
<details class="hidephone" id="selection" <?= !empty($optlist) ? 'open' : '' ?>>
<summary>Selection</summary>
<div class="submenu">
<h2>Rendering</h2>
<form action="<?= $this->url('homerenderall') ?>" method="post">
Render selected pages
</br>
<input type="submit" value="renderall">
</form>
<h2>Get LIST code</h2>
<i>Generate code to display a list of pages</i>
<form action="<?= $this->url('homequery') ?>" method="post">
<input type="hidden" name="query" value="1">
<input type="hidden" name="title" value="0">
<input type="checkbox" name="title" id="list_title" value="1" <?= !empty($optlist) && !$optlist->title() ? '' : 'checked' ?>>
<label for="list_title">Show title</label>
</br>
<input type="hidden" name="description" value="0">
<input type="checkbox" name="description" id="list_description" value="1" <?= !empty($optlist) && $optlist->description() ? 'checked' : '' ?>>
<label for="list_description">Show description</label>
</br>
<input type="hidden" name="thumbnail" value="0">
<input type="checkbox" name="thumbnail" id="list_thumbnail" value="1" <?= !empty($optlist) && $optlist->thumbnail() ? 'checked' : '' ?>>
<label for="list_thumbnail">Show thumbnail</label>
</br>
<input type="hidden" name="date" value="0">
<input type="checkbox" name="date" id="list_date" value="1" <?= !empty($optlist) && $optlist->date() ? 'checked' : '' ?>>
<label for="list_date">Show date</label>
</br>
<input type="hidden" name="author" value="0">
<input type="checkbox" name="author" id="list_author" value="1" <?= !empty($optlist) && $optlist->author() ? 'checked' : '' ?>>
<label for="list_author">Show author(s)</label>
</br>
<select name="style" id="list_style">
<option value="0">list</option>
<option value="1" <?= !empty($optlist) && $optlist->style() == 1 ? 'selected' : '' ?>>div</option>
</select>
<input type="submit" value="generate">
</form>
<?php if(!empty($optlist)) { ?>
<code><?= $optlist->getcode() ?></code>
<?php } ?>
</div>
</details>
<details class="hidephone" id="bookmarks">
<summary>Bookmarks</summary>
<div class="submenu">
<h2>Public</h2>
<?php if(!empty(Config::bookmark())) { ?>
<form action="<?= $this->url('homebookmark') ?>" method="post">
<ul>
<?php foreach (Config::bookmark() as $id => $query) { ?>
<li>
<label for="public-bookmark_<?= $id ?>">
<a href="<?= $query ?>" title="<?= $query ?>"><?= $id ?></a>
</label>
<?php if($user->issupereditor()) { ?>
<input type="checkbox" name="id[]" value="<?= $id ?>" id="public-bookmark_<?= $id ?>">
<?php } ?>
</li>
<?php } ?>
</ul>
<input type="hidden" name="action" value="del">
<input type="submit" value="delete selected" class="floatright">
</form>
<?php } elseif($user->issupereditor()) { ?>
<p>This will store your filters settings as a Bookmark that every editors users can use.</p>
<?php } else { ?>
<p>No public Bookmarks yet</p>
<?php } ?>
<?php if($user->issupereditor()) { ?>
<form action="<?= $this->url('homebookmark') ?>" method="post">
<input type="text" name="id" placeholder="bookmark id" minlength="1" maxlength="16">
<input type="hidden" name="query" value="<?= $opt->getadress() ?>">
<input type="submit" name="action" value="add">
</form>
<?php } ?>
<h2>Personnal</h2>
<?php if(!empty($user->bookmark())) { ?>
<form action="<?= $this->url('homebookmark') ?>" method="post">
<ul>
<?php foreach ($user->bookmark() as $id => $query) { ?>
<li>
<a href="<?= $query ?>" title="<?= $query ?>"><?= $id ?></a>
<input type="checkbox" name="id[]" value="<?= $id ?>">
</li>
<?php } ?>
</ul>
<input type="hidden" name="action" value="del">
<input type="hidden" name="user" value="<?= $user->id() ?>">
<input type="submit" value="delete selected" class="floatright">
</form>
<?php } else { ?>
<p>This will store your filters settings as a Bookmark that only you can use.</p>
<?php } ?>
<form action="<?= $this->url('homebookmark') ?>" method="post">
<input type="text" name="id" placeholder="bookmark id" minlength="1" maxlength="16">
<input type="hidden" name="query" value="<?= $opt->getadress() ?>">
<input type="hidden" name="user" value="<?= $user->id() ?>">
<input type="submit" name="action" value="add">
</form>
</div>
</details>
</aside>
|