Commit eddb278a authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#174254 by pwolanin: Taxonomy term pages need proper titles

parent 21ac9f19
......@@ -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.
*
......
......@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment