Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add buttons to expand group member lists #493

Merged
merged 31 commits into from
Mar 26, 2025
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e99c1ae
first commit
Atanazyy Dec 16, 2024
75a0fc2
Merge branch 'sio2project:master' into master
Atanazyy Dec 16, 2024
bcd30a3
fix permissions
Atanazyy Dec 16, 2024
d96ba08
fix admin panel not saving
Atanazyy Dec 22, 2024
d367490
small fixes
Atanazyy Dec 22, 2024
47ff36b
fix origin info
Atanazyy Dec 22, 2024
170aff1
change permission name
Atanazyy Dec 27, 2024
4bf9145
fix permissions for contest admins
Atanazyy Dec 27, 2024
d5b72ef
fix permissions for contest admins
Atanazyy Dec 27, 2024
a152009
fix for problems without contests
Atanazyy Dec 27, 2024
232f7e5
add test
Atanazyy Jan 13, 2025
3a07a62
resolve conflicts
Atanazyy Jan 13, 2025
715e27d
Merge remote-tracking branch 'masterremote/master'
Atanazyy Jan 13, 2025
39d5c02
small fix
Atanazyy Jan 13, 2025
15abb1d
test tags tab
Atanazyy Jan 19, 2025
56ca6cc
squash migrations
Atanazyy Jan 20, 2025
f250a64
remove redundant migrations
Atanazyy Jan 20, 2025
1674dba
Merge branch 'master' into master
Atanazyy Jan 20, 2025
ebf7bf2
Merge branch 'sio2project:master' into master
Atanazyy Feb 26, 2025
ec2dc69
Merge branch 'sio2project:master' into master
Atanazyy Feb 26, 2025
8df28ed
display nickname next to the full name when displaying contest pupils
Atanazyy Feb 26, 2025
f612e8b
add logic and use member.username
Atanazyy Mar 5, 2025
27e257c
fix more similar cases
Atanazyy Mar 5, 2025
bf63ecf
fix order of names
Atanazyy Mar 6, 2025
26e48c5
more elegant code
Atanazyy Mar 12, 2025
0d13af7
more elegant code
Atanazyy Mar 12, 2025
776f61c
revert changes
Atanazyy Mar 12, 2025
a0f86fb
more elegant code
Atanazyy Mar 12, 2025
12e665c
Merge branch 'sio2project:master' into master
Atanazyy Mar 19, 2025
d0558cd
Merge branch 'sio2project:master' into master
Atanazyy Mar 25, 2025
34edc91
add buttons to expand group member lists
Atanazyy Mar 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions oioioi/usergroups/static/usergroups/teacher_usergroups_list.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.usergroup {
padding: 0.3em 1rem;
}

.usergroup button {
white-space: normal;
}

.usergroup-title:focus {
outline: none;
box-shadow: none;
}

.usergroup-user-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-content: space-evenly;
padding-left: 1%;
}

.usergroup-user-list li {
width: 20%;
margin: 0.5em;
overflow-wrap: break-word;
}

.usergroup-title {
white-space: normal;
width: 100%;
height: 100%;
text-align: left;
}

.usergroup-body {
padding-top: 0.25em;
}

.usergroup-title:focus:hover,
.usergroup-title:focus,
.usergroup-title:active {
outline: 0;
border: 0;
}

.usergroup-title:hover {
text-decoration: none;
}

.group-button {
margin: 0.5em 0.25em;
}
Original file line number Diff line number Diff line change
@@ -5,6 +5,11 @@
{% trans "Your User Groups" %}
{% endblock %}

{% block styles %}
{{ block.super }}
<link charset="utf-8" rel="stylesheet" type="text/css" href="{{ STATIC_URL }}usergroups/teacher_usergroups_list.css">
{% endblock %}

{% block main-content %}
<h1>
{% trans "Your Groups" %}
@@ -23,8 +28,34 @@ <h1>
{% paginate %}

<ul class="list-group">
{% for group in usergroup_list %}
<li class="list-group-item"> <a href="{% url 'teacher_usergroup_detail' group.id %}">{{ group }}</a> </li>
{% for usergroup in usergroup_list %}
<li class="list-group-item usergroup">
<div class="text-start">
<button class="usergroup-title btn btn-link collapsed" data-toggle="collapse" data-target="#collapse{{ usergroup.id }}">
{{ usergroup.name }}
</button>
</div>
<div id="collapse{{ usergroup.id }}" class="collapse usergroup-body">
<div>
{% if usergroup.members.count %}
<ul class="usergroup-user-list">
{% for member in usergroup.members.all|slice:":23" %}
<li> {{ member.get_full_name|default:member.username }} </li>
{% endfor %}

{% if group_members.count > 23 %}
<li> &hellip; </li>
{% endif %}
</ul>
{% else %}
<p class="text-start"> {% trans "Strange, this group doesn't have any members." %} </p>
{% endif %}
</div>
<div class="text-start">
<a href="{% url 'teacher_usergroup_detail' usergroup_id=usergroup.id %}" class="btn btn-primary group-button"> {% trans "Modify group" %} </a>
</div>
</div>
</li>
{% endfor%}
</ul>
{% paginate %}
@@ -34,4 +65,4 @@ <h1>
<div id="add-new-usergroup">
<a role="button" class="btn btn-success" href="{% url 'teacher_usergroups_add_group' %}"> {% trans "Add new group" %} </a>
</div>
{% endblock %}
{% endblock %}