Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosgroup_list.html @ 83bdb2b6

History | View | Annotate | Download (5.7 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
    {% if form %}
8
    <p>You can search for a group by name</p>
9
    <form action="{% url group_search %}" method="post" class="withlabels signup">{% csrf_token %}
10
            {% include "im/form_render.html" %}
11
            <div class="form-row submit">
12
                <input type="submit" class="submit altcol" value="SEARCH" />
13
            </div>
14
    </form>
15
    {% else %}
16
    <div class="projects">
17
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <br />You can <a href="{% url group_create_list %}">create a new group</a> or <a href="{% url group_search %}">join</a> to an existing one.</p>
18
                 
19
                <ul class="widjets clearfix">        
20
                        <li>
21
                                <div>
22
                                        <p>WELCOME!<br />Connect with a world of people who share your passions.<br />With millions of groups at your fingertips, it's easy to find the group that's best for you -- no matter your interest.</p>
23
                                        <p class="btn"><a href="{% url group_create_list %}" class="submit">Create a group</a></p>
24
                                </div>
25
                        </li>
26
                        <li>
27
                                <div>
28
                                        <p>LOOKING FOR A GROUP?</p><p>Well, this is the place to start!</br>sdofuisd ofuaofi usdiof uiofu osifuaoi ufisdfiousf oiusd<br /><img alt="THINK ABOUT IT" src="/static/medialibrary/2012/06/behind_okeanos.png"></p>
29
                                        <p class="btn"><a href="{% url group_search %}" class="submit">Join a group</a></p>
30
                                </div>
31
                        </li>
32
                </ul>
33
        
34
    {% endif %}
35
    {% with object_list|enabled:is_search as object_list %}
36
    {% if object_list %}
37
      {% with object_list|split:user as d %}
38
              {% with d|lookup:'own' as mine %}
39
                      {% if mine %}        
40
                              <div class="full-dotted">
41
                                        <table class="alt-style table_sorting" id="">
42
                                    <caption>MY GROUPS</caption>
43
                                    <thead>
44
                                      <tr>
45
                                        <th>Name</th>
46
                                        <th>Type</th>
47
                                        <th>Issue date</th>
48
                                        <th>Expiration date</th>
49
                                        <th>Participants</th>
50
                                        <th>Activation</th>
51
                                        <th>Moderation</th>
52
                                      </tr>
53
                                    </thead>
54
                                    <tbody>
55
                                      {% for o in mine %}
56
                                      <tr>
57
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
58
                                        <td>{{o.kind|capfirst}}</td>
59
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
60
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
61
                                        <td>{{ o.approved_members|length }}/{{ o.members|length }}</td>
62
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
63
                                        <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
64
                                         
65
                                      </tr>
66
                                      {% endfor %}
67
                                    </tbody>
68
                                </table>
69
                               
70
                                </div>
71
                      {% endif %}
72
              {% endwith %}
73
              {% with d|lookup:'other' as other %}
74
                      {% if other %}        
75
                              <div class="full-dotted">
76
                                        <table class="alt-style table_sorting">
77
                                    <caption>I PARTICIPATE IN</caption>
78
                                    <thead>
79
                                      <tr>
80
                                        <th>Name</th>
81
                                        <th>Type</th>
82
                                        <th>Issue date</th>
83
                                        <th>Expiration date</th>
84
                                         
85
                                        <th>Participants</th>
86
                                        <th>Activation</th>
87
                                         
88
                                        <th>Enrollment status</th>
89
                                        <th>&nbsp;</th>
90
                                      </tr>
91
                                    </thead>
92
                                    <tbody>
93
                                      {% for o in other %}
94
                                      <tr>
95
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
96
                                        <td>{{o.kind|capfirst}}</td>
97
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
98
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
99
                                        
100
                                        <td>{{ o.approved_members|length }}</td>
101
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
102
                                        
103
                                        {% if user in o.approved_members %}
104
                                            <td>
105
                                                    Active
106
                                                    <form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
107
                                                     <input type="submit"  value="LEAVE GROUP" />
108
                                                </form>        
109
                                            
110
                                            </td>    
111
                                        {% else %}
112
                                            {% if user in o.members %}
113
                                                <td>Pending</td>
114
                                            {% else %}
115
                                                <td>Not member 
116
                                                    <form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
117
                                                        <input type="submit"   value="JOIN GROUP" />
118
                                                    </form>
119
                                                </td>
120
                                            {% endif %}
121
                                        {% endif %}
122
                                      </tr>
123
                                      {% endfor %}
124
                                    </tbody>
125
                                </table>
126
                               
127
                                </div>
128
                        {% endif %}
129
              {% endwith %}
130
      {% endwith %}
131
      {% else %}
132
            {% if is_search %}
133
                <h2>No groups found!</h2>
134
            {% endif %}
135
      {% endif %}
136
    {% endwith %}
137
</div>
138
{% endblock %}