The cover field needs a description, like "please create a cover page before creating the book" with a link to create the cover page. Another awesome UI feature would be to recommend installing node_relationships and modalframe - this allows you to create or edit nodereferences from the parent node. That means if a cover didn't exist you could create one in a modalframe from the book edit page.

Comments

SeanBannister’s picture

Subscribe

alan d.’s picture

Status: Active » Needs review

A personal hate of mine is popups, so not a big fan of modal windows. An easier way is to add some help steps.

<?php

/**
 * Implementation of hook_help().
 */
function pageflip_help($path, $arg) {
  switch ($path) {
    // A simple notification for users if there are no pages created.
    case 'node/add/pageflip-book':
      if (!db_result(db_query("SELECT count(*) FROM {node} WHERE type = '%s'", 'pageflip_page'))) {
        drupal_set_message(t('At least one PageFlip Page needs to be created first to act as the cover of the book.'), 'error');
      }
      return '<div>'. t('A page content item must be created first to act as the cover. !link',
        array('!link' => l('Create a new cover', 'node/add/pageflip-page', array('query' => 'destination=node/add/pageflip-book')))) .'</div>';
  }
}

?>

This way, users get a nice red error message if there are no pages in existence, and a link to the create page form that redirects back to the create book form on submit.

alan d.’s picture

adamdicarlo’s picture

An excellent patch. Will close once I've committed it.

adamdicarlo’s picture

Assigned: Unassigned » adamdicarlo
adamdicarlo’s picture

Title: Creating a book is confusing » Creating a book is confusing -- add hook_help().
Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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