? l.patch
? l10n_server_split_2.patch
? l10n_server_split_status.patch
Index: l10n_community.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.css,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 l10n_community.css
--- l10n_community.css	28 Dec 2007 20:40:21 -0000	1.1.2.9
+++ l10n_community.css	7 Mar 2008 20:42:20 -0000
@@ -51,12 +51,6 @@ div.admin form {
   margin: 1em 0;
   position: relative;
 }
-#l10n-community-filter-form a {
-  position: absolute;
-  top: 1em;
-  right: 1em;
-  /*float: right;*/
-}
 #l10n-community-filter-form fieldset {
   text-align: center;
 }
@@ -169,3 +163,15 @@ em.l10n-community-marker {
   background-color: orange;
   border-color: orange;
 }
+#l10n-community-filter-form .l10n-status-filter, #l10n-community-filter-form .l10n-suggestion-filter {
+  display: block;
+}
+.l10n-filter-page-link {
+
+}
+#l10n-community-filter-form .l10n-filter-page-link a {
+  position: absolute;
+  bottom: 1em;
+  right: 1em;
+}
+
Index: l10n_community.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.module,v
retrieving revision 1.1.2.15
diff -u -p -r1.1.2.15 l10n_community.module
--- l10n_community.module	2 Jan 2008 23:14:12 -0000	1.1.2.15
+++ l10n_community.module	7 Mar 2008 20:43:33 -0000
@@ -43,7 +43,12 @@ define('L10N_STATUS_HAS_SUGGESTION', 2);
 /**
  * Translated (and approved) strings only.
  */
-define('L10N_STATUS_TRANSLATED', 3); 
+define('L10N_STATUS_TRANSLATED', 4);
+
+/**
+ * Doesn't have suggested translations.
+ */
+define('L10N_STATUS_NO_SUGGESTION', 8);
 
 // = Core hooks ================================================================
 
