1 {% extends "catalogue/base.html" %}
3 {% load document_list from document_list %}
5 {% block inner_content %}
8 <a style="float:right" class="btn btn-default" href="{% url 'organizations_edit' org.pk %}">{% trans "Edit" %}</a>
9 {% elif not my_status %}
10 <a style="float:right" class="btn btn-default" href="{% url 'organizations_join' org.pk %}">{% trans "Join" %}</a>
13 <a style="float:right; margin-right: 5px" class="btn btn-default" href="{% url 'catalogue_create_missing' %}?organization={{ org.pk }}">{% trans "New resource +" %}</a>
16 {{ org.get_preview_html|safe }}
18 {% if tab == 'members' %}
20 <ul class="nav nav-tabs">
21 <li role="presentation"><a href="{% url 'organizations_main' org.pk %}">{% trans "Resources" %}</a></li>
22 <li role="presentation" class="active"><a href="#">{% trans "Members" %}</a></li>
26 <table class="table table-striped">
28 <th>{% trans "Name" %}</th>
29 {% if am_owner %}<th>{% trans "E-mail" %}</th>{% endif %}
30 <th>{% trans "Status" %}</th>
31 {% if am_owner %}<th></th>{% endif %}
36 {% for m in org.membership_set.all %}
37 {% if am_owner or m.status != 'pending' or m.user == request.user %}
38 <tr class="member-{{ m.status }}">
39 <td>{{ m.user.first_name }} {{ m.user.last_name }}</td>
40 {% if am_owner %}<td>{{ m.user.email }}</td>{% endif %}
42 {% if m.status == 'owner' %}
46 {% if not m.user == user %}
47 <form action="{% url 'organizations_membership' org.pk %}" method="POST">
49 <input type="hidden" name="user" value="{{ m.user.pk }}">
50 <div class="btn-group" role="group">
51 <button type="submit" name="action" value="regular" class="btn btn-info">{% trans "Make regular" %}</button>
52 <button type="submit" name="action" value="remove" class="btn btn-danger">{% trans "Remove" %}</button>
57 {% elif m.status == 'pending' %}
61 <form action="{% url 'organizations_membership' org.pk %}" method="POST">
63 <input type="hidden" name="user" value="{{ m.user.pk }}">
64 <div class="btn-group" role="group">
65 <button type="submit" name="action" value="regular" class="btn btn-success">{% trans "Accept" %}</button>
66 <button type="submit" name="action" value="remove" class="btn btn-danger">{% trans "Reject" %}</button>
69 {% elif m.user == request.user %}
70 <br><small>{% trans "Waiting for the owner of the organization to accept you as a member." %}</small>
76 <form action="{% url 'organizations_membership' org.pk %}" method="POST">
78 <input type="hidden" name="user" value="{{ m.user.pk }}">
79 <div class="btn-group" role="group">
80 <button type="submit" name="action" value="owner" class="btn btn-warning">{% trans "Make owner" %}</button>
81 <button type="submit" name="action" value="remove" class="btn btn-danger">{% trans "Remove" %}</button>
93 {% elif tab == 'documents' %}
95 <ul class="nav nav-tabs">
96 <li role="presentation" class="active"><a href="">{% trans "Resources" %}</a></li>
97 <li role="presentation"><a href="{% url 'organizations_members' org.pk %}">{% trans "Members" %}</a></li>
100 {% document_list organization=org %}