From 535db9d024393d89a4843eea638056452b4c687d Mon Sep 17 00:00:00 2001 From: Angie Byron <webchick@24967.no-reply.drupal.org> Date: Fri, 13 Feb 2009 02:22:09 +0000 Subject: [PATCH] #69468 by marcingy, greggles, mikey_p: Usability: Display node type on editing form. --- modules/blog/blog.test | 2 +- modules/forum/forum.test | 2 +- modules/node/node.pages.inc | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/blog/blog.test b/modules/blog/blog.test index 5086e001b19c..0ce26088934c 100644 --- a/modules/blog/blog.test +++ b/modules/blog/blog.test @@ -115,7 +115,7 @@ class BlogTestCase extends DrupalWebTestCase { $this->drupalGet('node/' . $node->nid . '/edit'); $this->assertResponse($response); if ($response == 200) { - $this->assertTitle($node->title. ' | Drupal', t('Blog edit node was displayed')); + $this->assertTitle('Edit Blog entry ' . $node->title. ' | Drupal', t('Blog edit node was displayed')); $this->assertText(t('Home ' . $crumb . ' @title', array('@title' => $node->title)), t('Breadcrumbs were displayed')); } diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 95f0ccbfe7d0..426a5dccce5d 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -313,7 +313,7 @@ class ForumTestCase extends DrupalWebTestCase { $this->drupalGet('node/' . $node->nid . '/edit'); $this->assertResponse($response); if ($response == 200) { - $this->assertTitle($node->title . ' | Drupal', t('Forum edit node was displayed')); + $this->assertTitle('Edit Forum topic ' . $node->title . ' | Drupal', t('Forum edit node was displayed')); $this->assertText(t('Home ' . $crumb . ' @title', array('@title' => $node->title)), t('Breadcrumbs were displayed')); } diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index cb5a70d8488d..d8c17fcdbcf6 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -11,7 +11,8 @@ * Menu callback; presents the node editing form, or redirects to delete confirmation. */ function node_page_edit($node) { - drupal_set_title($node->title); + $type_name = node_get_types('name', $node); + drupal_set_title(t('<em>Edit @type</em> @title', array('@type' => $type_name, '@title' => $node->title)), PASS_THROUGH); return drupal_get_form($node->type . '_node_form', $node); } -- GitLab