blob: 540806b24f993af49bef5623806430df6d629dca (
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
<aside class="home">
<?php if($user->issupereditor()) { ?>
<details class="hidephone" id="json">
<summary>File</summary>
<div class="submenu">
<h2>Import page as file</h2>
<form action="<?= $this->url('pageupload') ?>" method="post" enctype="multipart/form-data">
<input type="file" name="pagefile" id="pagefile" accept=".json" required>
<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="edit">
<summary>Edit</summary>
<div class="submenu">
<i>Edit selected pages</i>
<form action="<?= $this->url('multi') ?>" method="post" id="multi">
<h2>Edit Meta infos</h2>
<input type="text" name="datas[title]" id="title">
<label for="title">title</label>
</br>
<input type="text" name="datas[description]" id="description">
<label for="description">description</label>
</br>
<strong>Tag</strong>
</br>
<input type="hidden" name="reset[tag]" value="0">
<input type="checkbox" name="reset[tag]" id="resettag" value="1">
<label for="resettag">reset tag(s)</label>
</br>
<input type="text" name="addtag" id="addtag">
<label for="addtag">add tag(s)</label>
</br>
<strong>Date</strong>
</br>
<input type="hidden" name="reset[date]" value="0">
<input type="checkbox" name="reset[date]" id="resetdate" value="1">
<label for="resetdate">reset date as now</label>
</br>
<input type="date" name="datas[pdate]" id="date">
<label for="date">Date</label>
</br>
<input type="time" name="datas[ptime]" id="time">
<label for="time">Time</label>
</br>
<strong>Privacy</strong>
</br>
<select name="datas[secure]" id="setlevel">
<option value="" selected>--keep privacy--</option>
<option value="0">public</option>
<option value="1">private</option>
<option value="2">not_published</option>
</select>
<label for="setlevel">Privacy level</label>
</br>
<strong>Images</strong>
</br>
<select name="datas[favicon]" id="favicon">
<option value="" selected>--keep favicon--</option>
<option value="!" >--unset favicon--</option>
<?php
foreach ($faviconlist as $favicon) {
echo '<option value ="' . $favicon . '">' . $favicon . '</option>';
}
?>
</select>
<label for="favicon">Favicon</label>
</br>
<select name="datas[thumbnail]" id="thumbnail">
<option value="" selected>--keep thumbnail--</option>
<option value="!">--unset thumbnail--</option>
<?php
foreach ($thumbnaillist as $thumbnail) {
echo '<option value ="' . $thumbnail . '">' . $thumbnail . '</option>';
}
?>
</select>
<label for="thumbnail">Thumnail</label>
</br>
<strong>Templates</strong>
</br>
<select name="datas[templatebody]" id="templatebody">
<option value="" selected>--keep template body--</option>
<option value="!" >--unset template body--</option>
<?php
foreach ($pagelist as $page) {
echo '<option value ="' . $page . '">' . $page . '</option>';
}
?>
</select>
<label for="templatebody">Body</label>
</br>
<select name="datas[templatecss]" id="templatecss">
<option value="" selected>--keep css template--</option>
<option value="!" >--unset css template--</option>
<?php
foreach ($pagelist as $page) {
echo '<option value ="' . $page . '">' . $page . '</option>';
}
?> </select>
<label for="templatecss">CSS</label>
</br>
<select name="datas[templatejavascript]" id="templatejavascript">
<option value="" selected>--keep javascript template--</option>
<option value="!" >--unset javascript template--</option>
<?php
foreach ($pagelist as $page) {
echo '<option value ="' . $page . '">' . $page . '</option>';
}
?> </select>
<label for="templatejavascript">Javascript</label>
</br>
<strong>Advanced</strong>
</br>
<input type="number" name="datas[sleep]" id="sleep" min="0" max="180">
<label for="sleep">Sleep time (seconds)</label>
</br>
<input type="hidden" name="reset[redirection]" value="0">
<input type="checkbox" name="reset[redirection]" id="resetredirection" value="1">
<label for="resetredirection">reset redirection</label>
</br>
<input type="text" name="datas[redirection]" id="redirection" list="searchdatalist">
<label for="redirection" title="page_id or URL like https://domain.org">Redirection</label>
</br>
<input type="number" name="datas[refresh]" id="refresh" min="0" max="180">
<label for="refresh">refresh time (seconds)</label>
</br>
<strong>Author</strong>
</br>
<select name="addauthor" id="addauthor">
<option value="" disabled selected>--add author--</option>
<?php
foreach ($editorlist as $editor) {
echo '<option value ="' . $editor . '">' . $editor . '</option>';
}
?>
</select>
<label for="addauthor">Author</label>
</br>
<input type="hidden" name="reset[author]" value="0">
<input type="checkbox" name="reset[author]" id="resetauthor" value="1">
<label for="resetauthor">Empty Authors</label>
</br>
<input type="hidden" name="reset[datemodif]" value="0">
<input type="checkbox" name="reset[datemodif]" id="resetdatemodif" value="1" checked>
<label for="resetdatemodif">update modification date</label>
</br>
<input type="submit" name="action" value="edit">
<h2>Render</h2>
<input type="submit" name="action" value="render">
<h2>Delete</h2>
<input type="hidden" name="confirmdelete" value="0">
<input type="checkbox" name="confirmdelete" id="confirmdelete" value="1">
<label for="confirmdelete">confirm</label>
<input type="submit" name="action" value="delete">
</form>
</div>
</details>
<?php } ?>
<details class="hidephone" id="selection" <?= !empty($optlist) ? 'open' : '' ?>>
<summary>Filter</summary>
<div class="submenu">
<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="time" value="0">
<input type="checkbox" name="time" id="list_time" value="1" <?= !empty($optlist) && $optlist->time() ? 'checked' : '' ?>>
<label for="list_time">Show time</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">
<?= options(Wcms\Model::LIST_STYLES , !empty($optlist) ? $optlist->style() : null) ?>
</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(Wcms\Config::bookmark())) { ?>
<form action="<?= $this->url('homebookmark') ?>" method="post">
<ul>
<?php foreach (Wcms\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>
<details class="hidephone" id="display">
<summary>Display</summary>
<div class="submenu">
<h2>Columns</h2>
<form action="<?= $this->url('homecolumns') ?>" method="post">
<ul>
<?php
foreach (Wcms\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>
<?php if($user->issupereditor() && !empty($colors)) { ?>
<h2>Tag colors</h2>
<form action="<?= $this->url('homecolors') ?>" method="post">
<?= $colors->htmlcolorpicker() ?>
<input type="submit" value="update">
</form>
<?php } ?>
</div>
</details>
</aside>
|