summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-05-01 17:30:21 (GMT)
committerAlex Pott2013-05-01 17:31:48 (GMT)
commit3c4790605bdce63ebb94765e7d044051bd3013ce (patch)
treebe2cd815fd36f2f34c16d3a725d3b2779b6794df
parentb5b34b18ce265bd96fe529b39295c5db16b0e540 (diff)
Issue #501472 by izus, kiamlaluno, valthebald, catch: Move book administration to admin/structure.
-rw-r--r--core/modules/book/book.info.yml2
-rw-r--r--core/modules/book/book.module16
-rw-r--r--core/modules/book/book.routing.yml4
-rw-r--r--core/modules/book/lib/Drupal/book/Controller/BookController.php2
-rw-r--r--core/modules/book/lib/Drupal/book/Tests/BookTest.php12
5 files changed, 18 insertions, 18 deletions
diff --git a/core/modules/book/book.info.yml b/core/modules/book/book.info.yml
index 3fed0d3..d89250a 100644
--- a/core/modules/book/book.info.yml
+++ b/core/modules/book/book.info.yml
@@ -6,4 +6,4 @@ core: 8.x
dependencies:
- menu_link
- node
-configure: admin/content/book/settings
+configure: admin/structure/book/settings
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index ee84fb6..fae486b 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -22,7 +22,7 @@ function book_help($path, $arg) {
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Adding and managing book content') . '</dt>';
- $output .= '<dd>' . t('You can assign separate permissions for <em>creating</em>, <em>editing</em>, and <em>deleting</em> book content, as well as <em>adding content to books</em>, and <em>creating new books</em>. Users with the <em>Administer book outlines</em> permission can add <em>any</em> type of content to a book by selecting the appropriate book outline while editing the content. They can also view a list of all books, and edit and rearrange section titles on the <a href="@admin-book">Book administration page</a>.', array('@admin-book' => url('admin/content/book'))) . '</dd>';
+ $output .= '<dd>' . t('You can assign separate permissions for <em>creating</em>, <em>editing</em>, and <em>deleting</em> book content, as well as <em>adding content to books</em>, and <em>creating new books</em>. Users with the <em>Administer book outlines</em> permission can add <em>any</em> type of content to a book by selecting the appropriate book outline while editing the content. They can also view a list of all books, and edit and rearrange section titles on the <a href="@admin-book">Book administration page</a>.', array('@admin-book' => url('admin/structure/book'))) . '</dd>';
$output .= '<dt>' . t('Book navigation') . '</dt>';
$output .= '<dd>' . t("Book pages have a default book-specific navigation block. This navigation block contains links that lead to the previous and next pages in the book, and to the level above the current page in the book's structure. This block can be enabled on the <a href='@admin-block'>Blocks administration page</a>. For book pages to show up in the book navigation, they must be added to a book outline.", array('@admin-block' => url('admin/structure/block'))) . '</dd>';
$output .= '<dt>' . t('Collaboration') . '</dt>';
@@ -31,10 +31,10 @@ function book_help($path, $arg) {
$output .= '<dd>' . t("Users with the <em>View printer-friendly books</em> permission can select the <em>printer-friendly version</em> link visible at the bottom of a book page's content to generate a printer-friendly display of the page and all of its subsections.") . '</dd>';
$output .= '</dl>';
return $output;
- case 'admin/content/book':
+ case 'admin/structure/book':
return '<p>' . t('The book module offers a means to organize a collection of related content pages, collectively known as a book. When viewed, this content automatically displays links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.') . '</p>';
case 'node/%/outline':
- return '<p>' . t('The outline feature allows you to include pages in the <a href="@book">Book hierarchy</a>, as well as move them within the hierarchy or to <a href="@book-admin">reorder an entire book</a>.', array('@book' => url('book'), '@book-admin' => url('admin/content/book'))) . '</p>';
+ return '<p>' . t('The outline feature allows you to include pages in the <a href="@book">Book hierarchy</a>, as well as move them within the hierarchy or to <a href="@book-admin">reorder an entire book</a>.', array('@book' => url('book'), '@book-admin' => url('admin/structure/book'))) . '</p>';
}
}
@@ -131,24 +131,24 @@ function book_node_view_link(EntityInterface $node, $view_mode) {
* Implements hook_menu().
*/
function book_menu() {
- $items['admin/content/book'] = array(
+ $items['admin/structure/book'] = array(
'title' => 'Books',
'description' => "Manage your site's book outlines.",
'route_name' => 'book_admin',
'type' => MENU_LOCAL_TASK,
);
- $items['admin/content/book/list'] = array(
+ $items['admin/structure/book/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
- $items['admin/content/book/settings'] = array(
+ $items['admin/structure/book/settings'] = array(
'title' => 'Settings',
'route_name' => 'book_settings',
'access arguments' => array('administer site configuration'),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
);
- $items['admin/content/book/%node'] = array(
+ $items['admin/structure/book/%node'] = array(
'title' => 'Re-order book pages and change titles',
'page callback' => 'drupal_get_form',
'page arguments' => array('book_admin_edit', 3),
@@ -206,7 +206,7 @@ function book_export_access(EntityInterface $node) {
* Access callback: Determines if the outline tab is accessible.
*
* Path:
- * - admin/content/book/%node
+ * - admin/structure/book/%node
* - node/%node/outline
*
* @param \Drupal\Core\Entity\EntityInterface $node
diff --git a/core/modules/book/book.routing.yml b/core/modules/book/book.routing.yml
index 77b492b..6c8b010 100644
--- a/core/modules/book/book.routing.yml
+++ b/core/modules/book/book.routing.yml
@@ -6,14 +6,14 @@ book_render:
_permission: 'access content'
book_admin:
- pattern: '/admin/content/book'
+ pattern: '/admin/structure/book'
defaults:
_content: '\Drupal\book\Controller\BookController::adminOverview'
requirements:
_permission: 'administer book outlines'
book_settings:
- pattern: '/admin/content/book/settings'
+ pattern: '/admin/structure/book/settings'
defaults:
_form: 'Drupal\book\BookSettingsForm'
requirements:
diff --git a/core/modules/book/lib/Drupal/book/Controller/BookController.php b/core/modules/book/lib/Drupal/book/Controller/BookController.php
index 8c2fceb..d21607d 100644
--- a/core/modules/book/lib/Drupal/book/Controller/BookController.php
+++ b/core/modules/book/lib/Drupal/book/Controller/BookController.php
@@ -57,7 +57,7 @@ class BookController implements ControllerInterface {
$links = array();
$links['edit'] = array(
'title' => t('Edit order and titles'),
- 'href' => 'admin/content/book/' . $book['nid'],
+ 'href' => 'admin/structure/book/' . $book['nid'],
);
$row[] = array(
'data' => array(
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 4601342..fd5d4c0 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -419,13 +419,13 @@ class BookTest extends WebTestBase {
'book_allowed_types[bar]' => 'bar',
);
- $this->drupalPost('admin/content/book/settings', $edit, t('Save configuration'));
+ $this->drupalPost('admin/structure/book/settings', $edit, t('Save configuration'));
$this->assertTrue(book_type_is_allowed('bar'), 'Config book.settings:allowed_types contains the bar node type.');
$this->assertTrue(book_type_is_allowed('page'), 'Config book.settings:allowed_types contains the page node type.');
// Test the order of the book.settings::allowed_types configuration is as
// expected. The point of this test is to prove that after changing a node
- // type going to admin/content/book/settings and pressing save without
+ // type going to admin/structure/book/settings and pressing save without
// changing anything should not alter the book.settings configuration. The
// order will be:
// @code
@@ -435,7 +435,7 @@ class BookTest extends WebTestBase {
// );
// @endcode
$current_config = config('book.settings')->init()->get();
- $this->drupalPost('admin/content/book/settings', array(), t('Save configuration'));
+ $this->drupalPost('admin/structure/book/settings', array(), t('Save configuration'));
$this->assertIdentical($current_config, config('book.settings')->init()->get());
// Change the name, machine name and description.
@@ -456,7 +456,7 @@ class BookTest extends WebTestBase {
// );
// @endcode
$current_config = config('book.settings')->init()->get();
- $this->drupalPost('admin/content/book/settings', array(), t('Save configuration'));
+ $this->drupalPost('admin/structure/book/settings', array(), t('Save configuration'));
$this->assertIdentical($current_config, config('book.settings')->init()->get());
$edit = array(
@@ -474,7 +474,7 @@ class BookTest extends WebTestBase {
// );
// @endcode
$current_config = config('book.settings')->init()->get();
- $this->drupalPost('admin/content/book/settings', array(), t('Save configuration'));
+ $this->drupalPost('admin/structure/book/settings', array(), t('Save configuration'));
$this->assertIdentical($current_config, config('book.settings')->init()->get());
// Ensure that after all the node type changes book.settings:child_type has
@@ -496,7 +496,7 @@ class BookTest extends WebTestBase {
$plid = $node1->book['mlid'];
// Head to admin screen and attempt to re-order.
- $this->drupalGet('admin/content/book/' . $book->nid);
+ $this->drupalGet('admin/structure/book/' . $book->nid);
$edit = array(
"table[book-admin-{$node1->nid}][weight]" => 1,
"table[book-admin-{$node2->nid}][weight]" => 2,