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
Iterations
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
Video AG Infrastruktur
website
Commits
843f2dcc
Commit
843f2dcc
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
made ui for permissions look better
parent
eea3af2c
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
server.py
+2
-1
2 additions, 1 deletion
server.py
static/l2p-logo.gif
+0
-0
0 additions, 0 deletions
static/l2p-logo.gif
static/rwth.png
+0
-0
0 additions, 0 deletions
static/rwth.png
templates/macros.html
+25
-15
25 additions, 15 deletions
templates/macros.html
with
27 additions
and
16 deletions
server.py
+
2
−
1
View file @
843f2dcc
...
...
@@ -119,7 +119,7 @@ def permdescr(perms):
elif
perm
[
'
type
'
]
==
'
password
'
:
password
=
True
elif
perm
[
'
type
'
]
==
'
l2p
'
:
l2p_courses
.
append
(
perm
[
'
param
'
])
l2p_courses
.
append
(
perm
[
'
param
1
'
])
elif
perm
[
'
type
'
]
==
'
rwth
'
:
rwth_intern
=
True
if
public
or
not
perms
:
...
...
@@ -287,6 +287,7 @@ def course(id=None, handle=None):
lectures
=
query
(
'
SELECT * FROM lectures WHERE course_id = ? AND (? OR visible) ORDER BY time, duration DESC
'
,
course
[
'
id
'
],
ismod
())
for
lecture
in
lectures
:
lecture
[
'
perm
'
]
=
[]
lecture
[
'
perm
'
]
+=
course
[
'
perm
'
]
lecture
[
'
course
'
]
=
course
for
perm
in
perms
:
if
perm
[
'
lecture_id
'
]
==
lecture
[
'
id
'
]:
...
...
This diff is collapsed.
Click to expand it.
static/l2p-logo.gif
0 → 100644
+
0
−
0
View file @
843f2dcc
271 B
This diff is collapsed.
Click to expand it.
static/rwth.png
0 → 100644
+
0
−
0
View file @
843f2dcc
630 B
This diff is collapsed.
Click to expand it.
templates/macros.html
+
25
−
15
View file @
843f2dcc
...
...
@@ -186,25 +186,35 @@ $('#embedcodebtn').popover(
{% macro moderator_acleditor(type,id,acl,global_acls) %}
{% set tmp = global_acls.extend(acl) %}
{%
if (not acl)
%}
{%
if ismod()
%}
<button
class=
"btn btn-default modmoderator_acleditor"
data-type=
"{{ type }}"
data-id=
"{{ id }}"
>
<span
class=
"fa fa-unlock"
aria-hidden=
"true"
style=
"color: green;"
></span>
</button>
{%
set permdescription = acl|permdescr
%}
{%
set permlogos = ''
%}
{% if permdescription[0] == 'public' %}
{% set permlogos = '
<span
class=
"fa fa-globe"
aria-hidden=
"true"
></span>
' %}
{% endif %}
{% else %}
{% if ismod() %}
<button
class=
"btn btn-default modmoderator_acleditor"
data-type=
"{{ type }}"
data-id=
"{{ id }}"
onclick=
""
>
{% else %}
<a>
{% if permdescription[0] == 'password' %}
{% set permlogos = '
<span
class=
"fa fa-lock"
aria-hidden=
"true"
></span>
' %}
{% endif %}
{% if permdescription[0] == 'l2p' %}
{% set permlogos %}
<span
class=
"fa"
aria-hidden=
"true"
style=
"width: 12px; height: 14px; background-size: cover; background-image: url('/static/l2p-logo.gif');"
></span>
{% endset %}
{% endif %}
<span
class=
"fa fa-lock"
aria-hidden=
"true"
style=
"color: red;"
></span>
{% if permdescription[0] == 'rwth' %}
{% set permlogos %}
<span
class=
"fa"
aria-hidden=
"true"
style=
"width: 25px; height: 20px; background-size: cover; background-image: url('/static/rwth.png');"
></span>
{% endset %}
{% endif %}
{% if ismod() %}
<button
class=
"btn btn-default modmoderator_acleditor"
data-type=
"{{ type }}"
data-id=
"{{ id }}"
>
{{ permlogos|safe }}
</button>
{% else %}
<a>
{{ permlogos|safe }}
</a>
{% endif %}
{% endif %}
{% endmacro %}
...
...
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