diff options
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.install | 10 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 28 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.test | 13 |
3 files changed, 38 insertions, 13 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index 9e8153c1a..35fbca2c9 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -380,6 +380,16 @@ function taxonomy_update_7004() { 'widget' => array( 'type' => $vocabulary->tags ? 'taxonomy_autocomplete' : 'select', ), + 'display' => array( + 'default' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + 'teaser' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + ), ); field_create_instance($instance); } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index ab98ebdda..6dd9b36c1 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -101,6 +101,7 @@ function taxonomy_entity_info() { // @todo View mode for display as a field (when attached to nodes etc). 'full' => array( 'label' => t('Taxonomy term page'), + 'custom settings' => FALSE, ), ), ), @@ -146,16 +147,25 @@ function taxonomy_field_extra_fields() { $info = entity_get_info('taxonomy_term'); foreach (array_keys($info['bundles']) as $bundle) { $return['taxonomy_term'][$bundle] = array( - 'name' => array( - 'label' => t('Name'), - 'description' => t('Term name textfield'), - 'weight' => -5, + 'form' => array( + 'name' => array( + 'label' => t('Name'), + 'description' => t('Term name textfield'), + 'weight' => -5, + ), + 'description' => array( + 'label' => t('Description'), + 'description' => t('Term description textarea'), + 'weight' => 0, + ), + ), + 'display' => array( + 'description' => array( + 'label' => t('Description'), + 'description' => t('Term description'), + 'weight' => 0, + ), ), - 'description' => array( - 'label' => t('Description'), - 'description' => t('Term description textarea'), - 'weight' => 0, - ) ); } diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 47285f78b..d60f1e616 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -347,7 +347,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { 'type' => 'options_select', ), 'display' => array( - 'full' => array( + 'default' => array( 'type' => 'taxonomy_term_reference_link', ), ), @@ -848,7 +848,12 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase { 'label' => $this->randomName() . '_label', 'widget' => array( 'type' => 'options_select', - ) + ), + 'display' => array( + 'full' => array( + 'type' => 'taxonomy_term_reference_link', + ), + ), ); field_create_instance($this->instance); @@ -873,7 +878,7 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase { $entity = field_test_entity_test_load($id); $entities = array($id => $entity); field_attach_prepare_view($entity_type, $entities, 'full'); - $entity->content = field_attach_view($entity_type, $entity); + $entity->content = field_attach_view($entity_type, $entity, 'full'); $this->content = drupal_render($entity->content); $this->assertText($term->name, t('Term name is displayed')); } @@ -921,7 +926,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase { 'type' => 'options_select', ), 'display' => array( - 'full' => array( + 'default' => array( 'type' => 'taxonomy_term_reference_link', ), ), |