2020-01-21 06:35:58 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block js_media %}
|
|
|
|
<script src="{{ static('libs/tablesorter.js') }}" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#organization-table").tablesorter();
|
2020-12-28 05:45:58 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
$('#show-my-org-checkbox').click(function() {
|
|
|
|
let checked = $('#show-my-org-checkbox').is(':checked');
|
|
|
|
if (checked) {
|
|
|
|
$('.other-organization').hide();
|
|
|
|
$('.my-organization').last().find('td').css({'border-bottom-width':
|
|
|
|
'1px', 'border-color': '#ccc'});
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$('.other-organization').show();
|
|
|
|
$('.my-organization').last().find('td').css({'border-bottom-width':
|
|
|
|
'', 'border-color': ''});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
$('#show-my-org-checkbox').click()
|
|
|
|
{% endif %}
|
2020-01-21 06:35:58 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block title_ruler %}{% endblock %}
|
|
|
|
|
|
|
|
{% block title_row %}
|
|
|
|
{% set tab = 'organizations' %}
|
2022-05-30 07:09:53 +00:00
|
|
|
{% set title = _('Groups') %}
|
2020-01-21 06:35:58 +00:00
|
|
|
{% include "user/user-list-tabs.html" %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
2020-12-28 05:45:58 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<div style="margin-bottom: 0.5em">
|
|
|
|
<input id="show-my-org-checkbox" type="checkbox" style="vertical-align: bottom;">
|
2022-05-30 06:59:53 +00:00
|
|
|
<label for="show-my-org-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show my groups only') }}</label>
|
2020-12-28 05:45:58 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-01-21 06:35:58 +00:00
|
|
|
<table id="organization-table" class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width:85%">{{ _('Name') }}</th>
|
|
|
|
<th>{{ _('Members') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for org in organizations %}
|
2020-12-28 05:45:58 +00:00
|
|
|
<tr class="{{ 'my-organization' if org in my_organizations else 'other-organization'}}">
|
2020-01-21 06:35:58 +00:00
|
|
|
<td><a href="{{ org.get_absolute_url() }}">{{ org.name }}</a></td>
|
|
|
|
<td><a href="{{ org.get_users_url() }}">{{ org.member_count }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|