Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
42b02240
Commit
42b02240
authored
May 06, 2017
by
Andreas Valder
Browse files
fixed multi line changes in changelog, closes #234
parent
b7a512d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
42b02240
...
...
@@ -14,6 +14,7 @@ from socket import gethostname
from
ipaddress
import
ip_address
,
ip_network
import
math
import
locale
import
base64
locale
.
setlocale
(
locale
.
LC_ALL
,
'de_DE.utf8'
)
...
...
@@ -28,6 +29,7 @@ app.add_template_global(gethostname, name='gethostname')
app
.
add_template_global
(
min
,
name
=
'min'
)
app
.
add_template_global
(
max
,
name
=
'max'
)
scheduler
=
sched
.
scheduler
()
def
run_scheduler
():
import
time
...
...
@@ -132,6 +134,10 @@ def evalperm(perms):
return
cperms
return
[{
'type'
:
'public'
}]
@
app
.
template_filter
()
def
base64encode
(
str
):
return
base64
.
b64encode
(
str
.
encode
(
'UTF-8'
)).
decode
(
'UTF-8'
)
@
app
.
template_filter
()
def
checkperm
(
perms
,
username
=
None
,
password
=
None
):
if
ismod
():
...
...
templates/changelog.html
View file @
42b02240
...
...
@@ -47,7 +47,7 @@
<td
style=
"white-space: nowrap;"
>
{{i.path}}
</td>
<td>
"{{i.value_old}}"
</td>
<td>
"{{i.value_new}}"
</td>
<td><button
onclick=
"moderator.api.set('{{i.path}}','{{i.value_old}}');alert('done');"
class=
"btn btn-default"
>
undo
</button></td>
<td><button
onclick=
"moderator.api.set('{{i.path}}',
atob(
'{{i.value_old
|base64encode
}}')
)
;alert('done');"
class=
"btn btn-default"
>
undo
</button></td>
</tr>
{% endfor %}
</table>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment