Revision 7bb6bd0e snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html

b/snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html
169 169
       {% else %}
170 170
       	
171 171
        	 
172
        	{% if all %}
173
            {% with all_page|concat:all_sorting as args %}
174
            {% with all|paginate:args as all %}
175 172
	      	    <div >
176 173
					<form method="GET" class="minimal" action="#allGroups">
177 174
						<div class="form-row">
......
203 200
			              </tr>
204 201
			            </thead>
205 202
			            <tbody>
206
			              {% for o in all.object_list %}
203
			              {% for o in page_obj.object_list %}
207 204
			              <tr class="{% cycle 'tr1' 'tr2' %}">
208 205
			                <td><a  href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/" }}</a></td>
209 206
			                <td>{{o.kindname|capfirst}}</td>
210 207
			                <td>{{o.issue_date|date:"d/m/Y"}}</td>
211 208
			                <td>{{o.expiration_date|date:"d/m/Y"}}</td>
212 209
			                <td>{{ o.approved_members_num }}</td>
213
			                <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
214
			                <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
215
			                <td><a href="#" class="more-info" title="more info">&nbsp;</a></td>
216
			              </tr>
217
			              <tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
218
			                <td colspan="8" class="info-td">
219
			                	<div>
220
			                		<p>{{o.desc}}</p>
221
					                <p>{% if o.homepage%}
222
							 			Group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
223
							 		{% endif %}
224
							 		</p>
225
			                	</div>	
210
			                <td>
211
			                	{% if o.is_enabled %}Active{% else %}Pending{% endif %}
226 212
			                </td>
227
			              </tr>
228
			              {% endfor %}
229
			            </tbody>
230
			        </table>
231
				</div>
232
				<div class="pagination">
233
					<p class="next-prev">
234
				        {% if all.has_previous %}
235
                            <a href="?all_page={{ all.previous_page_number }}{% if all_sorting %}&all_sorting={{ all_sorting }}{% endif%}{% if all_sorting %}&all_sorting={{ all_sorting }}{% endif%}#allGroups">previous</a>
236
                        {% endif %}
237
			            {% if all.has_next %}
238
                            <a href="?all_page={{ all.next_page_number }}{% if all_sorting %}&all_sorting={{ all_sorting }}{% endif%}{% if all_sorting %}&all_sorting={{ other_sorting }}{% endif%}#allGroups">next</a>
239
                        {% endif %}
240
			    	</p>
241
					<p class="nums">
242
						<span class="current">
243
                            Page {{ all.number }} of {{ all.paginator.num_pages }}
244
                        </span>
245
					</p>
246
			   </div>
247
			
248
      		{% endwith %}
249
            {% endwith %}
250
      		{% endif %}
251
         
252
        	<!--
253
            {% if mine %}
254
            {% with own_page|concat:own_sorting as args %}
255
            {% with mine|paginate:args as mine %}
256
	      	    <div >
257
					<form method="GET" class="minimal" action="#myGroups">
258
						<div class="form-row">
259
						    <select name="own_sorting" onchange="this.form.submit();">
260
							    <option value="">Sort by</option>
261
							    <option value="groupname" {% if own_sorting == 'groupname' %}selected{% endif %}>Name</option>
262
					            <option value="kindname" {% if own_sorting == 'kindname' %}selected{% endif %}>Type</option>			
263
					            <option value="issue_date" {% if own_sorting == 'issue_date' %}selected{% endif %}>Issue date</option>			
264
					            <option value="expiration_date" {% if own_sorting == 'expiration_date' %}selected{% endif %}>Expiration Date</option>
265
					            <option value="approved_members_num" {% if own_sorting == 'approved_members_num' %}selected{% endif %}>Participants</option>
266
					            <option value="is_enabled" {% if own_sorting == 'is_enabled' %}selected{% endif %}>Status</option>
267
					            <option value="moderation_enabled" {% if own_sorting == 'moderation_enabled' %}selected{% endif %}>Moderation</option>		
268
							</select>
269
						</div>
270
					</form>
271
					<table class="alt-style complex" id="myGroups">
272
			            <caption>MY GROUPS</caption>
273
			            <thead>
274
			              <tr>
275
			                <th>Name</th>
276
			                <th>Type</th>
277
			                <th>Issued</th>
278
			                <th>Expires</th>
279
			                <th>Enrolled</th>
280
			                <th>Status</th>
281
			                <th>Moderated</th>
282
			                <th>&nbsp;</th>
283
			                
284
			              </tr>
285
			            </thead>
286
			            <tbody>
287
			              {% for o in mine.object_list %}
288
			              <tr class="{% cycle 'tr1' 'tr2' %}">
289
			                <td><a  href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/" }}</a></td>
290
			                <td>{{o.kindname|capfirst}}</td>
291
			                <td>{{o.issue_date|date:"d/m/Y"}}</td>
292
			                <td>{{o.expiration_date|date:"d/m/Y"}}</td>
293
			                <td>{{ o.approved_members_num }}</td>
294
			                <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
295 213
			                <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
296
			                <td><a href="#" class="more-info" title="more info">&nbsp;</a></td>
214
			                <td><a href="#" class="more-info" title="more info">+ more</a></td>
297 215
			              </tr>
298 216
			              <tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
299 217
			                <td colspan="8" class="info-td">
......
312 230
				</div>
313 231
				<div class="pagination">
