commit e1dc6dec72c24fedfa56473aba5cb27e91140063
Author: Olga Brani <olgabrani@grnet.gr>
Date:   Tue Dec 18 15:57:14 2012 +0200

    New style for table sorting

diff --git a/snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html b/snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html
index b83824b..fe94553 100644
--- a/snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html
+++ b/snf-astakos-app/astakos/im/templates/im/astakosgroup_list.html
@@ -1,5 +1,5 @@
 {% extends "im/account_base.html" %}
-
+{% load astakos_tags %}
 {% load filters %}
 
 {% block page.body %}
@@ -66,6 +66,7 @@
     <!-- Search group -->
     {% if object_list %}
         <div class="full-dotted">
+        	{% comment %}
         	<form method="GET" class="minimal" action="#searchResults"> 
 				<div class="form-row">
 					<select name="sorting" onchange="this.form.submit();" class="dropkicked" tabindex="1">
@@ -78,27 +79,25 @@
 					<input type="hidden" name="q" value="{{q}}"/>
 				</div>
 			</form>
+			{% endcomment %}
             <table class="alt-style complex" id="searchResults">
                 <caption>
                     {% if q %}SEARCH RESULTS{% else %}ALL PROJECTS{% endif %}
                 </caption>
                 <thead>
-                  <tr>
-                    <th>Name</th>
-                    <!--<th>Type</th>-->
-                    <th>Start date</th>
-                    <th>End date</th>
-                     
-                    <th>Members</th>
-                   
-                     
-                    <th>Status</th>
-                    <th>&nbsp;</th>
-			        <th>Moderated</th>
-                   <!-- <th>&nbsp;</th>-->
-                  
-                  </tr>
-                </thead>
+                      <tr>
+                        <th><a href="?{% if q %}q={{q}}&{% endif %}sorting=groupname&ordering={% if ordering == 'ASC' and sorting == 'groupname' %}DESC{% else %}ASC{% endif %}#allGroups">Name</a></th>
+                        <!--th>Type</th-->
+                        <th><a href="?{% if q %}q={{q}}&{% endif %}sorting=issue_date&ordering={% if ordering == 'ASC' and sorting == 'issue_date' %}DESC{% else %}ASC{% endif %}#allGroups">Start date</a></th>
+                        <th><a href="?{% if q %}q={{q}}&{% endif %}sorting=expiration_date&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">End date</a></th>
+                        <th><a href="?{% if q %}q={{q}}&{% endif %}sorting=approved_members_num&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">Members</a></th>
+                        <th><a href="javascript:void(0)">Status</a></th>
+                        <th>&nbsp;</th>
+                        <th class="centered"><a href="?{% if q %}q={{q}}&{% endif %}sorting=moderation_enabled&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">Moderated</a></th>
+                       <!-- <th>&nbsp;</th>-->
+                        
+                      </tr>
+			            </thead>
                 <tbody>
                   {% for o in object_list %}
                    <tr class="{% cycle 'tr1' 'tr2' %}">
@@ -226,6 +225,7 @@
             {% with q|paginate:args as page_obj %}
         	 	{% if page_obj.object_list  %}
 	      	    <div>
+                    {% comment %}
 					<form method="GET" class="minimal" action="#allGroups" id="mygroups">
 						<div class="form-row">
 						    <select name="sorting"  class="dropkicked"  tabindex="1">
@@ -238,18 +238,19 @@
 							</select>
 						</div>
 					</form>
+                    {% endcomment %}
 					<table class="alt-style complex" id="allGroups">
 			            <caption>MY PROJECTS</caption>
 			            <thead>
 			              <tr>
-			                <th>Name</th>
+			                <th><a href="{% url group_list %}?sorting=groupname&ordering={% if ordering == 'ASC' and sorting == 'groupname' %}DESC{% else %}ASC{% endif %}#allGroups">Name</a></th>
 			                <!--th>Type</th-->
-			                <th>Start date</th>
-			                <th>End date</th>
-			                <th>Members</th>
-			                <th>Status</th>
+			                <th><a href="{% url group_list %}?sorting=issue_date&ordering={% if ordering == 'ASC' and sorting == 'issue_date' %}DESC{% else %}ASC{% endif %}#allGroups">Start date</a></th>
+			                <th><a href="{% url group_list %}?sorting=expiration_date&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">End date</a></th>
+			                <th><a href="{% url group_list %}?sorting=approved_members_num&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">Members</a></th>
+			                <th><a href="javascript:void(0)">Status</a></th>
 			                <th>&nbsp;</th>
-			                <th class="centered">Moderated</th>
+			                <th class="centered"><a href="{% url group_list %}?sorting=moderation_enabled&ordering={% if ordering == 'ASC' %}DESC{% else %}ASC{% endif %}#allGroups">Moderated</a></th>
 			               <!-- <th>&nbsp;</th>-->
 			                
 			              </tr>
