Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosgroup_detail.html @ 28252c7f

History | View | Annotate | Download (3.4 kB)

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

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