2018-07-22 21:18:50 +00:00
{% extends 'team_base.html' %}
{% load commonmark %}
{% load bootstrap3 %}
{% load teams_tags %}
2020-06-03 19:30:10 +00:00
{% block title %}
Members | {{ block.super }}
{% endblock %}
2018-07-22 21:18:50 +00:00
{% block team_content %}
< div class = "panel panel-default" >
< div class = "panel-heading" >
< h4 > Members< / h4 >
< / div >
< div class = "panel-body" >
< p > The following < b > {{ team.approved_members.count }}< / b > people {% if team.unapproved_members.count %}(and {{ team.unapproved_members.count }} pending){% endif %} are members of the < b > {{ team.name }} Team< / b > :< / p >
< table class = "table table-hover" >
< thead >
< tr >
< th >
Name
< / th >
< th >
Status
< / th >
{% if request.user in team.responsible_members.all %}
2018-08-05 10:23:33 +00:00
< th >
Email
< / th >
2018-08-10 08:14:03 +00:00
< th >
Description
< / th >
2018-07-22 21:18:50 +00:00
< th >
Action
< / th >
{% endif %}
< / tr >
< / thead >
< tbody >
2018-08-04 11:45:52 +00:00
{% for member in team.memberships.all %}
{% if member.approved or not member.approved and request.user in team.responsible_members.all %}
2018-07-22 21:18:50 +00:00
< tr >
< td >
2018-08-04 11:45:52 +00:00
{{ member.user.profile.get_public_credit_name }} {% if member.user == request.user %}(this is you!){% endif %}
2018-07-22 21:18:50 +00:00
< / td >
< td >
2018-08-04 11:45:52 +00:00
Team {% if member.responsible %}Responsible{% else %}Member{% endif %}
{% if not member.approved %}(pending approval){% endif %}
2018-07-22 21:18:50 +00:00
< / td >
{% if request.user in team.responsible_members.all %}
2018-08-05 10:23:33 +00:00
< td >
{{ member.user.email }}
< / td >
2018-08-10 08:14:03 +00:00
< td >
{{ member.user.profile.description|untrustedcommonmark }}
< / td >
2018-07-22 21:18:50 +00:00
< td >
< div class = "btn-group-vertical" >
< a class = "btn btn-danger"
2018-08-04 11:45:52 +00:00
href="{% url 'teams:member_remove' camp_slug=camp.slug team_slug=team.slug pk=member.id %}">
2018-07-23 21:12:57 +00:00
< i class = "fas fa-trash" > < / i > Remove
2018-07-22 21:18:50 +00:00
< / a >
2018-08-04 11:45:52 +00:00
{% if not member.approved %}
2018-07-22 21:18:50 +00:00
< a class = "btn btn-success"
2018-08-04 11:45:52 +00:00
href="{% url 'teams:member_approve' camp_slug=camp.slug team_slug=team.slug pk=member.id %}">
2018-07-23 21:12:57 +00:00
< i class = "fas fa-check" > < / i > Approve
2018-07-22 21:18:50 +00:00
< / a >
{% endif %}
< / div >
< / td >
{% endif %}
< / tr >
2018-08-04 11:45:52 +00:00
{% endif %}
2018-07-22 21:18:50 +00:00
{% empty %}
< p > No members found!< / p >
{% endfor %}
< / tbody >
< / table >
{% if request.user.authorized %}
< p > Your membership status: < b > {% membershipstatus user team %}< / b > < / p >
{% if request.user in team.members.all %}
{% if team.irc_channel and team.irc_channel_managed and request.user.profile.nickserv_username %}
< a href = "{% url 'teams:fix_irc_acl' camp_slug=camp.slug team_slug=team.slug %}" class = "btn btn-primary" > < i class = "fas fa-wrench" > < / i > Fix IRC ACL< / a >
{% endif %}
< a href = "{% url 'teams:leave' camp_slug=camp.slug team_slug=team.slug %}" class = "btn btn-danger" > < i class = "fas fa-times" > < / i > Leave Team< / a >
{% else %}
{% if team.needs_members %}
< b > This team is looking for members!< / b > < a href = "{% url 'teams:join' camp_slug=camp.slug team_slug=team.slug %}" class = "btn btn-xs btn-success" > < i class = "fas fa-plus" > < / i > Join Team< / a >
{% endif %}
{% endif %}
{% endif %}
< hr >
< / div >
< / div >
{% endblock %}