314 232
					<p class="next-prev">
315
				        {% if mine.has_previous %}
316
                            <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>
317
                        {% endif %}
318
			            {% if mine.has_next %}
319
                            <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>
320
                        {% endif %}
321
			    	</p>
322
					<p class="nums">
323
						<span class="current">
324
                            Page {{ mine.number }} of {{ mine.paginator.num_pages }}
325
                        </span>
326
					</p>
327
			   </div>
328
			
329
      		{% endwith %}
330
            {% endwith %}
331
      		{% endif %}
332
	      	
333
	      	{% if other %}
334
            {% with other_page|concat:other_sorting as args %}
335
            {% with other|paginate:args as other %}
336
 	      		<div class="full-dotted">
337
 	      			<form method="GET" class="minimal" action="#iParticipateIn"> 
338
						<div class="form-row">
339
							<select name="other_sorting" onchange="this.form.submit();">
340
							    <option value="">Sort by</option>
341
							    <option value="groupname" {% if other_sorting == 'groupname' %}selected{% endif %}>Name</option>
342
					            <option value="kindname" {% if other_sorting == 'kindname' %}selected{% endif %}>Type</option>			
343
					            <option value="issue_date" {% if other_sorting == 'issue_date' %}selected{% endif %}>Issue date</option>			
344
					            <option value="expiration_date" {% if other_sorting == 'expiration_date' %}selected{% endif %}>Expiration Date</option>
345
					            <option value="approved_members_num" {% if other_sorting == 'approved_members_num' %}selected{% endif %}>Participants</option>
346
					            <option value="membership_status" {% if other_sorting == 'membership_status' %}selected{% endif %}>Enrollment Status</option>
347
					             
348
							</select>
349
						</div>
350
					</form>
351
					<table class="alt-style complex" id="iParticipateIn">
352
			            <caption>
353
			            	I PARTICIPATE IN
354
			            </caption>
355
			            <thead>
356
			              <tr>
357
			                <th>Name</th>
358
			                <th>Type</th>
359
			                <th>Issued</th>
360
			                <th>Expires</th>
361
			                <th>Enrolled</th>
362
			                <th>Enrollment status</th>
363
			                <th>&nbsp;</th>
364
			              
365
			              </tr>
366
			            </thead>
367
			            <tbody>
368
			              {% for o in other.object_list %}
369
			              <tr class="{% cycle 'tr1' 'tr2' %}">
370
			                <td><a href="{% url group_detail o.id %}" title="visit group page">{{o.groupname|rcut:"/"}}</a></td>
371
			                <td>{{o.kindname|capfirst}}</td>
372
			                <td>{{o.issue_date|date:"d/m/Y"}}</td>
373
			                <td>{{o.expiration_date|date:"d/m/Y"}}</td>
374
			                
375
			                <td>{{ o.approved_members_num }}</td>
376
			                
377
			                <td>
378
			                {% if o.membership_status %}
379
			                    Registered
380
		                    	<form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
381
		                             <input type="submit"  value="LEAVE GROUP" />
382
		                        </form>	
383
			                    
384
			                {% else %}
385
			                    Pending
386
			                {% endif %}
387
			                </td>
388
			                <td><a href="#" class="more-info" title="more info">&nbsp;</a></td>
389
			              </tr>
390
			              <tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
391
			                <td colspan="7" class="info-td">
392
			                	<div>
393
			                		<p>{{o.desc}}</p>
394
					                <p>{% if o.homepage%}
395
							 			Visit it group's home page: <a href="{{ o.homepage }}">{{ o.homepage }}</a>
396
							 		{% else %}
397
							 			There is no homepage for this group yet.
398
							 		{% endif %}
399
							 		</p>
400
			                	</div>	
401
			                </td>
402
			              </tr>
403
			              {% endfor %}
404
			            </tbody>
405
			        </table>
406
			       
407
				</div>
408
				<div class="pagination">
409
					<p class="next-prev">
410
				        {% if other.has_previous %}
411
                            <a href="#iParticipateIn?other_page={{ other.previous_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">previous</a>
233
				        {% if page.has_previous %}
234
                            <a href="?page={{ page.previous_page_number }}{% if sorting %}&sorting={{ sorting }}{% endif%}#allGroups">previous</a>
412 235
                        {% endif %}
413
			            {% if other.has_next %}
414
                            <a href="#iParticipateIn?other_page={{ other.next_page_number }}{% if own_sorting %}&own_sorting={{ own_sorting }}{% endif%}{% if other_sorting %}&other_sorting={{ other_sorting }}{% endif%}">next</a>
236
			            {% if page.has_next %}
237
                            <a href="?page={{ page.next_page_number }}{% if sorting %}&sorting={{ sorting }}{% endif%}#allGroups">next</a>
415 238
                        {% endif %}
416 239
			    	</p>
417 240
					<p class="nums">
418 241
						<span class="current">
419
                            Page {{ other.number }} of {{ other.paginator.num_pages }}
242
                            Page {{ page.number }} of {{ page.paginator.num_pages }}
420 243
                        </span>
421 244
					</p>
422 245
			   </div>
423
		    
424
			{% endwith %}
425
            {% endwith %}
426
			{% endif %}
427
			-->
246
		 
247
        	 
428 248
	      	
429 249
            {% if q %}
430 250
                <h2>No groups found!</h2>

Also available in: Unified diff