Checkbox to set multiLimit option for facets.
authorJason Skomorowski <jason@indexdata.com>
Mon, 4 Apr 2011 02:21:09 +0000 (02:21 +0000)
committerJason Skomorowski <jason@indexdata.com>
Mon, 4 Apr 2011 02:21:09 +0000 (02:21 +0000)
mkdru.install
mkdru.module

index 1792f22..3f7d0a7 100644 (file)
@@ -61,13 +61,13 @@ function mkdru_install() {
   $settings['facets']['subject']['displayName'] = "Subject";
   $settings['facets']['subject']['pz2Name'] = "subject";
   $settings['facets']['subject']['limiter'] = "su";
-  $settings['facets']['subject']['multiLimit'] = TRUE;
+  $settings['facets']['subject']['multiLimit'] = 1;
   $settings['facets']['subject']['max'] = 10;
   $settings['facets']['subject']['orderWeight'] = 2;
   $settings['facets']['author']['displayName'] = "Author";
   $settings['facets']['author']['pz2Name'] = "author";
   $settings['facets']['author']['limiter'] = "au";
-  $settings['facets']['author']['multiLimit'] = FALSE;
+  $settings['facets']['author']['multiLimit'] = 0;
   $settings['facets']['author']['max'] = 10;
   $settings['facets']['author']['orderWeight'] = 3;
   variable_set('mkdru_defaults', $settings);
index 2ee892c..e8631b8 100644 (file)
@@ -221,6 +221,11 @@ function mkdru_settings_form(&$form_state) {
       '#default_value' => $settings['facets'][$facet]['limiter'],
       '#size' => 5,
     );
+    $form['settings']['facets'][$facet]['multiLimit'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Allow multiple limits?'),
+      '#default_value' => $settings['facets'][$facet]['multiLimit'],
+    );
     $form['settings']['facets'][$facet]['max'] = array(
       '#type' => 'textfield',
       '#title' => t('Number of terms to display'),