Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosgroup_detail.html @ 0f4fa26d

History | View | Annotate | Download (3.2 kB)

1
{% extends "im/account_base.html" %}
2

    
3
{% load filters %}
4

    
5
{% block page.body %}
6
<div class="maincol {% block innerpage.class %}{% endblock %}">
7
        <table class="zebra-striped id-sorted">
8
              <tr>
9
                <th>Name: {{object.name}}</th>
10
              </tr>
11
              <tr>
12
                <th>Type: {{object.kind}}</th>
13
              </tr>
14
              <tr>
15
                <th>Issue date: {{object.issue_date|date:"d/m/Y"}}</th>
16
              </tr>
17
              <tr>
18
                <th>Expiration date: {{object.expiration_date|date:"d/m/Y"}}</th>
19
              </tr>
20
              <tr>
21
                <th>Moderation: {% if object.moderation_enabled%}Yes{% else %}No{% endif %}</th>
22
              </tr>
23
              <tr>
24
                <th>Owner: {% for o in object.owner.all %}
25
                                {% if user == o %}
26
                                    Me
27
                                {% else%}
28
                                    {{o.realname}} ({{o.email}})
29
                                
30
                                {% endif %}
31
                            {% endfor %}
32
                </th>
33
              </tr>
34
              <tr>
35
                <th>Enabled: {% if object.is_enabled %}Yes{% else %}No{% endif %}</th>
36
              </tr>
37
        </table>
38
    <div class="section">
39
        <h2>Members:</h2>
40
        {% if object.members %}
41
          <table class="zebra-striped id-sorted">
42
            <thead>
43
              <tr>
44
                <th>Email</th>
45
                <th>Realname</th>
46
                <th>Status</th>
47
              </tr>
48
            </thead>
49
            <tbody>
50
            {% for m in object.membership_set.all %}
51
              <tr>
52
                <td>{{m.person.email}}</td>
53
                <td>{{m.person.realname}}</td>
54
                {% if m.person in m.group.owner.all %}
55
                <td>Owner</td>
56
                {% else %}
57
                    {% if m.is_approved %}
58
                    <td>Approved</td>
59
                    {% else %}
60
                    <td>Pending</td>
61
                        {% if user in m.group.owner.all %}
62
                            <td><a href="{% url approve_member m.group.id m.person.id %}">Approve</a></td>
63
                            <td><a href="{% url disapprove_member m.group.id m.person.id  %}">Disapprove</a></td>
64
                        {% endif %}
65
                    {% endif %}
66
                {% endif %}
67
              </tr>
68
            {% endfor %}
69
            </tbody>
70
        </table>
71
        {% else %}
72
            <p>No members yet!</p>
73
        {% endif %}
74
    </div>
75
    <div class="section">
76
        <h2>Policies:</h2>
77
        {% if quota %}
78
          <table class="zebra-striped id-sorted">
79
            <thead>
80
              <tr>
81
                <th>Resource</th>
82
                <th>Limit</th>
83
              </tr>
84
            </thead>
85
            <tbody>
86
            {% for k in quota|dkeys %}
87
                <tr>
88
                    <td>{{ k }}</td>
89
                    <td>{{ quota|lookup:k }}</td>
90
                  </tr>
91
            {% endfor %}
92
            </tbody>
93
        </table>
94
        {% else %}
95
            <p>No policies</p>
96
        {% endif %}
97
    </div>
98
</div>
99
{% endblock %}