diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-13 07:54:27 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-13 07:54:27 +0000 |
commit | eddb278a0a4dd0ccbfc0370349d2a9f9cd97fea6 (patch) | |
tree | 7022b019dd2e3a5dfcf762f2787c82a1ed2aafab /modules/taxonomy | |
parent | 21ac9f1917595492fa9997e565bf11ec8d8cd14f (diff) | |
download | brdo-eddb278a0a4dd0ccbfc0370349d2a9f9cd97fea6.tar.gz brdo-eddb278a0a4dd0ccbfc0370349d2a9f9cd97fea6.tar.bz2 |
#174254 by pwolanin: Taxonomy term pages need proper titles
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.admin.inc | 11 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index 4254d8cb7..ae8501368 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -171,7 +171,7 @@ function taxonomy_overview_terms($vocabulary) { $header = array(t('Name'), t('Operations')); - drupal_set_title(check_plain($vocabulary->name)); + drupal_set_title(t('Terms in %vocabulary', array('%vocabulary' => $vocabulary->name))); $start_from = isset($_GET['page']) ? $_GET['page'] : 0; $total_entries = 0; // total count for pager $page_increment = 25; // number of tids per page @@ -201,6 +201,15 @@ function taxonomy_overview_terms($vocabulary) { return theme('table', $header, $rows, array('id' => 'taxonomy')); } + +/** + * Menu callback; return the edit form for a new term after setting the title. + */ +function taxonomy_add_term_page($vocabulary) { + drupal_set_title(t('Add term to %vocabulary', array('%vocabulary' => $vocabulary->name))); + return drupal_get_form('taxonomy_form_term' , $vocabulary); +} + /** * Form function for the term edit form. * diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 4c1aeb540..45f8f58a3 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -152,8 +152,8 @@ function taxonomy_menu() { $items['admin/content/taxonomy/%taxonomy_vocabulary/add/term'] = array( 'title' => 'Add term', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('taxonomy_form_term', 3), + 'page callback' => 'taxonomy_add_term_page', + 'page arguments' => array(3), 'type' => MENU_LOCAL_TASK, 'parent' => 'admin/content/taxonomy/%taxonomy_vocabulary', 'file' => 'taxonomy.admin.inc', |