Index: sites/all/modules/l10n_server/l10n_community/l10n_community.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.module,v
retrieving revision 1.1.2.23.2.66.2.14
diff -u -r1.1.2.23.2.66.2.14 l10n_community.module
--- sites/all/modules/l10n_server/l10n_community/l10n_community.module	31 Mar 2010 13:53:00 -0000	1.1.2.23.2.66.2.14
+++ sites/all/modules/l10n_server/l10n_community/l10n_community.module	2 Jun 2010 08:10:17 -0000
@@ -871,6 +871,7 @@
     // Dropdown, validated by form API.
     'context' => isset($params['context']) ? (string) $params['context'] : 'all',
     'limit' => (isset($params['limit']) && in_array($params['limit'], array(5, 10, 20, 30))) ? (int) $params['limit'] : 10,
+    'sort' => (!empty($params['sort']) && in_array($params['sort'], array('', Alphabetically, Suggestion, 'Approved time', 'String Length'))) ? (string) $params['sort'] : '',
   );
 
   // The project can be a dropdown or text field depending on number of
Index: sites/all/modules/l10n_server/l10n_community/translate.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/l10n_server/l10n_community/Attic/translate.inc,v
retrieving revision 1.1.2.7.2.31.2.25
diff -u -r1.1.2.7.2.31.2.25 translate.inc
--- sites/all/modules/l10n_server/l10n_community/translate.inc	26 May 2010 12:30:21 -0000	1.1.2.7.2.31.2.25
+++ sites/all/modules/l10n_server/l10n_community/translate.inc	2 Jun 2010 08:10:17 -0000
@@ -159,6 +159,14 @@
     '#display_none' => $form_state['values']['limit'] == 10,
   );
 
+  $form['sort'] = array(
+    '#type' => 'select',
+    '#title' => t('Sort by'),
+    '#default_value' => isset($filters['sort']) ? $filters['sort'] : '',
+    '#options' => drupal_map_assoc(array('', Alphabetically, Suggestion, 'Approved time', 'String Length')),
+    '#default_value' => $filters['sort'],
+  );
+
   $form['submit'] = array(
     '#value' => t('Filter'),
     '#type' => 'submit',
@@ -179,7 +187,7 @@
   $output = '<div class="l10n-server-filter clear-block">';
 
   // Only display these elements individually.
-  $elements = array('project', 'release', 'context', 'status', 'author', 'search', 'limit');
+  $elements = array('project', 'release', 'context', 'status', 'author', 'search', 'limit', 'sort');
   foreach ($form as $id => &$element) {
     if (in_array($id, $elements)) {
       $title = $element['#title'];
@@ -851,12 +859,32 @@
       $where[] = "t.is_suggestion = 1";
     }
   }
+  
+  if (isset($filters['sort'])){
+    if($filters['sort'] == 'Suggestion'){
+      $where[] = "ts.has_suggestion = 1";
+    }elseif($filters['sort'] == 'Approved time'){
+      $where[] = "t.is_active  = 1";
+    }
+  }
 
   // Build the queries
   $sql_args = array_merge($join_args, $where_args);
   $sql_where = implode(' ', $join) . (count($where) ? (' WHERE '. implode(' AND ', $where)) : '');
   $sql = $select .' '. $sql_where;
-  $sql .= ' ORDER BY s.value ASC';
+
+  if (!empty($filters['sort'])) {
+    if($filters['sort'] == 'Suggestion'){
+        $sql .= " ORDER BY t.time_entered DESC";
+    }elseif($filters['sort'] == 'Approved time'){
+        $sql .= " ORDER BY t.time_approved DESC";
+    }elseif($filters['sort'] == 'String Length'){
+        $sql .= " ORDER BY CHAR_LENGTH(s.value)";
+    }else{
+         $sql .= " ORDER BY s.value ASC";
+    }
+  }
+
   $sql_count = $select_count .' '. $sql_where;
 
   // We either need a pager or a full result.
