Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jannik Hellenkamp
website
Commits
42b02240
Commit
42b02240
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
fixed multi line changes in changelog, closes #234
parent
b7a512d2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
server.py
+6
-0
6 additions, 0 deletions
server.py
templates/changelog.html
+1
-1
1 addition, 1 deletion
templates/changelog.html
with
7 additions
and
1 deletion
server.py
+
6
−
0
View file @
42b02240
...
@@ -14,6 +14,7 @@ from socket import gethostname
...
@@ -14,6 +14,7 @@ from socket import gethostname
from
ipaddress
import
ip_address
,
ip_network
from
ipaddress
import
ip_address
,
ip_network
import
math
import
math
import
locale
import
locale
import
base64
locale
.
setlocale
(
locale
.
LC_ALL
,
'
de_DE.utf8
'
)
locale
.
setlocale
(
locale
.
LC_ALL
,
'
de_DE.utf8
'
)
...
@@ -28,6 +29,7 @@ app.add_template_global(gethostname, name='gethostname')
...
@@ -28,6 +29,7 @@ app.add_template_global(gethostname, name='gethostname')
app
.
add_template_global
(
min
,
name
=
'
min
'
)
app
.
add_template_global
(
min
,
name
=
'
min
'
)
app
.
add_template_global
(
max
,
name
=
'
max
'
)
app
.
add_template_global
(
max
,
name
=
'
max
'
)
scheduler
=
sched
.
scheduler
()
scheduler
=
sched
.
scheduler
()
def
run_scheduler
():
def
run_scheduler
():
import
time
import
time
...
@@ -132,6 +134,10 @@ def evalperm(perms):
...
@@ -132,6 +134,10 @@ def evalperm(perms):
return
cperms
return
cperms
return
[{
'
type
'
:
'
public
'
}]
return
[{
'
type
'
:
'
public
'
}]
@app.template_filter
()
def
base64encode
(
str
):
return
base64
.
b64encode
(
str
.
encode
(
'
UTF-8
'
)).
decode
(
'
UTF-8
'
)
@app.template_filter
()
@app.template_filter
()
def
checkperm
(
perms
,
username
=
None
,
password
=
None
):
def
checkperm
(
perms
,
username
=
None
,
password
=
None
):
if
ismod
():
if
ismod
():
...
...
This diff is collapsed.
Click to expand it.
templates/changelog.html
+
1
−
1
View file @
42b02240
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<td
style=
"white-space: nowrap;"
>
{{i.path}}
</td>
<td
style=
"white-space: nowrap;"
>
{{i.path}}
</td>
<td>
"{{i.value_old}}"
</td>
<td>
"{{i.value_old}}"
</td>
<td>
"{{i.value_new}}"
</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>
</tr>
{% endfor %}
{% endfor %}
</table>
</table>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment