I'm finding the 'add book page' link on my admin screen instead of in the book outline screen. The code has a bug here:

    // add a tab to the outline editor to ease slide addition
    $items[] = array(
      'path'     => 'admin/node/book/add',
      'title'    => t('add book page'),
      'access'   => user_access('create book pages'),
      'type'     => MENU_LOCAL_TASK,
      'callback' => 's5_book_page_add',
      'weight'   => 200
    );

I think the path should be 'admin/content/book/add' but I'm not entirely sure. Wherever it goes, I'm pretty sure it doesn't belong on the admin page.

Comments

greggles’s picture

Title: 'add book page' menu item shows up in the wrong place » 'add book page' menu item in the wrong place and menu title capitalization
Status: Active » Fixed

Yes, that is interesting.

From the README.txt:

Practical usage
---------------

Authoring presentations with the book module might not be
the ideal solution, since it does not allow you to easily
add and remove slides. For this reason, s5_book module
adds an 'add book page' link to the book outline editor
(look into administer >> content >> books). This way,
the outline editor allows you to quickly view, add and
remove slides, as well as reorder them.

So, it is on purpose to put it in the admin page. I think that the menu structure change from 4.7 to 5.x this path was not changed which puts it in the wrong place.

I've committed what I believe is the appropriate fix for this. I also changed it from "add book page" to "Add book page" to better fit with capitalization in Drupal5.

Thanks for pointing this out!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.