Index: translate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/translate.inc,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 translate.inc
--- translate.inc	28 Dec 2007 16:40:12 -0000	1.1.2.5
+++ translate.inc	7 Mar 2008 20:43:35 -0000
@@ -60,7 +60,7 @@ function l10n_community_translate_page($
   if (!count($strings)) {
     drupal_set_message(t('No strings found with this filter. Try adjusting the filter options.'));
   }
-  elseif ($perm == L10N_PERM_NONE || $mode == 'view') {
+  else if ($perm == L10N_PERM_NONE || $mode == 'view') {
     // For users without permission to translate or suggest, display the view.
     drupal_set_title(t('@language translations', array('@language' => $languages[$langcode]->name)));
     $output .= l10n_community_translate_view($strings, $languages[$langcode], $uri);
@@ -79,18 +79,24 @@ function l10n_community_translate_page($
 /**
  * Translate form filter.
  */
-function l10n_community_filter_form($project = NULL, $status = L10N_STATUS_ALL, $release = 'all', $search  = '') {
+function l10n_community_filter_form($project = NULL, $status = L10N_STATUS_ALL,  $release = 'all', $search  = '') {
   $projects = l10n_community_get_projects();
 
   $status_options = array(
-    L10N_STATUS_ALL            => t('All'),
+    L10N_STATUS_ALL            => t('Don\'t care'),
     L10N_STATUS_UNTRANSLATED   => t('Untranslated'),
-    L10N_STATUS_HAS_SUGGESTION => t('Has suggestion'),
     L10N_STATUS_TRANSLATED     => t('Translated'),
   );
+  $suggestion_options = array(
+    L10N_STATUS_ALL            => t('Don\'t care'),
+    L10N_STATUS_HAS_SUGGESTION => t('Has suggestion'),
+    L10N_STATUS_NO_SUGGESTION => t('No suggestion'),
+  );
   $form['filters'] = array(
     '#title' => t('Show only strings where'),
     '#type' => 'fieldset',
+    '#collapsible' => TRUE,
+    '#collapse' => FALSE,
   );
   
   // Provide link to current page with filters intact for bookmarking.
@@ -99,10 +105,6 @@ function l10n_community_filter_form($pro
            urlencode(isset($release) ? $release : 'all') .'&status='.
            urlencode(isset($status) ? $status : L10N_STATUS_ALL) .'&search='.
            urlencode(isset($search) ? $search : '') . ($page ? '&page='. $page : '');
-  $form['filters']['link'] = array(
-    '#type' => 'markup',
-    '#value' => l(t('Link to this page'), $_GET['q'], array(), $query)
-  );
 
   $form['filters']['project'] = array(
     '#title' => t('Project'),
@@ -138,18 +140,27 @@ function l10n_community_filter_form($pro
       '#default_value' => isset($release) ? $release : 'all',
     );
   }
-  
-  $form['filters']['status'] = array(
+  $form['filters']['status'] = array('#tree' => TRUE);
+  $form['filters']['status']['translation'] = array(
     '#title' => t('Status'),
-    '#type' => 'select',
+    '#type' => 'radios',
     '#options' => $status_options,
-    '#default_value' => $status,
+    '#default_value' => $status & (L10N_STATUS_TRANSLATED | L10N_STATUS_UNTRANSLATED),
+    '#prefix' => '<div class="l10n-status-filter">',
+    '#suffix' => '</div>'
+  );
+  $form['filters']['status']['suggestion'] = array(
+    '#type' => 'radios',
+    '#title' => t('Suggestion'),
+    '#options' => $suggestion_options,
+    '#prefix' => '<div class="l10n-suggestion-filter">',
+    '#suffix' => '</div>',
+    '#default_value' => $status & (L10N_STATUS_HAS_SUGGESTION | L10N_STATUS_NO_SUGGESTION),
   );
   $form['filters']['search'] = array(
     '#title' => t('Contains'),
     '#type' => 'textfield',
     '#default_value' => $search,
-    '#prefix' => '<br />',
   );
   $form['filters']['submit'] = array(
     '#value' => t('Filter'),
@@ -160,6 +171,12 @@ function l10n_community_filter_form($pro
     '#value' => t('Reset'),
     '#type' => 'submit',
   );
+  $form['filters']['link'] = array( 
+    '#type' => 'markup',   
+    '#value' => l(t('Link to this page'), $_GET['q'], array(), $query),
+    '#prefix' => '<div class="l10n-filter-page-link">',
+    '#suffix' => '</div>',
+  );
   return $form;
 }
 
@@ -199,7 +216,8 @@ function l10n_community_filter_form_subm
       }
     }
     if (!empty($form['status'])) {
-      $_SESSION['l10n_community']['status'] = intval($form['status']);
+      // Combined status field, bitwise OR
+      $_SESSION['l10n_community']['status'] = intval($form['status']['translation']) | intval($form['status']['suggestion']);
     }
     if (!empty($form['search'])) {
       $_SESSION['l10n_community']['search'] = $form['search'];
@@ -607,36 +625,30 @@ function l10n_community_get_strings($lan
   }
     
   // Restriction based on string status.
-  switch ($status) {
-    case L10N_STATUS_UNTRANSLATED:
+  $status_sql = '';
+  if ($status & L10N_STATUS_UNTRANSLATED) {
       // We are doing a LEFT JOIN especially to look into the case, when we have nothing 
       // to match in the translation table, but we still have the string. (We get our 
       // records in the result set in this case). The translation field is empty or
       // NULL in this case, as we are not allowing NULL there and only saving an empty
       // translation if there are suggestions but no translation yet.
-      $status_sql = " AND (t.translation is NULL OR t.translation = '')";
-      $sql .= $status_sql;
-      $sql_count .= $status_sql;
-      break;
-    case L10N_STATUS_TRANSLATED:
-      $status_sql = " AND t.translation != ''";
+      $status_sql .= " AND (t.translation is NULL OR t.translation = '')";
+  } else if ($status & L10N_STATUS_TRANSLATED) {
+      $status_sql .= " AND t.translation != ''";
       $sql .= $status_sql;
       $sql_count .= $status_sql;
-      break;
-    case L10N_STATUS_HAS_SUGGESTION:
+  }
+  if ($status & L10N_STATUS_HAS_SUGGESTION) {
       // Note that we are not searching in the suggestions themselfs, only
       // the source and active translation values. The user interface underlines
       // that we are  looking for strings which have suggestions, not the
       // suggestions themselfs.
-      $status_sql = " AND t.has_suggestion = 1";
-      $sql .= $status_sql;
-      $sql_count .= $status_sql;
-      break;
-    case L10N_STATUS_ALL:
-    default:
-      // Leave query alone on this case.
-      break;
+      $status_sql .= " AND t.has_suggestion = 1";
+  } else if ($status & L10N_STATUS_NO_SUGGESTION) {
+      $status_sql .= " AND t.has_suggestion = 0";
   }
+  $sql .= $status_sql;
+  $sql_count .= $status_sql;
   
   // Morph "WHERE AND" to "WHERE" and remove closing "WHERE". The first appears
   // if there was no project filtering but further filtering was made. The
