diff --git a/modules/taxonomy.views.inc b/modules/taxonomy.views.inc index 96f9551..2968b14 100644 --- a/modules/taxonomy.views.inc +++ b/modules/taxonomy.views.inc @@ -457,14 +457,14 @@ function taxonomy_views_plugins() { 'path' => drupal_get_path('module', 'views') . '/modules/taxonomy', ), ), -// 'argument default' => array( -// 'taxonomy_tid' => array( -// 'title' => t('Taxonomy Term ID from URL'), -// 'handler' => 'views_plugin_argument_default_taxonomy_tid', -// 'path' => drupal_get_path('module', 'views') . '/modules/taxonomy', -// 'parent' => 'fixed', -// ), -// ), + 'argument default' => array( + 'taxonomy_tid' => array( + 'title' => t('Taxonomy Term ID from URL'), + 'handler' => 'views_plugin_argument_default_taxonomy_tid', + 'path' => drupal_get_path('module', 'views') . '/modules/taxonomy', + 'parent' => 'fixed', + ), + ), ); } diff --git a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc index af1fc6c..28a7e5f 100644 --- a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc +++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc @@ -10,8 +10,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d $options['term_page'] = array('default' => TRUE); $options['node'] = array('default' => FALSE); - $options['limit'] = array('default' => FALSE); - $options['vids'] = array('default' => array()); + $options['node_operator'] = array('default' => 'or'); return $options; } @@ -30,7 +29,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d ); $form['node'] = array( '#type' => 'checkbox', - '#title' => t('Load default argument from node page. Good for related taxonomy blocks.'), + '#title' => t('Load default argument from node page. Useful for related taxonomy blocks.'), '#default_value' => $this->argument->options['node'], '#process' => array('views_process_dependency'), '#dependency' => array( @@ -39,83 +38,78 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d ), '#dependency_count' => 2, ); - - $form['limit'] = array( - '#type' => 'checkbox', - '#title' => t('Limit terms by vocabulary'), - '#default_value'=> $this->argument->options['limit'], + $form['node_operator'] = array( + '#type' => 'select', + '#title' => t('How to combine term IDs'), + '#description' => t("Whether to form multiple term IDs into the argument with '+' or ','."), + '#options' => array( + 'and' => 'and', + 'or' => 'or', + ), + '#default_value' => $this->argument->options['node_operator'], '#process' => array('views_process_dependency'), '#dependency' => array( 'radio:options[default_action]' => array('default'), 'radio:options[default_argument_type]' => array($this->id), - 'edit-options-node' => array(1) + 'edit-options-node' => array(TRUE), ), '#dependency_count' => 3, ); - - $options = array(); - $vocabularies = taxonomy_get_vocabularies(); - foreach ($vocabularies as $voc) { - $options[$voc->vid] = check_plain($voc->name); - } - - $form['vids'] = array( - '#prefix' => '