You are here

function revisioning_block_configure in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning.pages.inc \revisioning_block_configure()

Implements hook_block_configure().

File

./revisioning.pages.inc, line 383
Rendering and altering of pages and forms used by Revisioning.

Code

function revisioning_block_configure($delta = 'pending') {
  $form['revisioning_block_num_pending'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum number of pending revisions displayed'),
    '#default_value' => variable_get('revisioning_block_num_pending', 5),
    '#description' => t('Note: the title of this block mentions the total number of revisions pending, which may be greater than the number of revisions displayed.'),
  );
  $form['revisioning_block_order'] = array(
    '#type' => 'radios',
    '#title' => t('Order in which pending revisions are displayed'),
    '#options' => array(
      REVISIONING_REVISIONS_BLOCK_OLDEST_AT_TOP => t('Oldest at top'),
      REVISIONING_REVISIONS_BLOCK_NEWEST_AT_TOP => t('Newest at top'),
    ),
    '#default_value' => variable_get('revisioning_block_order', REVISIONING_REVISIONS_BLOCK_NEWEST_AT_TOP),
    '#description' => t('Note: order is based on revision timestamps.'),
  );
  $form['revisioning_content_summary_page'] = array(
    '#type' => 'textfield',
    '#title' => t('Page to go to when the block title is clicked'),
    '#default_value' => variable_get('revisioning_content_summary_page', ''),
    '#description' => t('When left blank this will default to either %view_content, if the Views module is enabled, or %admin_content, subject to permissions.<br/>For any of this to work the above <strong>Block title</strong> field must be left blank.', array(
      '%view_content' => 'content-summary',
      '%admin_content' => 'admin/content',
    )),
  );
  return $form;
}