Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (6.4 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
      {% with object_list|filter_groups:user as d %}
40
              {% with d|lookup:'mine' as mine %}
41
                      {% if mine %}        
42
                              <div class="full-dotted">
43
                                        <table class="alt-style table_sorting" id="">
44
                                    <caption>MY GROUPS</caption>
45
                                    <thead>
46
                                      <tr>
47
                                        <th>Name</th>
48
                                        <th>Type</th>
49
                                        <th>Issue date</th>
50
                                        <th>Expiration date</th>
51
                                        <th>Participants</th>
52
                                        <th>Activation</th>
53
                                        <th>Moderation</th>
54
                                      </tr>
55
                                    </thead>
56
                                    <tbody>
57
                                      {% for o in mine %}
58
                                      <tr>
59
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
60
                                        <td>{{o.kind|capfirst}}</td>
61
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
62
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
63
                                        <td>{{ o.approved_members|length }}/{{ o.members|length }}</td>
64
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
65
                                        <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
66
                                         
67
                                      </tr>
68
                                      {% endfor %}
69
                                    </tbody>
70
                                </table>
71
                               
72
                                </div>
73
                      {% endif %}
74
              {% endwith %}
75
              {% with d|lookup:'other' as other %}
76
                      {% if other %}        
77
                              <div class="full-dotted">
78
                                        <table class="alt-style table_sorting">
79
                                    <caption>I PARTICIPATE IN</caption>
80
                                    <thead>
81
                                      <tr>
82
                                        <th>Name</th>
83
                                        <th>Type</th>
84
                                        <th>Issue date</th>
85
                                        <th>Expiration date</th>
86
                                         
87
                                        <th>Participants</th>
88
                                        <th>Activation</th>
89
                                         
90
                                        <th>Enrollment status</th>
91
                                        <th>&nbsp;</th>
92
                                      </tr>
93
                                    </thead>
94
                                    <tbody>
95
                                      {% for o in other %}
96
                                      <tr>
97
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name}}</a></td>
98
                                        <td>{{o.kind|capfirst}}</td>
99
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
100
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
101
                                        
102
                                        <td>{{ o.approved_members|length }}</td>
103
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
104
                                        
105
                                        {% if user in o.approved_members %}
106
                                            <td>
107
                                                    Active
108
                                                    <form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
109
                                                     <input type="submit"  value="LEAVE GROUP" />
110
                                                </form>        
111
                                            
112
                                            </td>    
113
                                        {% else %}
114
                                            {% if user in o.members %}
115
                                                <td>Pending</td>
116
                                            {% else %}
117
                                                <td>Not member 
118
                                                {% if join_forms %}
119
                                                 
120
                                                    <form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
121
                                                        {% with join_forms|lookup:o.name as form %}
122
                                                            {% include "im/form_render.html" %}
123
                                                        {% endwith %}
124
                                                        
125
                                                        <input type="submit"   value="JOIN GROUP" />
126
                                                         
127
                                                    </form>
128
                                                </td>
129
                                                {% endif %}
130
                                            {% endif %}
131
                                        {% endif %}
132
                                      </tr>
133
                                      {% endfor %}
134
                                    </tbody>
135
                                </table>
136
                               
137
                                </div>
138
                        {% endif %}
139
              {% endwith %}
140
      {% endwith %}
141
      {% if not object_list %}
142
              <h2>No groups found!</h2>
143
          {% endif %}
144
    </div>
145
</div>
146
{% endblock %}