Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosgroup_list.html @ 304acb60

History | View | Annotate | Download (6.5 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>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. </p> 
9
        <p>You can use the following form to search for a project:</p>
10
    
11
    
12
    <form action="{% url group_search %}" method="post" class="withlabels">{% csrf_token %}
13
         
14
            {% include "im/form_render.html" %}
15
            <div class="form-row submit">
16
                <input type="submit" class="submit altcol" value="SEARCH" />
17
            </div>
18
    </form>
19
    {% else %}
20
    <div class="projects">
21
                <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_add %}">create a new group</a> or <a href="{% url group_search %}">join</a> to an existing one.</p>
22
                 
23
                <ul class="widjets clearfix">        
24
                        <li>
25
                                <div>
26
                                        <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>
27
                                        <p class="btn"><a href="{% url group_add %}" class="submit">Create a group</a></p>
28
                                </div>
29
                        </li>
30
                        <li>
31
                                <div>
32
                                        <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>
33
                                        <p class="btn"><a href="{% url group_search %}" class="submit">Join a group</a></p>
34
                                </div>
35
                        </li>
36
                </ul>
37
        
38
    {% endif %}
39
    {% if object_list %}
40
      {% with object_list|filter_groups:user as d %}
41
              {% with d|lookup:'mine' as mine %}
42
                      {% if mine %}        
43
                              <div class="full-dotted">
44
                                        <table class="alt-style table_sorting" id="">
45
                                    <caption>MY GROUPS</caption>
46
                                    <thead>
47
                                      <tr>
48
                                        <th>Name</th>
49
                                        <th>Type</th>
50
                                        <th>Issue date</th>
51
                                        <th>Expiration date</th>
52
                                        <th>Participants</th>
53
                                        <th>Activation</th>
54
                                        <th>Moderation</th>
55
                                      </tr>
56
                                    </thead>
57
                                    <tbody>
58
                                      {% for o in mine %}
59
                                      <tr>
60
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
61
                                        <td>{{o.kind|capfirst}}</td>
62
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
63
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
64
                                        <td>{{ o.approved_members|length }}/{{ o.members|length }}</td>
65
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
66
                                        <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
67
                                         
68
                                      </tr>
69
                                      {% endfor %}
70
                                    </tbody>
71
                                </table>
72
                               
73
                                </div>
74
                      {% endif %}
75
              {% endwith %}
76
              {% with d|lookup:'other' as other %}
77
                      {% if other %}        
78
                              <div class="full-dotted">
79
                                        <table class="alt-style table_sorting">
80
                                    <caption>I PARTICIPATE IN</caption>
81
                                    <thead>
82
                                      <tr>
83
                                        <th>Name</th>
84
                                        <th>Type</th>
85
                                        <th>Issue date</th>
86
                                        <th>Expiration date</th>
87
                                         
88
                                        <th>Participants</th>
89
                                        <th>Activation</th>
90
                                         
91
                                        <th>Enrollment status</th>
92
                                        <th>&nbsp;</th>
93
                                      </tr>
94
                                    </thead>
95
                                    <tbody>
96
                                      {% for o in other %}
97
                                      <tr>
98
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
99
                                        <td>{{o.kind|capfirst}}</td>
100
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
101
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
102
                                        
103
                                        <td>{{ o.approved_members|length }}</td>
104
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
105
                                        
106
                                        {% if user in o.approved_members %}
107
                                            <td>
108
                                                    Active
109
                                                    <form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
110
                                                     <input type="submit"  value="LEAVE GROUP" />
111
                                                </form>        
112
                                            
113
                                            </td>    
114
                                        {% else %}
115
                                            {% if user in o.members %}
116
                                                <td>Pending</td>
117
                                            {% else %}
118
                                                <td>Not member 
119
                                                {% if join_forms %}
120
                                                 
121
                                                    <form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
122
                                                        {% with join_forms|lookup:o.name as form %}
123
                                                            {% include "im/form_render.html" %}
124
                                                        {% endwith %}
125
                                                        
126
                                                        <input type="submit"   value="JOIN GROUP" />
127
                                                         
128
                                                    </form>
129
                                                </td>
130
                                                {% endif %}
131
                                            {% endif %}
132
                                        {% endif %}
133
                                      </tr>
134
                                      {% endfor %}
135
                                    </tbody>
136
                                </table>
137
                               
138
                                </div>
139
                        {% endif %}
140
              {% endwith %}
141
      {% endwith %}
142
      {% else %}
143
            {% if is_search %}
144
                <h2>No groups found!</h2>
145
            {% endif %}
146
        {% endif %}
147
    </div>
148
</div>
149
{% endblock %}