root / snf-astakos-app / astakos / im / templates / im / astakosgroup_list.html @ b47bdc71
History | View | Annotate | Download (15.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 |
<div class="projects"> |
8 |
<h2>GROUPS</h2> |
9 |
{% if form %} |
10 |
<p>You can search for a group by name</p> |
11 |
<form action="{% url group_search %}" method="post" class="withlabels signup">{% csrf_token %} |
12 |
{% include "im/form_render.html" %} |
13 |
<div class="form-row submit"> |
14 |
<input type="submit" class="submit altcol" value="SEARCH" /> |
15 |
</div>
|
16 |
</form>
|
17 |
|
18 |
<form action="{% url group_all %}" method="post" class="link-like alone">{% csrf_token %} |
19 |
<div class="form-row submit"> |
20 |
<input type="submit" class="submit altcol" value="Show all groups" /> |
21 |
</div>
|
22 |
</form>
|
23 |
{% else %} |
24 |
|
25 |
<p>Okeanos grants resources according to activities organized by groups.
|
26 |
Join or create a group to get access to more resources. |
27 |
<br>
|
28 |
<a href="{% url group_search %}">Join an existing one</a> |
29 |
or |
30 |
<!--<a href="{% url group_create_list %}">Create a new group</a>-->
|
31 |
<a href="{% url group_add 'course' %}">create a new group</a>. |
32 |
</p>
|
33 |
|
34 |
<div class="widjets"> |
35 |
<!--<a href="#" class="widjet-x" title="remove boxes">X</a>-->
|
36 |
<ul class="clearfix"> |
37 |
<li class="create"> |
38 |
<div>
|
39 |
<div class="wrap"> |
40 |
<h2>WELCOME!</h2> |
41 |
<p><a href="{% url group_add 'course' %}"><img alt="THINK ABOUT IT" src="/static/im/images/create.png"></a></p> |
42 |
<p class="txt">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> |
43 |
<p><a href="{% url group_add 'course' %}">create a group ></a></p> |
44 |
<!--<p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>-->
|
45 |
</div>
|
46 |
</div>
|
47 |
</li>
|
48 |
<li class="join"> |
49 |
<div>
|
50 |
<div class="wrap"> |
51 |
<h2>ALREADY AWARE?</h2> |
52 |
<p><a href="{% url group_search %}"><img alt="THINK ABOUT IT" src="/static/im/images/join.png"></a></p> |
53 |
<p class="txt">Well, this is the place to start!<br>sdofuisd ofuaofi usdiof uiofu osifuaoi ufisdfiousf oiusd<br></p> |
54 |
|
55 |
<p><a href="{% url group_search %}">join a group ></a></p> |
56 |
</div>
|
57 |
</div>
|
58 |
</li>
|
59 |
</ul>
|
60 |
</div>
|
61 |
|
62 |
{% endif %} |
63 |
{% with page_obj.object_list as object_list %} |
64 |
<!-- Search group -->
|
65 |
{% if object_list %} |
66 |
<div class="full-dotted"> |
67 |
<form method="GET" class="minimal" action="#searchResults"> |
68 |
<div class="form-row"> |
69 |
<select name="sorting" onchange="this.form.submit();"> |
70 |
<option value="">Sort by</option> |
71 |
<option value="groupname" {% if == 'groupname' %}selected{% endif %}>Name</option> |
72 |
<option value="kindname" {% if == 'kindname' %}selected{% endif %}>Type</option> |
73 |
<option value="issue_date" {% if == 'issue_date' %}selected{% endif %}>Issue date</option> |
74 |
<option value="expiration_date" {% if == 'expiration_date' %}selected{% endif %}>Expiration Date</option> |
75 |
<option value="approved_members_num" {% if == 'approved_members_num' %}selected{% endif %}>Participants</option> |
76 |
</select>
|
77 |
<input type="hidden" name="q" value="{{q}}"/> |
78 |
</div>
|
79 |
</form>
|
80 |
<table class="alt-style complex" id="searchResults"> |
81 |
<caption>
|
82 |
SEARCH RESULTS |
83 |
</caption>
|
84 |
<thead>
|
85 |
<tr>
|
86 |
<th>Name</th> |
87 |
<th>Type</th> |
88 |
<th>Issued</th> |
89 |
<th>Expires</th> |
90 |
|
91 |
<th>Enrolled</th> |
92 |
|
93 |
|
94 |
<th>Enrollment status</th> |
95 |
<th> </th> |
96 |
|
97 |
</tr>
|
98 |
</thead>
|
99 |
<tbody>
|
100 |
{% for o in object_list %} |
101 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
102 |
<td><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/"}}</a></td> |
103 |
<td>{{o.kindname|capfirst}}</td> |
104 |
<td>{{o.issue_date|date:"d/m/Y"}}</td> |
105 |
<td>{{o.expiration_date|date:"d/m/Y"}}</td> |
106 |
<td>{{o.approved_members_num}}</td> |
107 |
|
108 |
<td>
|
109 |
{% if o.is_member %} |
110 |
{% if o.membership_approval_date %} |
111 |
|
112 |
Registered |
113 |
{% if not o.is_owner %} |
114 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %} |
115 |
<input type="submit" value="LEAVE GROUP" /> |
116 |
</form>
|
117 |
{% endif %} |
118 |
|
119 |
|
120 |
|
121 |
{% else %} |
122 |
Pending |
123 |
{% endif %} |
124 |
{% else %} |
125 |
Not member |
126 |
<form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %} |
127 |
<input type="submit" value="JOIN GROUP" /> |
128 |
</form>
|
129 |
|
130 |
{% endif %} |
131 |
</td>
|
132 |
<td><a href="#" class="more-info" title="more info"> </a></td> |
133 |
</tr>
|
134 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
135 |
<td colspan="7" class="info-td"> |
136 |
<div>
|
137 |
<p>{{o.desc}}</p> |
138 |
<p>{% if o.homepage%}
|
139 |
Group's home page: <a target="_blank" href="{{ o.homepage }}">{{ o.homepage }}</a> |
140 |
|
141 |
{% endif %} |
142 |
</p>
|
143 |
</div>
|
144 |
</td>
|
145 |
</tr>
|
146 |
{% endfor %} |
147 |
</tbody>
|
148 |
</table>
|
149 |
|
150 |
</div>
|
151 |
|
152 |
|
153 |
<div class="pagination"> |
154 |
<p class="next-prev"> |
155 |
{% if page_obj.has_previous %} |
156 |
<a href="?page={{ page_obj.previous_page_number }}{% if q %}&q={{q}}{% endif %}{% if sorting %}&sorting={{sorting}}{% endif %}">previous</a> |
157 |
{% endif %} |
158 |
{% if page_obj.has_next %} |
159 |
<a href="?page={{ page_obj.next_page_number }}{% if q %}&q={{q}}{% endif %}{% if sorting %}&sorting={{sorting}}{% endif %}">next</a> |
160 |
{% endif %} |
161 |
</p>
|
162 |
<p class="nums"> |
163 |
<span class="current"> |
164 |
Page {{ page_obj.number }} of {{ paginator.num_pages }} |
165 |
</span>
|
166 |
</p>
|
167 |
</div>
|
168 |
<!-- Group listing -->
|
169 |
{% else %} |
170 |
{% if mine %} |
171 |
{% with own_page|concat:own_sorting as args %} |
172 |
{% with mine|paginate:args as mine %} |
173 |
<div > |
174 |
<form method="GET" class="minimal" action="#myGroups"> |
175 |
<div class="form-row"> |
176 |
<select name="own_sorting" onchange="this.form.submit();"> |
177 |
<option value="">Sort by</option> |
178 |
<option value="groupname" {% if == 'groupname' %}selected{% endif %}>Name</option> |
179 |
<option value="kindname" {% if == 'kindname' %}selected{% endif %}>Type</option> |
180 |
<option value="issue_date" {% if == 'issue_date' %}selected{% endif %}>Issue date</option> |
181 |
<option value="expiration_date" {% if == 'expiration_date' %}selected{% endif %}>Expiration Date</option> |
182 |
<option value="approved_members_num" {% if == 'approved_members_num' %}selected{% endif %}>Participants</option> |
183 |
<option value="is_enabled" {% if == 'is_enabled' %}selected{% endif %}>Status</option> |
184 |
<option value="moderation_enabled" {% if == 'moderation_enabled' %}selected{% endif %}>Moderation</option> |
185 |
</select>
|
186 |
</div>
|
187 |
</form>
|
188 |
<table class="alt-style complex" id="myGroups"> |
189 |
<caption>MY GROUPS</caption> |
190 |
<thead>
|
191 |
<tr>
|
192 |
<th>Name</th> |
193 |
<th>Type</th> |
194 |
<th>Issued</th> |
195 |
<th>Expires</th> |
196 |
<th>Enrolled</th> |
197 |
<th>Status</th> |
198 |
<th>Moderated</th> |
199 |
<th> </th> |
200 |
|
201 |
</tr>
|
202 |
</thead>
|
203 |
<tbody>
|
204 |
{% for o in mine.object_list %} |
205 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
206 |
<td><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/" }}</a></td> |
207 |
<td>{{o.kindname|capfirst}}</td> |
208 |
<td>{{o.issue_date|date:"d/m/Y"}}</td> |
209 |
<td>{{o.expiration_date|date:"d/m/Y"}}</td> |
210 |
<td>{{ o.approved_members_num }}</td> |
211 |
<td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td> |
212 |
<td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td> |
213 |
<td><a href="#" class="more-info" title="more info"> </a></td> |
214 |
</tr>
|
215 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
216 |
<td colspan="8" class="info-td"> |
217 |
<div>
|
218 |
<p>{{o.desc}}</p> |
219 |
<p>{% if o.homepage%}
|
220 |
Group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a> |
221 |
{% endif %} |
222 |
</p>
|
223 |
</div>
|
224 |
</td>
|
225 |
</tr>
|
226 |
{% endfor %} |
227 |
</tbody>
|
228 |
</table>
|
229 |
</div>
|
230 |
<div class="pagination"> |
231 |
<p class="next-prev"> |
232 |
{% if mine.has_previous %} |
233 |
<a href="?own_page={{ mine.previous_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">previous</a> |
234 |
{% endif %} |
235 |
{% if mine.has_next %} |
236 |
<a href="?own_page={{ mine.next_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">next</a> |
237 |
{% endif %} |
238 |
</p>
|
239 |
<p class="nums"> |
240 |
<span class="current"> |
241 |
Page {{ mine.number }} of {{ mine.paginator.num_pages }} |
242 |
</span>
|
243 |
</p>
|
244 |
</div>
|
245 |
|
246 |
{% endwith %} |
247 |
{% endwith %} |
248 |
{% endif %} |
249 |
|
250 |
{% if other %} |
251 |
{% with other_page|concat:other_sorting as args %} |
252 |
{% with other|paginate:args as other %} |
253 |
<div class="full-dotted"> |
254 |
<form method="GET" class="minimal" action="#iParticipateIn"> |
255 |
<div class="form-row"> |
256 |
<select name="other_sorting" onchange="this.form.submit();"> |
257 |
<option value="">Sort by</option> |
258 |
<option value="groupname" {% if == 'groupname' %}selected{% endif %}>Name</option> |
259 |
<option value="kindname" {% if == 'kindname' %}selected{% endif %}>Type</option> |
260 |
<option value="issue_date" {% if == 'issue_date' %}selected{% endif %}>Issue date</option> |
261 |
<option value="expiration_date" {% if == 'expiration_date' %}selected{% endif %}>Expiration Date</option> |
262 |
<option value="approved_members_num" {% if == 'approved_members_num' %}selected{% endif %}>Participants</option> |
263 |
<option value="membership_status" {% if == 'membership_status' %}selected{% endif %}>Enrollment Status</option> |
264 |
|
265 |
</select>
|
266 |
</div>
|
267 |
</form>
|
268 |
<table class="alt-style complex" id="iParticipateIn"> |
269 |
<caption>
|
270 |
I PARTICIPATE IN |
271 |
</caption>
|
272 |
<thead>
|
273 |
<tr>
|
274 |
<th>Name</th> |
275 |
<th>Type</th> |
276 |
<th>Issued</th> |
277 |
<th>Expires</th> |
278 |
<th>Enrolled</th> |
279 |
<th>Enrollment status</th> |
280 |
<th> </th> |
281 |
|
282 |
</tr>
|
283 |
</thead>
|
284 |
<tbody>
|
285 |
{% for o in other.object_list %} |
286 |
<tr class="{% cycle 'tr1' 'tr2' %}"> |
287 |
<td><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/"}}</a></td> |
288 |
<td>{{o.kindname|capfirst}}</td> |
289 |
<td>{{o.issue_date|date:"d/m/Y"}}</td> |
290 |
<td>{{o.expiration_date|date:"d/m/Y"}}</td> |
291 |
|
292 |
<td>{{ o.approved_members_num }}</td> |
293 |
|
294 |
<td>
|
295 |
{% if o.membership_status %} |
296 |
Registered |
297 |
<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %} |
298 |
<input type="submit" value="LEAVE GROUP" /> |
299 |
</form>
|
300 |
|
301 |
{% else %} |
302 |
Pending |
303 |
{% endif %} |
304 |
</td>
|
305 |
<td><a href="#" class="more-info" title="more info"> </a></td> |
306 |
</tr>
|
307 |
<tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none"> |
308 |
<td colspan="7" class="info-td"> |
309 |
<div>
|
310 |
<p>{{o.desc}}</p> |
311 |
<p>{% if o.homepage%}
|
312 |
Visit it group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a> |
313 |
{% else %} |
314 |
There is no homepage for this group yet. |
315 |
{% endif %} |
316 |
</p>
|
317 |
</div>
|
318 |
</td>
|
319 |
</tr>
|
320 |
{% endfor %} |
321 |
</tbody>
|
322 |
</table>
|
323 |
|
324 |
</div>
|
325 |
<div class="pagination"> |
326 |
<p class="next-prev"> |
327 |
{% if other.has_previous %} |
328 |
<a href="?other_page={{ other.previous_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">previous</a> |
329 |
{% endif %} |
330 |
{% if other.has_next %} |
331 |
<a href="?other_page={{ other.next_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">next</a> |
332 |
{% endif %} |
333 |
</p>
|
334 |
<p class="nums"> |
335 |
<span class="current"> |
336 |
Page {{ other.number }} of {{ other.paginator.num_pages }} |
337 |
</span>
|
338 |
</p>
|
339 |
</div>
|
340 |
|
341 |
{% endwith %} |
342 |
{% endwith %} |
343 |
{% endif %} |
344 |
|
345 |
{% if q %} |
346 |
<h2>No groups found!</h2> |
347 |
{% endif %} |
348 |
{% endif %} |
349 |
{% endwith %} |
350 |
</div>
|
351 |
</div>
|
352 |
{% endblock %} |