Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Video Portal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Virtual University
Video Portal
Commits
84995909
Verified
Commit
84995909
authored
4 years ago
by
Lukas Schauer
Browse files
Options
Downloads
Patches
Plain Diff
admin: show all jitsi rooms
parent
ae0237db
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jitsimod/templates/jitsi/rooms.html
+19
-1
19 additions, 1 deletion
jitsimod/templates/jitsi/rooms.html
jitsimod/views.py
+9
-2
9 additions, 2 deletions
jitsimod/views.py
with
28 additions
and
3 deletions
jitsimod/templates/jitsi/rooms.html
+
19
−
1
View file @
84995909
...
...
@@ -4,7 +4,7 @@
<h2>
Jitsi Rooms
</h2>
{% if r
equest.user.jitsi_moderating.exist
s %}
{% if r
oom
s %}
<div
class=
"w3-card-4"
>
<div
class=
"w3-container w3-hochschulblau"
>
<h2>
Your Rooms
</h2>
...
...
@@ -40,6 +40,24 @@
<!-- no whitelisted patterns -->
{% endif %}
{% if request.user.is_staff %}
<div
class=
"w3-card-4"
>
<div
class=
"w3-container w3-red"
>
<h2>
Admin Rooms
</h2>
</div>
<ul
class=
"w3-ul w3-border"
>
{% for room in admin_rooms %}
{% if room not in rooms %}
<li><a
href=
"/jitsi/{{ room.id }}"
>
{{ room.name }}
</a>
({% if not room.approved %}pending approval, {% endif%}moderators: {% for user in room.moderators.all %}{{ user.username }}{% if not forloop.last %}, {% endif %}{% endfor %})
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<br/>
{% endif %}
<a
href=
"/jitsi/add"
class=
"w3-button w3-hochschulblau"
>
Request Room
</a>
</p>
...
...
This diff is collapsed.
Click to expand it.
jitsimod/views.py
+
9
−
2
View file @
84995909
...
...
@@ -3,14 +3,21 @@ from django.contrib.auth.decorators import login_required
from
django.contrib.auth
import
get_user_model
from
django.core.mail
import
EmailMessage
from
.forms
import
RoomForm
from
.models
import
Room
from
.models
import
Room
,
Pattern
import
re
from
.modapi
import
modapi_get_room
,
modapi_reset_password
,
modapi_grant_moderator
,
modapi_revoke_moderator
from
videos.models
import
Course
@login_required
def
rooms
(
request
):
return
render
(
request
,
"
jitsi/rooms.html
"
,
context
=
{
'
rooms
'
:
request
.
user
.
jitsi_moderating
.
all
().
order_by
(
"
name
"
),
'
patterns
'
:
request
.
user
.
jitsi_whitelisted
.
all
().
order_by
(
"
pattern
"
)})
context
=
{}
context
[
'
rooms
'
]
=
request
.
user
.
jitsi_moderating
.
all
().
order_by
(
"
name
"
)
context
[
'
patterns
'
]
=
request
.
user
.
jitsi_whitelisted
.
all
().
order_by
(
"
pattern
"
)
if
request
.
user
.
is_staff
:
context
[
'
admin_rooms
'
]
=
Room
.
objects
.
all
()
context
[
'
admin_patterns
'
]
=
Pattern
.
objects
.
all
()
return
render
(
request
,
"
jitsi/rooms.html
"
,
context
=
context
)
@login_required
def
newroom
(
request
):
...
...
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