NDOJ/templates/organization/list.html

51 lines
1.6 KiB
HTML
Raw Normal View History

{% extends "two-column-content.html" %}
2020-01-21 06:35:58 +00:00
{% block two_col_media %}
2023-01-27 23:11:10 +00:00
<style>
.organization-container .organization-row:last-child {
border-bottom: none;
}
.org-logo {
height: 2em;
width: 2em;
margin-right: 1em;
margin-left: 0.5em;
}
.toggle {
cursor: pointer;
}
</style>
2022-06-18 07:32:37 +00:00
{% endblock %}
2020-01-21 06:35:58 +00:00
{% block title_ruler %}{% endblock %}
2022-06-18 07:32:37 +00:00
{% block left_sidebar %}
2023-01-27 23:11:10 +00:00
{% include "user/user-left-sidebar.html" %}
2020-01-21 06:35:58 +00:00
{% endblock %}
2022-06-18 07:32:37 +00:00
{% macro org_list(title, queryset) %}
2023-01-27 23:11:10 +00:00
{% if queryset %}
<h3 style="padding-bottom: 1em" class="toggle open"><i class="fa fa-chevron-right fa-fw"></i> {{title}} ({{queryset.count()}})</h3>
<div class="organization-container toggled">
{% for org in queryset %}
2024-04-12 06:51:57 +00:00
<a href="{{ org.get_absolute_url() }}" class="organization-row">
{% if org.logo_override_image %}
<img class="user-img org-logo" loading="lazy" src="{{ org.logo_override_image }}">
{% else %}
<img class="org-logo" loading="lazy" src="{{ static('icons/icon.svg') }}" onerror="{{static('icons/logo.svg')}}">
{% endif %}
2023-01-27 23:11:10 +00:00
<span style="margin-right: auto">{{ org.name }}</span>
<span style="font-weight: normal"><i>{{ org.member_count }} {{_('members')}}</i></span>
</a>
{% endfor %}
</div>
{% endif %}
2022-06-18 07:32:37 +00:00
{% endmacro %}
{% block middle_content %}
2023-01-27 23:11:10 +00:00
<a style="float: right" class="button small" href="{{url('organization_add')}}">{{_("Create group")}}</a>
{{ org_list(_('My groups'), my_organizations) }}
{{ org_list(_('Open groups'), open_organizations) }}
{{ org_list(_('Private groups'), private_organizations) }}
2020-01-21 06:35:58 +00:00
{% endblock %}