diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9c9400edf1476a22829b1e528ba34969fa2e6d16..8054ee777c7090136e24314c29ea8bd9a9886262 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,8 @@ Drupal x.x.x, xxxx-xx-xx (development version) ------------------------ +- completely retooled the administration page + * /admin now contains an administration page which may be themed - added web-based installer which can: * automatically generate the database configuration file * install pre-made 'install profiles' or distributions diff --git a/includes/locale.inc b/includes/locale.inc index c4ab038a2f4813f63c4c053c9733489a44767e57..bf5ed75ed75b806d7eabf9139cc7256a39ee1c8a 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -86,7 +86,7 @@ function theme_locale_admin_manage_screen($form) { foreach ($form['name'] as $key => $element) { // Do not take form control structures. if (is_array($element) && element_child($key)) { - $rows[] = array(check_plain($key), form_render($form['name'][$key]), form_render($form['enabled'][$key]), form_render($form['site_default'][$key]), ($key != 'en' ? form_render($form['translation'][$key]) : t('n/a')), ($key != 'en' ? l(t('delete'), 'admin/locale/language/delete/'. $key) : '')); + $rows[] = array(check_plain($key), form_render($form['name'][$key]), form_render($form['enabled'][$key]), form_render($form['site_default'][$key]), ($key != 'en' ? form_render($form['translation'][$key]) : t('n/a')), ($key != 'en' ? l(t('delete'), 'admin/settings/locale/language/delete/'. $key) : '')); } } $header = array(array('data' => t('Code')), array('data' => t('English name')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Translated')), array('data' => t('Operations'))); @@ -120,7 +120,7 @@ function _locale_admin_manage_screen_submit($form_id, $form_values) { // Changing the locale settings impacts the interface: cache_clear_all(); - return 'admin/locale/language/overview'; + return 'admin/settings/locale/language/overview'; } /** @@ -377,7 +377,7 @@ function _locale_string_edit($lid) { // Handle erroneous lid. if (!isset($orig)){ drupal_set_message(t('String not found.')); - drupal_goto('admin/locale/string/search'); + drupal_goto('admin/settings/locale/string/search'); } // Add original text. Assign negative weight so that it floats to the top. @@ -424,7 +424,7 @@ function _locale_string_edit_submit($form_id, $form_values) { // Rebuild the menu, strings may have changed. menu_rebuild(); - return 'admin/locale/string/search'; + return 'admin/settings/locale/string/search'; } /** @@ -436,7 +436,7 @@ function _locale_string_delete($lid) { locale_refresh_cache(); drupal_set_message(t('The string has been removed.')); - drupal_goto('admin/locale/string/search'); + drupal_goto('admin/settings/locale/string/search'); } /** @@ -1314,7 +1314,7 @@ function _locale_string_seek() { $arr[$locale->lid]['source'] = $locale->source; } foreach ($arr as $lid => $value) { - $rows[] = array(array('data' => check_plain(truncate_utf8($value['source'], 150, FALSE, TRUE)) .'<br /><small>'. $value['location'] .'</small>'), array('data' => _locale_string_language_list($value['locales']), 'align' => 'center'), array('data' => l(t('edit'), "admin/locale/string/edit/$lid"), 'class' => 'nowrap'), array('data' => l(t('delete'), "admin/locale/string/delete/$lid"), 'class' => 'nowrap')); + $rows[] = array(array('data' => check_plain(truncate_utf8($value['source'], 150, FALSE, TRUE)) .'<br /><small>'. $value['location'] .'</small>'), array('data' => _locale_string_language_list($value['locales']), 'align' => 'center'), array('data' => l(t('edit'), "admin/settings/locale/string/edit/$lid"), 'class' => 'nowrap'), array('data' => l(t('delete'), "admin/settings/locale/string/delete/$lid"), 'class' => 'nowrap')); } $request = array(); diff --git a/includes/menu.inc b/includes/menu.inc index 190c1311207613ffb77db97da4f8d4fd201435e0..f21eb94d1d9b446b683c43d7377c900137515c8c 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -866,11 +866,11 @@ function menu_primary_links($start_level = 1, $pid = 0) { } } - // Special case - provide link to admin/menu if primary links is empty. + // Special case - provide link to admin/build/menu if primary links is empty. if (empty($links) && $start_level == 1 && $pid == variable_get('menu_primary_menu', 0)) { $links['1-1'] = array( 'title' => t('edit primary links'), - 'href' => 'admin/menu' + 'href' => 'admin/build/menu' ); } diff --git a/misc/drupal.css b/misc/drupal.css index f0515f8701c2ed1e77409f28bc0bd2439bf7fb79..3d08f492877df3c7d542b86c879175a4589c7cdd 100644 --- a/misc/drupal.css +++ b/misc/drupal.css @@ -674,3 +674,55 @@ html.js fieldset.collapsed legend a { display: block; padding: 1.5em 0 .5em; } + +/* +** Formatting for administration page -- this should probably be its own file +*/ +div.admin-panel { + margin: 0px 0px 0px 0px; + padding: 5px 5px 15px 5px; +} + +div.admin-panel .description { + margin: 0px 0px 3px; + padding: 2px 0 3px 0; + font-weight: normal; + text-align: left; + color: #999; +} + +div.admin-panel .body { + padding: 0 4px 2px 8px; + background-color: #f4f4f4; + line-height: 1.2em; +} + +div.admin-panel .head { + background-color: #6699CC; + color: #FFFFFF; + font-weight: bold; + font-size: 14px; + margin: 0px 0px 0px 0px; + padding: 4px 4px 4px 8px; +} + +div.admin { + padding-top: 15px; +} + +div.admin .left { + float: left; + width: 47%; + margin-left: 1em; +} +div.admin .right { + float: right; + width: 47%; + margin-right: 1em; +} + +div.admin .expert-link { + text-align: right; + margin-right: 1em; + padding-right: 4px; +} diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index ccc841bc0f4942a57550b353638b351e6c5746dd..4551e04160d9e367a462dc56f6b0a4f66851318c 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -13,7 +13,7 @@ function aggregator_help($section) { switch ($section) { case 'admin/help#aggregator': $output = '<p>'. t('The news aggregator is a powerful on-site RSS syndicator/news reader that can gather fresh content from news sites and weblogs around the web.') .'</p>'; - $output .= '<p>'. t('Users can view the latest news chronologically in the <a href="%aggregator">main news aggregator display</a> or by <a href="%aggregator-sources">source</a>. Administrators can add, edit and delete feeds and choose how often to check for newly updated news for each individual feed. Administrators can also tag individual feeds with categories, offering selective grouping of some feeds into separate displays. Listings of the latest news for individual sources or categorized sources can be enabled as blocks for display in the sidebar through the <a href="%admin-block">block administration page</a>. The news aggregator requires cron to check for the latest news from the sites to which you have subscribed. Drupal also provides a <a href="%aggregator-opml">machine-readable OPML file</a> of all of your subscribed feeds.', array('%aggregator' => url('aggregator'), '%aggregator-sources' => url('aggregator/sources'), '%admin-block' => url('admin/block'), '%aggregator-opml' => url('aggregator/opml'))) .'</p>'; + $output .= '<p>'. t('Users can view the latest news chronologically in the <a href="%aggregator">main news aggregator display</a> or by <a href="%aggregator-sources">source</a>. Administrators can add, edit and delete feeds and choose how often to check for newly updated news for each individual feed. Administrators can also tag individual feeds with categories, offering selective grouping of some feeds into separate displays. Listings of the latest news for individual sources or categorized sources can be enabled as blocks for display in the sidebar through the <a href="%admin-block">block administration page</a>. The news aggregator requires cron to check for the latest news from the sites to which you have subscribed. Drupal also provides a <a href="%aggregator-opml">machine-readable OPML file</a> of all of your subscribed feeds.', array('%aggregator' => url('aggregator'), '%aggregator-sources' => url('aggregator/sources'), '%admin-block' => url('admin/build/block'), '%aggregator-opml' => url('aggregator/opml'))) .'</p>'; $output .= t('<p>You can</p> <ul> <li>administer your list of news feeds <a href="%admin-aggregator">administer >> aggregator</a>.</li> @@ -24,16 +24,16 @@ function aggregator_help($section) { <li>set permissions to access new feeds for user roles such as anonymous users at <a href="%admin-access">administer >> access control</a>.</li> <li>view the <a href="%aggregator">aggregator page</a>.</li> </ul> -', array('%admin-aggregator' => url('admin/aggregator'), '%admin-aggregator-add-feed' => url('admin/aggregator/add/feed'), '%admin-aggregator-add-category' => url('admin/aggregator/add/category'), '%admin-settings-aggregator' => url('admin/settings/aggregator'), '%admin-access' => url('admin/access'), '%aggregator' => url('aggregator'))); +', array('%admin-aggregator' => url('admin/content/aggregator'), '%admin-aggregator-add-feed' => url('admin/content/aggregator/add/feed'), '%admin-aggregator-add-category' => url('admin/content/aggregator/add/category'), '%admin-settings-aggregator' => url('admin/settings/aggregator'), '%admin-access' => url('admin/access'), '%aggregator' => url('aggregator'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%aggregator">Aggregator page</a>.', array('%aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Aggregates syndicated content (RSS, RDF, and Atom feeds).'); - case 'admin/aggregator': - return t('<p>Thousands of sites (particularly news sites and weblogs) publish their latest headlines and/or stories in a machine-readable format so that other sites can easily link to them. This content is usually in the form of an <a href="http://blogs.law.harvard.edu/tech/rss">RSS</a> feed (which is an XML-based syndication standard). To display the feed or category in a block you must decide how many items to show by editing the feed or block and turning on the <a href="%block">feed\'s block</a>.</p>', array('%block' => url('admin/block'))); - case 'admin/aggregator/add/feed': + case 'admin/content/aggregator': + return t('<p>Thousands of sites (particularly news sites and weblogs) publish their latest headlines and/or stories in a machine-readable format so that other sites can easily link to them. This content is usually in the form of an <a href="http://blogs.law.harvard.edu/tech/rss">RSS</a> feed (which is an XML-based syndication standard). To display the feed or category in a block you must decide how many items to show by editing the feed or block and turning on the <a href="%block">feed\'s block</a>.</p>', array('%block' => url('admin/build/block'))); + case 'admin/content/aggregator/add/feed': return t('<p>Add a site that has an RSS/RDF/Atom feed. The URL is the full path to the feed file. For the feed to update automatically you must run "cron.php" on a regular basis. If you already have a feed with the URL you are planning to use, the system will not accept another feed with the same URL.</p>'); - case 'admin/aggregator/add/category': + case 'admin/content/aggregator/add/category': return t('<p>Categories provide a way to group items from different news feeds together. Each news category has its own feed page and block. For example, you could tag various sport-related feeds as belonging to a category called <em>Sports</em>. News items can be added to a category automatically by setting a feed to automatically place its item into that category, or by using the categorize items link in any listing of news items.</p>'); } } @@ -47,38 +47,40 @@ function aggregator_menu($may_cache) { $view = user_access('access news feeds'); if ($may_cache) { - $items[] = array('path' => 'admin/aggregator', - 'title' => t('aggregator'), + $items[] = array('path' => 'admin/content/aggregator', + 'title' => t('RSS aggregator'), + 'description' => t('Configure which content your site aggregates from other sites, how often it polls them, and how they\'re categorized.'), 'callback' => 'aggregator_admin_overview', 'access' => $edit); - $items[] = array('path' => 'admin/aggregator/add/feed', + $items[] = array('path' => 'admin/content/aggregator/add/feed', 'title' => t('add feed'), 'callback' => 'aggregator_form_feed', 'access' => $edit, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/aggregator/add/category', + $items[] = array('path' => 'admin/content/aggregator/add/category', 'title' => t('add category'), 'callback' => 'aggregator_form_category', 'access' => $edit, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/aggregator/remove', + $items[] = array('path' => 'admin/content/aggregator/remove', 'title' => t('remove items'), 'callback' => 'aggregator_admin_remove_feed', 'access' => $edit, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/aggregator/update', + $items[] = array('path' => 'admin/content/aggregator/update', 'title' => t('update items'), 'callback' => 'aggregator_admin_refresh_feed', 'access' => $edit, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/aggregator/list', + $items[] = array('path' => 'admin/content/aggregator/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/settings/aggregator', - 'title' => t('RSS aggregator'), + $items[] = array('path' => 'admin/content/aggregator/settings', + 'title' => t('settings'), 'callback' => 'aggregator_admin_settings', - 'type' => MENU_NORMAL_ITEM, + 'type' => MENU_LOCAL_TASK, + 'weight' => 10, 'access' => $edit); $items[] = array('path' => 'aggregator', @@ -168,7 +170,7 @@ function aggregator_menu($may_cache) { if (arg(3) == 'feed') { $feed = aggregator_get_feed(arg(4)); if ($feed) { - $items[] = array('path' => 'admin/aggregator/edit/feed/'. $feed['fid'], + $items[] = array('path' => 'admin/content/aggregator/edit/feed/'. $feed['fid'], 'title' => t('edit feed'), 'callback' => 'aggregator_form_feed', 'callback arguments' => array($feed), @@ -179,7 +181,7 @@ function aggregator_menu($may_cache) { else { $category = aggregator_get_category(arg(4)); if ($category) { - $items[] = array('path' => 'admin/aggregator/edit/category/'. $category['cid'], + $items[] = array('path' => 'admin/content/aggregator/edit/category/'. $category['cid'], 'title' => t('edit category'), 'callback' => 'aggregator_form_category', 'callback arguments' => array($category), @@ -367,7 +369,7 @@ function aggregator_form_category_submit($form_id, $form_values) { if (isset($form_values['title'])) { drupal_set_message(t('The category %category has been updated.', array('%category' => theme('placeholder', $form_values['title'])))); if (arg(0) == 'admin') { - return 'admin/aggregator/'; + return 'admin/content/aggregator/'; } else { return 'aggregator/categories/'. $form_values['cid']; @@ -377,7 +379,7 @@ function aggregator_form_category_submit($form_id, $form_values) { watchdog('aggregator', t('Category %category deleted.', array('%category' => theme('placeholder', $title)))); drupal_set_message(t('The category %category has been deleted.', array('%category' => theme('placeholder', $title)))); if (arg(0) == 'admin') { - return 'admin/aggregator/'; + return 'admin/content/aggregator/'; } else { return 'aggregator/categories/'; @@ -385,7 +387,7 @@ function aggregator_form_category_submit($form_id, $form_values) { } } else { - watchdog('aggregator', t('Category %category added.', array('%category' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/aggregator')); + watchdog('aggregator', t('Category %category added.', array('%category' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/content/aggregator')); drupal_set_message(t('The category %category has been added.', array('%category' => theme('placeholder', $form_values['title'])))); } } @@ -500,7 +502,7 @@ function aggregator_form_feed_submit($form_id, $form_values) { if (isset($form_values['title'])) { drupal_set_message(t('The feed %feed has been updated.', array('%feed' => theme('placeholder', $form_values['title'])))); if (arg(0) == 'admin') { - return 'admin/aggregator/'; + return 'admin/content/aggregator/'; } else { return 'aggregator/sources/'. $form_values['fid']; @@ -510,7 +512,7 @@ function aggregator_form_feed_submit($form_id, $form_values) { watchdog('aggregator', t('Feed %feed deleted.', array('%feed' => theme('placeholder', $title)))); drupal_set_message(t('The feed %feed has been deleted.', array('%feed' => theme('placeholder', $title)))); if (arg(0) == 'admin') { - return 'admin/aggregator/'; + return 'admin/content/aggregator/'; } else { return 'aggregator/sources/'; @@ -518,7 +520,7 @@ function aggregator_form_feed_submit($form_id, $form_values) { } } else { - watchdog('aggregator', t('Feed %feed added.', array('%feed' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/aggregator')); + watchdog('aggregator', t('Feed %feed added.', array('%feed' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/content/aggregator')); drupal_set_message(t('The feed %feed has been added.', array('%feed' => theme('placeholder', $form_values['title'])))); } } @@ -974,7 +976,7 @@ function aggregator_view() { $header = array(t('Title'), t('Items'), t('Last update'), t('Next update'), array('data' => t('Operations'), 'colspan' => '3')); $rows = array(); while ($feed = db_fetch_object($result)) { - $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit'), "admin/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/aggregator/remove/$feed->fid"), l(t('update items'), "admin/aggregator/update/$feed->fid")); + $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit'), "admin/content/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/content/aggregator/remove/$feed->fid"), l(t('update items'), "admin/content/aggregator/update/$feed->fid")); } $output .= theme('table', $header, $rows); @@ -985,7 +987,7 @@ function aggregator_view() { $header = array(t('Title'), t('Items'), t('Operations')); $rows = array(); while ($category = db_fetch_object($result)) { - $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit'), "admin/aggregator/edit/category/$category->cid")); + $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit'), "admin/content/aggregator/edit/category/$category->cid")); } $output .= theme('table', $header, $rows); @@ -997,7 +999,7 @@ function aggregator_view() { */ function aggregator_admin_remove_feed($feed) { aggregator_remove(aggregator_get_feed($feed)); - drupal_goto('admin/aggregator'); + drupal_goto('admin/content/aggregator'); } /** @@ -1005,7 +1007,7 @@ function aggregator_admin_remove_feed($feed) { */ function aggregator_admin_refresh_feed($feed) { aggregator_refresh(aggregator_get_feed($feed)); - drupal_goto('admin/aggregator'); + drupal_goto('admin/content/aggregator'); } /** @@ -1290,7 +1292,7 @@ function theme_aggregator_feed($feed) { } if (user_access('administer news feeds')) { - $updated = l($updated, 'admin/aggregator'); + $updated = l($updated, 'admin/content/aggregator'); } $output .= '<div class="feed-updated"><em>'. t('Updated:') . "</em> $updated</div>"; diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 30f8267aa427763dd33a293aa2fe2b81a21f50ae..387330c6e495dec448ef3ea6bd908514fb42d50a 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -19,10 +19,10 @@ function archive_help($section) { <li>view your <a href="%archive">archive by day</a>.</li> <li>enable the <em>browse archives</em> block at <a href="%admin-block">administer >> block</a>.</li> </ul> -', array('%archive' => url('archive'), '%admin-block' => url('admin/block'))); +', array('%archive' => url('archive'), '%admin-block' => url('admin/build/block'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%archive">Archive page</a>.', array('%archive' => 'http://drupal.org/handbook/modules/archive/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Displays a calendar for navigating older content.'); } } diff --git a/modules/block/block.module b/modules/block/block.module index 8df23b206d3f422a4612e7f2fbfb30673bcac1b4..2cedded9e6530f01a1fbbbbf12b053afb9ba38b1 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -27,7 +27,7 @@ function block_help($section) { </ul> '); $output .= '<h3>'. t('Module blocks') .'</h3>'; - $output .= '<p>'. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the <a href="%admin-block">blocks administration page</a>.</p>', array('%admin-block' => url('admin/block'))) .'</p>'; + $output .= '<p>'. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the <a href="%admin-block">blocks administration page</a>.</p>', array('%admin-block' => url('admin/build/block'))) .'</p>'; $output .= '<h3>'. t('Administrator defined blocks') .'</h3>'; $output .= '<p>'. t('Administrators can also define custom blocks. These blocks consist of a title, a description, and a body which can be as long as you wish. Block content can be in any of the input formats supported for other content.') .'</p>'; $output .= t('<p>You can</p> @@ -35,20 +35,20 @@ function block_help($section) { <li>enable, throttle and configure blocks at <a href="%admin-block">administer >> blocks</a>.</li> <li>add an administrator-defined block at <a href="%admin-block-add">administer >> blocks >> add block</a>.</li> </ul> -', array('%admin-block' => url('admin/block'), '%admin-block-add' => url('admin/block/add'))); +', array('%admin-block' => url('admin/build/block'), '%admin-block-add' => url('admin/build/block/add'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%block">Block page</a>.', array('%block' => 'http://drupal.org/handbook/modules/block/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Controls the boxes that are displayed around the main content.'); - case 'admin/block': + case 'admin/build/block': return t(" <p>Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.</p> <p>Only enabled blocks are shown. You can position blocks by specifying which area of the page they should appear in (e.g., a sidebar). Highlighted labels on this page show the regions into which blocks can be rendered. You can specify where within a region a block will appear by adjusting its weight.</p> <p>If you want certain blocks to disable themselves temporarily during high server loads, check the 'Throttle' box. You can configure the auto-throttle on the <a href=\"%throttle\">throttle configuration page</a> after having enabled the throttle module.</p> <p>You can configure the behaviour of each block (for example, specifying on which pages and for what users it will appear) by clicking the 'configure' link for each block.</p> ", array('%throttle' => url('admin/settings/throttle'))); - case 'admin/block/add': - return t('<p>Here you can create a new block. Once you have created this block you must make it active and give it a place on the page using <a href="%overview">blocks</a>. The title is used when displaying the block. The description is used in the "block" column on the <a href="%overview">blocks</a> page.</p>', array('%overview' => url('admin/block'))); + case 'admin/build/block/add': + return t('<p>Here you can create a new block. Once you have created this block you must make it active and give it a place on the page using <a href="%overview">blocks</a>. The title is used when displaying the block. The description is used in the "block" column on the <a href="%overview">blocks</a> page.</p>', array('%overview' => url('admin/build/block'))); } } @@ -66,31 +66,34 @@ function block_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/block', 'title' => t('blocks'), + $items[] = array( + 'path' => 'admin/build/block', + 'title' => t('blocks'), 'access' => user_access('administer blocks'), + 'description' => t('Configure what block content appears in your site\'s sidebars and other regions.'), 'callback' => 'block_admin_display'); - $items[] = array('path' => 'admin/block/list', 'title' => t('list'), + $items[] = array('path' => 'admin/build/block/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/block/configure', 'title' => t('configure block'), + $items[] = array('path' => 'admin/build/block/configure', 'title' => t('configure block'), 'access' => user_access('administer blocks'), 'callback' => 'block_admin_configure', 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/block/delete', 'title' => t('delete block'), + $items[] = array('path' => 'admin/build/block/delete', 'title' => t('delete block'), 'access' => user_access('administer blocks'), 'callback' => 'block_box_delete', 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/block/add', 'title' => t('add block'), + $items[] = array('path' => 'admin/build/block/add', 'title' => t('add block'), 'access' => user_access('administer blocks'), 'callback' => 'block_box_add', 'type' => MENU_LOCAL_TASK); foreach (list_themes() as $key => $theme) { if ($theme->status) { if ($key == variable_get('theme_default', 'bluemarine')) { - $items[] = array('path' => 'admin/block/list/' . $key, 'title' => t('%key settings', array('%key' => $key)), + $items[] = array('path' => 'admin/build/block/list/' . $key, 'title' => t('%key settings', array('%key' => $key)), 'access' => user_access('administer blocks'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); } else { - $items[] = array('path' => 'admin/block/list/' . $key, 'title' => t('%key settings', array('%key' => $key)), + $items[] = array('path' => 'admin/build/block/list/' . $key, 'title' => t('%key settings', array('%key' => $key)), 'access' => user_access('administer blocks'), 'type' => MENU_LOCAL_TASK); } } @@ -193,12 +196,12 @@ function _block_rehash() { /** * Generate main block administration form. */ -function block_admin_display() { +function block_admin_display($theme = NULL) { global $theme_key, $custom_theme; // If non-default theme configuration has been selected, set the custom theme. - if (arg(3)) { - $custom_theme = arg(3); + if ($theme) { + $custom_theme = $theme; } else { $custom_theme = variable_get('theme_default', 'bluemarine'); @@ -213,7 +216,7 @@ function block_admin_display() { $block_regions = system_region_list($theme_key); // Build form tree - $form['#action'] = arg(3) ? url('admin/block/list/' . $theme_key) : url('admin/block'); + $form['#action'] = arg(3) ? url('admin/build/block/list/' . $theme_key) : url('admin/build/block'); $form['#tree'] = TRUE; foreach ($blocks as $i => $block) { $form[$i]['module'] = array('#type' => 'value', '#value' => $block['module']); @@ -230,9 +233,9 @@ function block_admin_display() { if ($throttle) { $form[$i]['throttle'] = array('#type' => 'checkbox', '#default_value' => $block['throttle']); } - $form[$i]['configure'] = array('#value' => l(t('configure'), 'admin/block/configure/'. $block['module'] .'/'. $block['delta'])); + $form[$i]['configure'] = array('#value' => l(t('configure'), 'admin/build/block/configure/'. $block['module'] .'/'. $block['delta'])); if ($block['module'] == 'block') { - $form[$i]['delete'] = array('#value' => l(t('delete'), 'admin/block/delete/'. $block['delta'])); + $form[$i]['delete'] = array('#value' => l(t('delete'), 'admin/build/block/delete/'. $block['delta'])); } } $form['submit'] = array('#type' => 'submit', '#value' => t('Save blocks')); @@ -241,7 +244,7 @@ function block_admin_display() { } /** - * Helper function for sorting blocks on admin/block. + * Helper function for sorting blocks on admin/build/block. * * Active blocks are sorted by region, then by weight. * Disabled blocks are sorted by name. @@ -481,7 +484,7 @@ function block_admin_configure_submit($form_id, $form_values) { module_invoke($form_values['module'], 'block', 'save', $form_values['delta'], $form_values); drupal_set_message(t('The block configuration has been saved.')); cache_clear_all(); - return 'admin/block'; + return 'admin/build/block'; } } @@ -505,7 +508,7 @@ function block_box_add_submit($form_id, $form_values) { if (!form_get_errors()) { if (block_box_save($form_values)) { drupal_set_message(t('The block has been created.')); - return 'admin/block'; + return 'admin/build/block'; } } } @@ -518,7 +521,7 @@ function block_box_delete($bid = 0) { $form['info'] = array('#type' => 'hidden', '#value' => $box['info'] ? $box['info'] : $box['title']); $form['bid'] = array('#type' => 'hidden', '#value' => $bid); - return confirm_form('block_box_delete_confirm', $form, t('Are you sure you want to delete the block %name?', array('%name' => theme('placeholder', $box['info']))), 'admin/block', '', t('Delete'), t('Cancel')); + return confirm_form('block_box_delete_confirm', $form, t('Are you sure you want to delete the block %name?', array('%name' => theme('placeholder', $box['info']))), 'admin/build/block', '', t('Delete'), t('Cancel')); } /** @@ -528,7 +531,7 @@ function block_box_delete_confirm_submit($form_id, $form_values) { db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']); drupal_set_message(t('The block %name has been removed.', array('%name' => theme('placeholder', $form_values['info'])))); cache_clear_all(); - return 'admin/block'; + return 'admin/build/block'; }; function block_box_form($edit = array()) { @@ -537,7 +540,7 @@ function block_box_form($edit = array()) { '#title' => t('Block description'), '#default_value' => $edit['info'], '#maxlength' => 64, - '#description' => t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block'))), + '#description' => t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/build/block'))), '#required' => TRUE, '#weight' => -19, ); diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 05ac2b2cf7e261421e3a54edc9ab155a55b733f9..2c5f37eae6fb057447d67206d0a3853c7bc13ac8 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -67,10 +67,10 @@ function blog_help($section) { <li>administer blog api at <a href="%admin-settings-blogapi">administer >> settings >> blogapi</a>.</li> <li>enable the "recent blog posts" block at <a href="%admin-block">administer >> blocks</a> to show the 10 most recent blog posts.</li> </ul> -', array('%user' => url('user'), '%node-add-blog' => url('node/add/blog'), '%admin-node-configure-types-blog' => url('admin/settings/content-types/blog'), '%admin-settings-blogapi' => url('admin/settings/blogapi'), '%admin-block' => url('admin/block'))); +', array('%user' => url('user'), '%node-add-blog' => url('node/add/blog'), '%admin-node-configure-types-blog' => url('admin/content/types/blog'), '%admin-settings-blogapi' => url('admin/settings/blogapi'), '%admin-block' => url('admin/build/block'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%blog">Blog page</a>.', array('%blog' => 'http://drupal.org/handbook/modules/blog/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables keeping an easily and regularly updated web page or a blog.'); case 'node/add#blog': return t("A blog is a regularly updated journal or diary made up of individual posts shown in reversed chronological order. Each member of the site may create and maintain a blog."); diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index e8196d1a0906468fee6a9c62ee78c52e6a5a698d..f002ced1d55fb2f23a89c8f83c9f621993159648 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -23,7 +23,7 @@ function blogapi_help($section) { ', array('%file-xmlrpc' => 'xmlrpc.php', '%admin-settings-blogapi' => url('admin/settings/blogapi'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%blogapi">BlogApi page</a>.', array('%blogapi' => 'http://drupal.org/handbook/modules/blogapi/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to post content using applications that support XML-RPC blog APIs.'); } } @@ -587,6 +587,7 @@ function blogapi_menu($may_cache) { $items[] = array( 'path' => 'admin/settings/blogapi', 'title' => t('blog APIs'), + 'description' => t('Configure which content types and engines external blog clients can use.'), 'callback' => 'blogapi_admin_settings', 'access' => user_access('administer site configuration'), 'type' => MENU_NORMAL_ITEM diff --git a/modules/book/book.module b/modules/book/book.module index c83209be2f2c3b671459b3e2045145954c4a4f65..584c78b5b7dcbf6fcd5676f2b5531a14883711ba 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -88,18 +88,17 @@ function book_menu($may_cache) { 'title' => t('book page'), 'access' => user_access('create book pages')); $items[] = array( - 'path' => 'admin/node/book', + 'path' => 'admin/content/book', 'title' => t('books'), + 'description' => t('Manage site\'s books and orphaned book pages.'), 'callback' => 'book_admin', - 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_TASK, - 'weight' => -1); + 'access' => user_access('administer nodes')); $items[] = array( - 'path' => 'admin/node/book/list', + 'path' => 'admin/content/book/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK); $items[] = array( - 'path' => 'admin/node/book/orphan', + 'path' => 'admin/content/book/orphan', 'title' => t('orphan pages'), 'callback' => 'book_admin_orphan', 'type' => MENU_LOCAL_TASK, @@ -873,7 +872,7 @@ function theme_book_admin_table($form) { form_render($form[$key]['weight']), l(t('view'), 'node/'. $nid), l(t('edit'), 'node/'. $nid .'/edit'), - l(t('delete'), 'node/'. $nid .'/delete', NULL, 'destination=admin/node/book'. (arg(3) == 'orphan' ? '/orphan' : '') . ($pid != $nid ? '/'.$pid : '')) + l(t('delete'), 'node/'. $nid .'/delete', NULL, 'destination=admin/content/book'. (arg(3) == 'orphan' ? '/orphan' : '') . ($pid != $nid ? '/'.$pid : '')) ); } @@ -980,7 +979,7 @@ function book_admin($nid = 0) { function book_admin_overview() { $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE b.parent = 0 ORDER BY b.weight, n.title')); while ($book = db_fetch_object($result)) { - $rows[] = array(l($book->title, "node/$book->nid"), l(t('outline'), "admin/node/book/$book->nid")); + $rows[] = array(l($book->title, "node/$book->nid"), l(t('outline'), "admin/content/book/$book->nid")); } $headers = array(t('Book'), t('Operations')); @@ -994,7 +993,7 @@ function book_help($section) { switch ($section) { case 'admin/help#book': $output = '<p>'. t('The <em>book</em> content type is suited for creating structured, multi-page hypertexts such as site resource guides, manuals, and Frequently Asked Questions (FAQs). It permits a document to have chapters, sections, subsections, etc. Authors with suitable permissions can add pages to a collaborative book, placing them into the existing document by adding them to a table of contents menu. ') .'</p>'; - $output .= '<p>'. t('Books have additional <em>previous</em>, <em>up</em>, and <em>next</em> navigation elements at the bottom of each page for moving through the text. Additional navigation may be provided by enabling the <em>book navigation block</em> on the <a href="%admin-block">block administration page</a>.', array('%admin-block' => url('admin/block'))) .'</p>'; + $output .= '<p>'. t('Books have additional <em>previous</em>, <em>up</em>, and <em>next</em> navigation elements at the bottom of each page for moving through the text. Additional navigation may be provided by enabling the <em>book navigation block</em> on the <a href="%admin-block">block administration page</a>.', array('%admin-block' => url('admin/build/block'))) .'</p>'; $output .= '<p>'. t('Users can select the <em>printer-friendly version</em> link visible at the bottom of a book page to generate a printer-friendly display of the page and all of its subsections. ') .'</p>'; $output .= '<p>'. t('Administrators can view a book outline, from which is it possible to change the titles of sections, and their <i>weight</i> (thus reordering sections). From this outline, it is also possible to edit and/or delete book pages. Many content types besides pages (for example, blog entries, stories, and polls) can be added to a collaborative book by choosing the <em>outline</em> tab when viewing the post.') .'</p>'; $output .= t('<p>You can</p> @@ -1005,14 +1004,14 @@ function book_help($section) { <li>enable the book navigation block: <a href="%admin-block">administer >> blocks</a>.</li> <li>control who can create, edit, and outline posts in books by setting access permissions: <a href="%admin-access">administer >> access control</a>.</li> </ul> -', array('%node-add-book' => url('node/add/book'), '%admin-node-book' => url('admin/node/book'), '%admin-settings-content-types-book-page' => url('admin/settings/content-types/book'), '%admin-block' => url('admin/block'), '%admin-access' => url('admin/access'))); +', array('%node-add-book' => url('node/add/book'), '%admin-node-book' => url('admin/content/book'), '%admin-settings-content-types-book-page' => url('admin/content/types/book'), '%admin-block' => url('admin/build/block'), '%admin-access' => url('admin/access'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%book">Book page</a>.', array('%book' => 'http://drupal.org/handbook/modules/book/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to collaboratively author a book.'); - case 'admin/node/book': + case 'admin/content/book': return t('<p>The book module offers a means to organize content, authored by many users, in an online manual, outline or FAQ.</p>'); - case 'admin/node/book/orphan': + case 'admin/content/book/orphan': return t('<p>Pages in a book are like a tree. As pages are edited, reorganized and removed, child pages might be left with no link to the rest of the book. Such pages are referred to as "orphan pages". On this page, administrators can review their books for orphans and reattach those pages as desired.</p>'); case 'node/add#book': return t("A book is a collaborative writing effort: users can collaborate writing the pages of the book, positioning the pages in the right order, and reviewing or modifying pages previously written. So when you have some information to share or when you read a page of the book and you didn't like it, or if you think a certain page could have been written better, you can do something about it."); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 9002ceb9b8e47c609eac4ab9427a4590ea4a0b29..d8382770b853e6ac39bf5d60702a0f966c4edcbf 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -77,17 +77,17 @@ function comment_help($section) { <li>control access for various comment module functions through access permissions <a href="%admin-access">administer >> access control</a>.</li> <li>administer comments <a href="%admin-comment-configure"> administer >> comments >> configure</a>.</li> </ul> -', array('%admin-access' => url('admin/access'), '%admin-settings-comment' => url('admin/settings/comment'))); +', array('%admin-access' => url('admin/access'), '%admin-settings-comment' => url('admin/content/comment/settings'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%comment">Comment page</a>.', array('%comment' => 'http://drupal.org/handbook/modules/comment/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to comment on and discuss published content.'); - case 'admin/comment': - case 'admin/comment/new': + case 'admin/content/comment': + case 'admin/content/comment/new': return t("<p>Below is a list of the latest comments posted to your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit\" to modify the text, and \"delete\" to remove their submission.</p>"); - case 'admin/comment/approval': + case 'admin/content/comment/approval': return t("<p>Below is a list of the comments posted to your site that need approval. To approve a comment, click on \"edit\" and then change its \"moderation status\" to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, \"edit\" to modify the text, and \"delete\" to remove their submission.</p>"); - case 'admin/settings/comment': + case 'admin/content/comment/settings': return t("<p>Comments can be attached to any node, and their settings are below. The display comes in two types: a \"flat list\" where everything is flush to the left side, and comments come in chronological order, and a \"threaded list\" where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: \"expanded\", where you see both the title and the contents, and \"collapsed\" where you only see the title. Preview comment forces a user to look at their comment by clicking on a \"Preview\" button before they can actually add the comment.</p>"); } } @@ -100,27 +100,33 @@ function comment_menu($may_cache) { if ($may_cache) { $access = user_access('administer comments'); - $items[] = array('path' => 'admin/comment', 'title' => t('comments'), - 'callback' => 'comment_admin_overview', 'access' => $access); + $items[] = array( + 'path' => 'admin/content/comment', + 'title' => t('comments'), + 'description' => t('List and edit site comments and the comment moderation queue.'), + 'callback' => 'comment_admin_overview', + 'access' => $access + ); // Tabs: - $items[] = array('path' => 'admin/comment/list', 'title' => t('list'), + $items[] = array('path' => 'admin/content/comment/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); // Subtabs: - $items[] = array('path' => 'admin/comment/list/new', 'title' => t('published comments'), + $items[] = array('path' => 'admin/content/comment/list/new', 'title' => t('published comments'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/comment/list/approval', 'title' => t('approval queue'), + $items[] = array('path' => 'admin/content/comment/list/approval', 'title' => t('approval queue'), 'callback' => 'comment_admin_overview', 'access' => $access, 'callback arguments' => array('approval'), 'type' => MENU_LOCAL_TASK); $items[] = array( - 'path' => 'admin/settings/comments', - 'title' => t('comments'), + 'path' => 'admin/content/comment/settings', + 'title' => t('settings'), 'callback' => 'comment_admin_settings', 'access' => $access, - 'type' => MENU_NORMAL_ITEM); + 'weight' => 10, + 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'comment/delete', 'title' => t('delete comment'), 'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK); @@ -1041,7 +1047,7 @@ function comment_admin_overview_validate($form_id, $edit) { $edit['comments'] = array_diff($edit['comments'], array(0)); if (count($edit['comments']) == 0) { form_set_error('', t('Please select one or more comments to perform the update on.')); - drupal_goto('admin/comment'); + drupal_goto('admin/content/comment'); } } @@ -1068,7 +1074,7 @@ function comment_admin_overview_submit($form_id, $edit) { } cache_clear_all(); drupal_set_message(t('The update has been performed.')); - drupal_goto('admin/comment'); + drupal_goto('admin/content/comment'); } } @@ -1121,12 +1127,12 @@ function comment_multiple_delete_confirm() { if (!$comment_counter) { drupal_set_message(t('There do not appear to be any comments to delete or your selected comment was deleted by another administrator.')); - drupal_goto('admin/comment'); + drupal_goto('admin/content/comment'); } else { return confirm_form('comment_multiple_delete_confirm', $form, t('Are you sure you want to delete these comments and all their children?'), - 'admin/comment', t('This action cannot be undone.'), + 'admin/content/comment', t('This action cannot be undone.'), t('Delete comments'), t('Cancel')); } } @@ -1144,7 +1150,7 @@ function comment_multiple_delete_confirm_submit($form_id, $edit) { } drupal_set_message(t('The comments have been deleted.')); } - drupal_goto('admin/comment'); + drupal_goto('admin/content/comment'); } /** diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 2302d46d53c9b72a46ffb6d1d232a6e90a6086f7..a0662a86b26d43433ad95f30003207fc924f749f 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -15,25 +15,25 @@ function contact_help($section) { $output = '<p>'. t('The contact module enables the use of both personal and site-wide contact forms, thereby facilitating easy communication within the community. While personal contact forms allow users to contact each other by e-mail, site-wide forms allow community members to contact the site administration from a central location. Users can specify a subject and message in the contact form, and also request that a copy of the e-mail be sent to their own address.') .'</p>'; $output .= '<p>'. t("Users can activate/deactivate their personal contact forms in their account settings. Upon activation, a contact tab will appear in their user profiles. Privileged users such as site administrators are able to contact users even if they have chosen not to enable this feature.") .'</p>'; $output .= '<p>'. t("Note that the contact tab will not appear when a user views his or her own profile; only when viewing another user's profile, if that user's contact form is enabled.") .'</p>'; - $output .= '<p>'. t('If the menu module is enabled, a menu item linking to the site-wide contact page is added to the navigation block. It is disabled by default, but can be enabled via the <a href="%menu-module">menu management</a> page. Links to the contact page may also be added to the primary and secondary links using the same page.', array('%menu-module' => url('admin/menu'))) .'</p>'; + $output .= '<p>'. t('If the menu module is enabled, a menu item linking to the site-wide contact page is added to the navigation block. It is disabled by default, but can be enabled via the <a href="%menu-module">menu management</a> page. Links to the contact page may also be added to the primary and secondary links using the same page.', array('%menu-module' => url('admin/build/menu'))) .'</p>'; $output .= t('Contact module links:') .'<ul>'; $output .= '<li>'. t('Default site-wide <a href="%contact-page">contact page</a>.', array('%contact-page' => url('contact'))) .'</li>'; - $output .= '<li>'. t('Site-wide contact form <a href="%configuration-page">category configuration</a>.', array('%configuration-page' => url('admin/contact'))) .'</li>'; - $output .= '<li>'. t('Site-wide contact form <a href="%additional-settings">general settings</a>.', array('%additional-settings' => url('admin/contact/settings'))) .'</li>'; - $output .= '<li>'. t('Site-wide contact form <a href="%menu-configuration">menu configuration</a>.', array('%menu-configuration' => url('admin/menu'))) .'</li></ul>'; + $output .= '<li>'. t('Site-wide contact form <a href="%configuration-page">category configuration</a>.', array('%configuration-page' => url('admin/build/contact'))) .'</li>'; + $output .= '<li>'. t('Site-wide contact form <a href="%additional-settings">general settings</a>.', array('%additional-settings' => url('admin/build/contact/settings'))) .'</li>'; + $output .= '<li>'. t('Site-wide contact form <a href="%menu-configuration">menu configuration</a>.', array('%menu-configuration' => url('admin/build/menu'))) .'</li></ul>'; $output .= t('For more information, please read the configuration and customization handbook page for the <a href="%contact">contact module</a>.', array('%contact' => url('http://drupal.org/handbook/modules/contact/', NULL, NULL, TRUE))); return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables the use of both personal and site-wide contact forms.'); - case 'admin/contact': - $output = t('This page lets you setup <a href="%form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="%settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('%settings' => url('admin/settings/contact'), '%form' => url('contact'))); + case 'admin/build/contact': + $output = t('This page lets you setup <a href="%form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="%settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('%settings' => url('admin/build/contact/settings'), '%form' => url('contact'))); if (!module_exist('menu')) { - $menu_note = t('The menu item can be customized and configured only once the menu module has been <a href="%modules-page">enabled</a>.', array('%modules-page' => url('admin/modules'))); + $menu_note = t('The menu item can be customized and configured only once the menu module has been <a href="%modules-page">enabled</a>.', array('%modules-page' => url('admin/settings/modules'))); } else { $menu_note = ''; } - $output .= '<p>'. t('The contact module also adds a <a href="%menu-settings">menu item</a> (disabled by default) to the navigation block.', array('%menu-settings' => url('admin/menu'))) .' '. $menu_note .'</p>'; + $output .= '<p>'. t('The contact module also adds a <a href="%menu-settings">menu item</a> (disabled by default) to the navigation block.', array('%menu-settings' => url('admin/build/menu'))) .' '. $menu_note .'</p>'; return($output); } } @@ -50,41 +50,43 @@ function contact_perm() { function contact_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/contact', + $items[] = array('path' => 'admin/build/contact', 'title' => t('contact form'), + 'description' => t('Create a system contact form and set up categories for the form to use.'), 'callback' => 'contact_admin_categories', 'access' => user_access('administer site configuration'), ); - $items[] = array('path' => 'admin/contact/list', + $items[] = array('path' => 'admin/build/contact/list', 'title' => t('list'), 'callback' => 'contact_admin_categories', 'access' => user_access('administer site configuration'), 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items[] = array('path' => 'admin/contact/add', + $items[] = array('path' => 'admin/build/contact/add', 'title' => t('add category'), 'callback' => 'contact_admin_edit', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 1, ); - $items[] = array('path' => 'admin/contact/edit', + $items[] = array('path' => 'admin/build/contact/edit', 'title' => t('edit contact category'), 'callback' => 'contact_admin_edit', 'access' => user_access('administer site configuration'), 'type' => MENU_CALLBACK, ); - $items[] = array('path' => 'admin/contact/delete', + $items[] = array('path' => 'admin/build/contact/delete', 'title' => t('delete contact'), 'callback' => 'contact_admin_delete', 'access' => user_access('administer site configuration'), 'type' => MENU_CALLBACK, ); - $items[] = array('path' => 'admin/settings/contact', - 'title' => t('contact form'), + $items[] = array('path' => 'admin/build/contact/settings', + 'title' => t('settings'), 'callback' => 'contact_admin_settings', 'access' => user_access('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, + 'type' => MENU_LOCAL_TASK, + 'weight' => 2, ); $items[] = array('path' => 'contact', 'title' => t('contact'), @@ -147,7 +149,7 @@ function contact_admin_categories() { $result = db_query('SELECT cid, category, recipients, selected FROM {contact} ORDER BY weight, category'); $rows = array(); while ($category = db_fetch_object($result)) { - $rows[] = array($category->category, $category->recipients, ($category->selected ? t('Yes') : t('No')), l(t('edit'), 'admin/contact/edit/'. $category->cid), l(t('delete'), 'admin/contact/delete/'. $category->cid)); + $rows[] = array($category->category, $category->recipients, ($category->selected ? t('Yes') : t('No')), l(t('edit'), 'admin/build/contact/edit/'. $category->cid), l(t('delete'), 'admin/build/contact/delete/'. $category->cid)); } $header = array(t('Category'), t('Recipients'), t('Selected'), array('data' => t('Operations'), 'colspan' => 2)); @@ -237,16 +239,16 @@ function contact_admin_edit_submit($form_id, $form_values) { if (arg(2) == 'add') { db_query("INSERT INTO {contact} (category, recipients, reply, weight, selected) VALUES ('%s', '%s', '%s', %d, %d)", $form_values['category'], $form_values['recipients'], $form_values['reply'], $form_values['weight'], $form_values['selected']); drupal_set_message(t('Category %category has been added.', array('%category' => theme('placeholder', $form_values['category'])))); - watchdog('mail', t('Contact form: category %category added.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/contact')); + watchdog('mail', t('Contact form: category %category added.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); } else { db_query("UPDATE {contact} SET category = '%s', recipients = '%s', reply = '%s', weight = %d, selected = %d WHERE cid = %d", $form_values['category'], $form_values['recipients'], $form_values['reply'], $form_values['weight'], $form_values['selected'], $form_values['cid']); drupal_set_message(t('Category %category has been updated.', array('%category' => theme('placeholder', $form_values['category'])))); - watchdog('mail', t('Contact form: category %category updated.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/contact')); + watchdog('mail', t('Contact form: category %category updated.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); } - return 'admin/contact'; + return 'admin/build/contact'; } /** @@ -258,11 +260,11 @@ function contact_admin_delete($cid = NULL) { '#value' => $info->category, ); - return confirm_form('contact_admin_delete', $form, t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))), 'admin/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('contact_admin_delete', $form, t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))), 'admin/build/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); } else { drupal_set_message(t('Category not found.'), 'error'); - drupal_goto('admin/contact'); + drupal_goto('admin/build/contact'); } } @@ -274,7 +276,7 @@ function contact_admin_delete_submit($form_id, $form_values) { drupal_set_message(t('Category %category has been deleted.', array('%category' => theme('placeholder', $form_values['category'])))); watchdog('mail', t('Contact form: category %category deleted.', array('%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE); - return 'admin/contact'; + return 'admin/build/contact'; } function contact_admin_settings() { diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 294bddb034e24888121002dbe5d4fd8f65c611f1..ab77e1bffbda854ab9fe84a19231bbb42ba4d208 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -28,7 +28,7 @@ function drupal_help($section) { <li>view your <a href="%file-xmlrpc">XML-RPC page</a>.</li> <li>administer Drupal <a href="%admin-settings-drupal">administer >> settings >> drupal</a>.</li> </ul> -', array('%file-cron' => 'cron.php', '%file-xmlrpc' => 'xmlrpc.php', '%admin-settings-drupal' => url('admin/settings/drupal'))); +', array('%file-cron' => 'cron.php', '%file-xmlrpc' => 'xmlrpc.php', '%admin-settings-drupal' => url('admin/settings/distributed-authentication'))); $output .= '<p>'. t('If you maintain a directory of sites, you can list them on a page using the <code>drupal_client_page()</code> function. Sample instructions: <ul> <li>Enable the page module. Select create content >> page.</li> @@ -44,10 +44,10 @@ function drupal_help($section) { $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%drupal">Drupal page</a>.', array('%drupal' => 'http://drupal.org/handbook/modules/drupal/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes; also enables users to log in using a Drupal ID.'); - case 'admin/settings/drupal': - return t('<p>Using this your site can "call home" to another Drupal server. By calling home to drupal.org and sending a list of your installed modules and themes, you help rank projects on drupal.org and so assist all Drupal administrators to find the best components for meeting their needs. If you want to register with a different server, you can change the Drupal XML-RPC server setting -- but the server has to be able to handle Drupal XML. Some XML-RPC servers may present directories of all registered sites. To get all your site information listed, go to the <a href="%site-settings">site information settings page</a> and set the site name, the e-mail address, the slogan, and the mission statement.</p>', array('%site-settings' => url('admin/settings/site-informationl'))); + case 'admin/settings/distributed-authentication': + return t('<p>Using this your site can "call home" to another Drupal server. By calling home to drupal.org and sending a list of your installed modules and themes, you help rank projects on drupal.org and so assist all Drupal administrators to find the best components for meeting their needs. If you want to register with a different server, you can change the Drupal XML-RPC server setting -- but the server has to be able to handle Drupal XML. Some XML-RPC servers may present directories of all registered sites. To get all your site information listed, go to the <a href="%site-settings">site information settings page</a> and set the site name, the e-mail address, the slogan, and the mission statement.</p>', array('%site-settings' => url('admin/settings/site-information'))); case 'user/help#drupal': return variable_get('drupal_authentication_service', 0) ? t("<p><a href=\"%Drupal\">Drupal</a> is the name of the software that powers %this-site. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely log in to any Drupal site using a single <strong>Drupal ID</strong>.</p> <p>So please feel free to log in to your account here at %this-site with a username from another Drupal site. The format of a Drupal ID is similar to an e-mail address: <strong>username</strong>@<em>server</em>. An example of a valid Drupal ID is <strong>mwlily</strong>@<em>drupal.org</em>.</p>", array('%Drupal' => 'http://drupal.org', '%this-site' => '<em>'. variable_get('site_name', 'this web site') .'</em>')) : ''; @@ -57,7 +57,7 @@ function drupal_help($section) { function drupal_sites_registry_settings() { // Check if all required fields are present if ((variable_get('site_name', 'drupal') == 'drupal') || (variable_get('site_name', 'drupal') == '')) { - form_set_error('drupal_directory', t('You must set the name of your site on the <a href="%url">administer » settings</a> page.', array('%url' => url('admin/settings/site-information')))); + form_set_error('drupal_directory', t('You must set the name of your site on the <a href="%url">administer » settings » site information</a> page.', array('%url' => url('admin/settings/site-information')))); } else if (variable_get('site_mail', ini_get('sendmail_from')) == '') { form_set_error('drupal_directory', t('You must set an e-mail address for your site on the <a href="%url">site information settings page</a>.', array('%url' => url('admin/settings/site-information')))); @@ -349,10 +349,12 @@ function drupal_menu($may_cache) { if ($may_cache) { $items[] = array('path' => 'admin/settings/sites-registry', 'title' => t('sites registry'), + 'description' => t('Register with another Drupal site (drupal.org by default) for statistics sharing, or set up your server to be a central server for registrations.'), 'callback' => 'drupal_sites_registry_settings', 'access' => user_access('administer site configuration')); $items[] = array('path' => 'admin/settings/distributed-authentication', 'title' => t('distributed authentication'), + 'description' => t('Allow your site to accept logins from other Drupal sites such as drupal.org.'), 'callback' => 'drupal_distributed_authentication_settings', 'access' => user_access('administer site configuration'));; diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 664e991f159c907b6cbc7e4c8e724c3f0c18dd78..86565ce13cc58ae328aeaefeefeb850f001a3eb8 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -27,29 +27,29 @@ function filter_help($section) { <li>administer input format permissions and settings at <a href="%admin-filters">administer >> input formats</a>.</li> <li>configure the filters for each input format at <a href="%admin-filters">administer >> input formats >> configure</a>.</li> </ul> -', array('%admin-filters' => url('admin/filters'))); +', array('%admin-filters' => url('admin/settings/filters'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%filter">Filter page</a>.', array('%filter' => 'http://drupal.org/handbook/modules/filter/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Handles the filtering of content in preparation for display.'); - case 'admin/filters': + case 'admin/settings/filters': return t(' <p><em>Input formats</em> define a way of processing user-supplied text in Drupal. Every input format has its own settings of which <em>filters</em> to apply. Possible filters include stripping out malicious HTML and making URLs clickable.</p> <p>Users can choose between the available input formats when submitting content.</p> <p>Below you can configure which input formats are available to which roles, as well as choose a default input format (used for imported content, for example).</p> <p>Note that (1) the default format is always available to all roles, and (2) all filter formats can always be used by roles with the "administer filters" permission even if they are not explicitly listed in the Roles column of this table.</p>'); - case 'admin/filters/'. arg(2): + case 'admin/settings/filters/'. arg(2): return t(' <p>Every <em>filter</em> performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format.</p> -<p>If you notice some filters are causing conflicts in the output, you can <a href="%rearrange">rearrange them</a>.</p>', array('%rearrange' => url('admin/filters/'. arg(2) .'/order'))); +<p>If you notice some filters are causing conflicts in the output, you can <a href="%rearrange">rearrange them</a>.</p>', array('%rearrange' => url('admin/settings/filters/'. arg(2) .'/order'))); - case 'admin/filters/'. arg(2) .'/configure': + case 'admin/settings/filters/'. arg(2) .'/configure': return t(' -<p>If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the <a href="%url">view tab</a> first.</p>', array('%url' => url('admin/filters/'. arg(2)))); +<p>If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the <a href="%url">view tab</a> first.</p>', array('%url' => url('admin/settings/filters/'. arg(2)))); - case 'admin/filters/'. arg(2) .'/order': + case 'admin/settings/filters/'. arg(2) .'/order': return t(' <p>Because of the flexible filtering system, you might encounter a situation where one filter prevents another from doing its job. For example: a word in an URL gets converted into a glossary term, before the URL can be converted in a clickable link. When this happens, you will need to rearrange the order in which filters get executed.</p> <p>Filters are executed from top-to-bottom. You can use the weight column to rearrange them: heavier filters \'sink\' to the bottom.</p>'); @@ -63,25 +63,26 @@ function filter_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/filters', + $items[] = array('path' => 'admin/settings/filters', 'title' => t('input formats'), + 'description' => t('Configure how content input by users is filtering, including allowed HTML tags, PHP code tags. Also allows enabling of module-provided filters.'), 'callback' => 'filter_admin_overview', 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/list', + $items[] = array('path' => 'admin/settings/filters/list', 'title' => t('list'), 'callback' => 'filter_admin_overview', 'type' => MENU_DEFAULT_LOCAL_TASK, 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/add', + $items[] = array('path' => 'admin/settings/filters/add', 'title' => t('add input format'), 'callback' => 'filter_admin_format_form', 'type' => MENU_LOCAL_TASK, 'weight' => 1, 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/delete', + $items[] = array('path' => 'admin/settings/filters/delete', 'title' => t('delete input format'), 'callback' => 'filter_admin_delete', 'type' => MENU_CALLBACK, @@ -99,14 +100,14 @@ function filter_menu($may_cache) { $formats = filter_formats(); if (isset($formats[arg(2)])) { - $items[] = array('path' => 'admin/filters/'. arg(2), + $items[] = array('path' => 'admin/settings/filters/'. arg(2), 'title' => t("'%format' input format", array('%format' => $formats[arg(2)]->name)), 'callback' => 'filter_admin_format_form', 'callback arguments' => array('format' => $formats[arg(2)]), 'type' => MENU_CALLBACK, 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/'. arg(2) .'/list', + $items[] = array('path' => 'admin/settings/filters/'. arg(2) .'/list', 'title' => t('view'), 'callback' => 'filter_admin_format_form', 'callback arguments' => array('format' => $formats[arg(2)]), @@ -114,14 +115,14 @@ function filter_menu($may_cache) { 'weight' => 0, 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/'. arg(2) .'/configure', + $items[] = array('path' => 'admin/settings/filters/'. arg(2) .'/configure', 'title' => t('configure'), 'callback' => 'filter_admin_configure', 'type' => MENU_LOCAL_TASK, 'weight' => 1, 'access' => user_access('administer filters'), ); - $items[] = array('path' => 'admin/filters/'. arg(2) .'/order', + $items[] = array('path' => 'admin/settings/filters/'. arg(2) .'/order', 'title' => t('rearrange'), 'callback' => 'filter_admin_order', 'callback arguments' => array('format' => $formats[arg(2)]), @@ -310,8 +311,8 @@ function filter_admin_overview() { $options[$id] = ''; $form[$format->name]['id'] = array('#value' => $id); $form[$format->name]['roles'] = array('#value' => $default ? t('All roles may use default format') : ($roles ? implode(', ',$roles) : t('No roles may use this format'))); - $form[$format->name]['configure'] = array('#value' => l(t('configure'), 'admin/filters/'. $id)); - $form[$format->name]['delete'] = array('#value' => $default ? '' : l(t('delete'), 'admin/filters/delete/'. $id)); + $form[$format->name]['configure'] = array('#value' => l(t('configure'), 'admin/settings/filters/'. $id)); + $form[$format->name]['delete'] = array('#value' => $default ? '' : l(t('delete'), 'admin/settings/filters/delete/'. $id)); } $form['default'] = array('#type' => 'radios', '#options' => $options, '#default_value' => variable_get('filter_default_format', 1)); $form['submit'] = array('#type' => 'submit', '#value' => t('Set default format')); @@ -358,11 +359,11 @@ function filter_admin_delete() { $form['format'] = array('#type' => 'hidden', '#value' => $format->format); $form['name'] = array('#type' => 'hidden', '#value' => $format->name); - return confirm_form('filter_admin_delete', $form, t('Are you sure you want to delete the input format %format?', array('%format' => theme('placeholder', $format->name))), 'admin/filters', t('If you have any content left in this input format, it will be switched to the default input format. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('filter_admin_delete', $form, t('Are you sure you want to delete the input format %format?', array('%format' => theme('placeholder', $format->name))), 'admin/settings/filters', t('If you have any content left in this input format, it will be switched to the default input format. This action cannot be undone.'), t('Delete'), t('Cancel')); } else { drupal_set_message(t('The default format cannot be deleted.')); - drupal_goto('admin/filters'); + drupal_goto('admin/settings/filters'); } } else { @@ -386,7 +387,7 @@ function filter_admin_delete_submit($form_id, $form_values) { cache_clear_all('filter:'. $form_values['format'], TRUE); drupal_set_message(t('Deleted input format %format.', array('%format' => theme('placeholder', $form_values['name'])))); - return 'admin/filters'; + return 'admin/settings/filters'; } /** @@ -526,10 +527,10 @@ function filter_admin_format_form_submit($form_id, $form_values) { // If a new filter was added, return to the main list of filters. Otherwise, stay on edit filter page to show new changes. if ($new) { - return 'admin/filters/'; + return 'admin/settings/filters/'; } else { - return 'admin/filters/'. $format; + return 'admin/settings/filters/'. $format; } } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index d826ae9632e8300e75316925aebf5b5602fadb3c..1b6b05f7ce23c5e80bcb084ce70770e2c3935bab 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -22,16 +22,16 @@ function forum_help($section) { <li>read about the comment module at <a href="%admin-help-comment">administer >> help >> comment</a>.</li> <li>read about the taxonomy module at <a href="%admin-help-taxonomy">administer >> help >> taxonomy</a>.</li> </ul> -', array('%admin-forum' => url('admin/forum'), '%admin-modules' => url('admin/modules'), '%admin-help-comment' => url('admin/help/comment'), '%admin-help-taxonomy' => url('admin/help/taxonomy'))); +', array('%admin-forum' => url('admin/content/forum'), '%admin-modules' => url('admin/settings/modules'), '%admin-help-comment' => url('admin/help/comment'), '%admin-help-taxonomy' => url('admin/help/taxonomy'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%forum">Forum page</a>.', array('%forum' => 'http://drupal.org/handbook/modules/forum/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables threaded discussions about general topics.'); - case 'admin/forum': + case 'admin/content/forum': return t('<p>This is a list of existing containers and forums that you can edit. Containers hold forums and, in turn, forums hold threaded discussions. Both containers and forums can be placed inside other containers and forums. By planning the structure of your containers and forums well, you make it easier for users to find a topic area of interest to them.</p>'); - case 'admin/forum/add/container': + case 'admin/content/forum/add/container': return t('<p>Containers help you organize your forums. The job of a container is to hold, or contain, other forums that are related. For example, a container named "Food" might hold two forums named "Fruit" and "Vegetables".</p>'); - case 'admin/forum/add/forum': + case 'admin/content/forum/add/forum': return t('<p>A forum holds discussion topics that are related. For example, a forum named "Fruit" might contain topics titled "Apples" and "Bananas".</p>'); case 'node/add#forum': return t('Create a new topic for discussion in the forums.'); @@ -53,43 +53,45 @@ function forum_menu($may_cache) { 'callback' => 'forum_page', 'access' => user_access('access content'), 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'admin/forum', + $items[] = array('path' => 'admin/content/forum', 'title' => t('forums'), + 'description' => t('Control forums and their hierarchy and change forum settings.'), 'callback' => 'forum_overview', 'access' => user_access('administer forums'), 'type' => MENU_NORMAL_ITEM); - $items[] = array('path' => 'admin/forum/list', + $items[] = array('path' => 'admin/content/forum/list', 'title' => t('list'), 'access' => user_access('administer forums'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/forum/add/container', + $items[] = array('path' => 'admin/content/forum/add/container', 'title' => t('add container'), 'callback' => 'forum_form_container', 'access' => user_access('administer forums'), 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/forum/add/forum', + $items[] = array('path' => 'admin/content/forum/add/forum', 'title' => t('add forum'), 'callback' => 'forum_form_forum', 'access' => user_access('administer forums'), 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/settings/forum', - 'title' => t('forums'), + $items[] = array('path' => 'admin/content/forum/settings', + 'title' => t('settings'), 'callback' => 'forum_admin_settings', + 'weight' => 5, 'access' => user_access('administer forums'), - 'type' => MENU_NORMAL_ITEM); + 'type' => MENU_LOCAL_TASK); } elseif (is_numeric(arg(4))) { $term = taxonomy_get_term(arg(4)); // Check if this is a valid term. if ($term) { - $items[] = array('path' => 'admin/forum/edit/container', + $items[] = array('path' => 'admin/content/forum/edit/container', 'title' => t('edit container'), 'callback' => 'forum_form_container', 'callback arguments' => array((array)$term), 'access' => user_access('administer forums'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/forum/edit/forum', + $items[] = array('path' => 'admin/content/forum/edit/forum', 'title' => t('edit forum'), 'callback' => 'forum_form_forum', 'callback arguments' => array((array)$term), @@ -533,7 +535,7 @@ function forum_form_submit($form_id, $form_values) { drupal_set_message(t('The %type %term has been updated.', array('%term' => theme('placeholder', $form_values['name']), '%type' => $type))); break; } - return 'admin/forum'; + return 'admin/content/forum'; } /** @@ -547,7 +549,7 @@ function _forum_confirm_delete($tid) { $form['tid'] = array('#type' => 'value', '#value' => $tid); $form['name'] = array('#type' => 'value', '#value' => $term->name); - return confirm_form('forum_confirm_delete', $form, t('Are you sure you want to delete the forum %name?', array('%name' => theme('placeholder', $term->name))), 'admin/forums', t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('forum_confirm_delete', $form, t('Are you sure you want to delete the forum %name?', array('%name' => theme('placeholder', $term->name))), 'admin/content/forums', t('Deleting a forum or container will delete all sub-forums and associated posts as well. This action cannot be undone.'), t('Delete'), t('Cancel')); } /** @@ -558,7 +560,7 @@ function forum_confirm_delete_submit($form_id, $form_values) { drupal_set_message(t('The forum %term and all sub-forums and associated posts have been deleted.', array('%term' => theme('placeholder', $form_values['name'])))); watchdog('content', t('forum: deleted %term and all its sub-forums and associated posts.', array('%term' => theme('placeholder', $form_values['name'])))); - return 'admin/forum'; + return 'admin/content/forum'; } /** @@ -571,16 +573,16 @@ function forum_overview() { if ($tree) { foreach ($tree as $term) { if (in_array($term->tid, variable_get('forum_containers', array()))) { - $rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/forum/edit/container/$term->tid")); + $rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit container'), "admin/content/forum/edit/container/$term->tid")); } else { - $rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/forum/edit/forum/$term->tid")); + $rows[] = array(_taxonomy_depth($term->depth) .' '. check_plain($term->name), l(t('edit forum'), "admin/content/forum/edit/forum/$term->tid")); } } } else { - $rows[] = array(array('data' => '<em>' . t('There are no existing containers or forums. You may add some on the <a href="%container">add container</a> or <a href="%forum">add forum</a> pages.', array('%container' => url('admin/forum/add/container'), '%forum' => url('admin/forum/add/forum'))) . '</em>', 'colspan' => 2)); + $rows[] = array(array('data' => '<em>' . t('There are no existing containers or forums. You may add some on the <a href="%container">add container</a> or <a href="%forum">add forum</a> pages.', array('%container' => url('admin/content/forum/add/container'), '%forum' => url('admin/content/forum/add/forum'))) . '</em>', 'colspan' => 2)); } return theme('table', $header, $rows); } diff --git a/modules/help/help.module b/modules/help/help.module index cde7cb50e4ac1dfedb8ca3a50d009d0f65b14c01..1aa985f24995589f9384b95b02ce631e623917dc 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -111,7 +111,7 @@ function help_help($section) { $output .= '<p>'. t('You can not administer the help system.') .'</p>'; $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%help">Help page</a>.', array('%help' => 'http://drupal.org/handbook/modules/help/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Manages the display of online help.'); } } diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module index add982cfb34da737b3bd219333d71ea1147f083b..5dd0443595c8f72e1b67c2e3ff1f45cbdfbbe5b0 100644 --- a/modules/legacy/legacy.module +++ b/modules/legacy/legacy.module @@ -27,7 +27,7 @@ function legacy_help($section) { $output .= '<p>'. t('Legacy module has no configurable options.') .'</p>'; $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%legacy">Legacy page</a>.', array('%legacy' => 'http://drupal.org/handbook/modules/legacy/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Provides legacy handlers for upgrades from older Drupal installations.'); } } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index e7d3cd63dc4cd4b1ce39937f6471a514aa993d50..0226f083fe101dfaeab1a6b3e9c0ed91dbca22fd 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -30,22 +30,22 @@ function locale_help($section) { <li>download translation files from the <a href="%external-http-drupal-org-project-Translations">Drupal translations page</a>. </li> </ul> -', array('%admin-locale' => url('admin/locale'), '%admin-locale-string-search' => url('admin/locale/string/search'), '%admin-locale-language-add' => url('admin/locale/language/add'), '%external-http-drupal-org-project-Translations' => 'http://drupal.org/project/Translations')); +', array('%admin-locale' => url('admin/settings/locale'), '%admin-locale-string-search' => url('admin/settings/locale/string/search'), '%admin-locale-language-add' => url('admin/settings/locale/language/add'), '%external-http-drupal-org-project-Translations' => 'http://drupal.org/project/Translations')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%locale">Locale page</a>.', array('%locale' => 'http://drupal.org/handbook/modules/locale/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables the translation of the user interface to languages other than English.'); - case 'admin/locale': - case 'admin/locale/language/overview': - return t("<p>Drupal provides support for the translation of its interface text into different languages. This page provides an overview of the installed languages. You can add a language on the <a href=\"%add-language\">add language page</a>, or directly by <a href=\"%import\">importing a translation</a>. If multiple languages are enabled, registered users will be able to set their preferred language. The site default will be used for anonymous visitors and for users without their own settings.</p><p>Drupal interface translations may be added or extended by several courses: by <a href=\"%import\">importing</a> an existing translation, by <a href=\"%search\">translating everything</a> from scratch, or by a combination of these approaches.</p>", array("%search" => url("admin/locale/string/search"), "%import" => url("admin/locale/language/import"), "%add-language" => url("admin/locale/language/add"))); - case 'admin/locale/language/add': - return t("<p>You need to add all languages in which you would like to display the site interface. If you can't find the desired language in the quick-add dropdown, then you will need to provide the proper language code yourself. The language code may be used to negotiate with browsers and to present flags, etc., so it is important to pick a code that is standardised for the desired language. You can also add a language by <a href=\"%import\">importing a translation</a>.</p>", array("%import" => url("admin/locale/language/import"))); - case 'admin/locale/language/import': + case 'admin/settings/locale': + case 'admin/settings/locale/language/overview': + return t("<p>Drupal provides support for the translation of its interface text into different languages. This page provides an overview of the installed languages. You can add a language on the <a href=\"%add-language\">add language page</a>, or directly by <a href=\"%import\">importing a translation</a>. If multiple languages are enabled, registered users will be able to set their preferred language. The site default will be used for anonymous visitors and for users without their own settings.</p><p>Drupal interface translations may be added or extended by several courses: by <a href=\"%import\">importing</a> an existing translation, by <a href=\"%search\">translating everything</a> from scratch, or by a combination of these approaches.</p>", array("%search" => url("admin/settings/locale/string/search"), "%import" => url("admin/settings/locale/language/import"), "%add-language" => url("admin/settings/locale/language/add"))); + case 'admin/settings/locale/language/add': + return t("<p>You need to add all languages in which you would like to display the site interface. If you can't find the desired language in the quick-add dropdown, then you will need to provide the proper language code yourself. The language code may be used to negotiate with browsers and to present flags, etc., so it is important to pick a code that is standardised for the desired language. You can also add a language by <a href=\"%import\">importing a translation</a>.</p>", array("%import" => url("admin/settings/locale/language/import"))); + case 'admin/settings/locale/language/import': return t("<p>This page allows you to import a translation provided in the gettext Portable Object (.po) format. The easiest way to get your site translated is to obtain an existing Drupal translation and to import it. You can find existing translations on the <a href=\"%url\">Drupal translation page</a>. Note that importing a translation file might take a while.</p>", array('%url' => 'http://drupal.org/project/translations')); - case 'admin/locale/language/export': + case 'admin/settings/locale/language/export': return t("<p>This page allows you to export Drupal strings. The first option is to export a translation so it can be shared. The second option generates a translation template, which contains all Drupal strings, but without their translations. You can use this template to start a new translation using various software packages designed for this task.</p>"); - case 'admin/locale/string/search': - return t("<p>It is often convenient to get the strings from your setup on the <a href=\"%export\">export page</a>, and use a desktop Gettext translation editor to edit the translations. On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.</p>", array("%export" => url("admin/locale/language/export"))); + case 'admin/settings/locale/string/search': + return t("<p>It is often convenient to get the strings from your setup on the <a href=\"%export\">export page</a>, and use a desktop Gettext translation editor to edit the translations. On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.</p>", array("%export" => url("admin/settings/locale/language/export"))); } } @@ -59,18 +59,19 @@ function locale_menu($may_cache) { $access = user_access('administer locales'); // Main admin menu item - $items[] = array('path' => 'admin/locale', + $items[] = array('path' => 'admin/settings/locale', 'title' => t('localization'), + 'description' => t('Configure site localization and user interface translation.'), 'callback' => 'locale_admin_manage', 'access' => $access); // Top level tabs - $items[] = array('path' => 'admin/locale/language', + $items[] = array('path' => 'admin/settings/locale/language', 'title' => t('manage languages'), 'access' => $access, 'weight' => -10, 'type' => MENU_DEFAULT_LOCAL_TASK); - $items[] = array('path' => 'admin/locale/string/search', + $items[] = array('path' => 'admin/settings/locale/string/search', 'title' => t('manage strings'), 'callback' => 'locale_string_search', 'access' => $access, @@ -78,25 +79,25 @@ function locale_menu($may_cache) { 'type' => MENU_LOCAL_TASK); // Manage languages subtabs - $items[] = array('path' => 'admin/locale/language/overview', + $items[] = array('path' => 'admin/settings/locale/language/overview', 'title' => t('list'), 'callback' => 'locale_admin_manage', 'access' => $access, 'weight' => 0, 'type' => MENU_DEFAULT_LOCAL_TASK); - $items[] = array('path' => 'admin/locale/language/add', + $items[] = array('path' => 'admin/settings/locale/language/add', 'title' => t('add language'), 'callback' => 'locale_admin_manage_add', 'access' => $access, 'weight' => 5, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/locale/language/import', + $items[] = array('path' => 'admin/settings/locale/language/import', 'title' => t('import'), 'callback' => 'locale_admin_import', 'access' => $access, 'weight' => 10, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/locale/language/export', + $items[] = array('path' => 'admin/settings/locale/language/export', 'title' => t('export'), 'callback' => 'locale_admin_export', 'access' => $access, @@ -104,7 +105,7 @@ function locale_menu($may_cache) { 'type' => MENU_LOCAL_TASK); // Language related callbacks - $items[] = array('path' => 'admin/locale/language/delete', + $items[] = array('path' => 'admin/settings/locale/language/delete', 'title' => t('confirm'), 'callback' => 'locale_admin_manage_delete_form', 'access' => $access, @@ -113,13 +114,13 @@ function locale_menu($may_cache) { else { if (is_numeric(arg(4))) { // String related callbacks - $items[] = array('path' => 'admin/locale/string/edit/'. arg(4), + $items[] = array('path' => 'admin/settings/locale/string/edit/'. arg(4), 'title' => t('edit string'), 'callback' => 'locale_admin_string_edit', 'callback arguments' => arg(4), 'access' => $access, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/locale/string/delete/'. arg(4), + $items[] = array('path' => 'admin/settings/locale/string/delete/'. arg(4), 'title' => t('delete string'), 'callback' => 'locale_admin_string_delete', 'callback arguments' => arg(4), @@ -323,7 +324,7 @@ function locale_admin_manage_delete_form() { // Do not allow deletion of English locale. if ($langcode == 'en') { drupal_set_message(t('The English locale cannot be deleted.')); - drupal_goto('admin/locale/language/overview'); + drupal_goto('admin/settings/locale/language/overview'); } // For other locales, warn user that data loss is ahead. @@ -334,7 +335,7 @@ function locale_admin_manage_delete_form() { } else { $form['langcode'] = array('#type' => 'value', '#value' => $langcode); - return confirm_form('locale_admin_manage_delete_form', $form, t('Are you sure you want to delete the language %name?', array('%name' => theme('placeholder', t($languages['name'][$langcode])))), 'admin/locale/language/overview', t('Deleting a language will remove all data associated with it. This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form('locale_admin_manage_delete_form', $form, t('Are you sure you want to delete the language %name?', array('%name' => theme('placeholder', t($languages['name'][$langcode])))), 'admin/settings/locale/language/overview', t('Deleting a language will remove all data associated with it. This action cannot be undone.'), t('Delete'), t('Cancel')); } } @@ -354,7 +355,7 @@ function locale_admin_manage_delete_form_submit($form_id, $form_values) { // Changing the locale settings impacts the interface: cache_clear_all(); - return 'admin/locale/language/overview'; + return 'admin/settings/locale/language/overview'; } /** diff --git a/modules/menu/menu.module b/modules/menu/menu.module index 14086951b3447cb72d7c5e94719676fc82935cef..f738dfa81796fc5a4c544dbae5425107164a4e68 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -19,7 +19,7 @@ function menu_help($section) { <li>On the administer menu page, administrators can "edit" to change the title, description, parent or weight of a menu item. Under the "operations" column, click on "enable/disable" to toggle a menu item on or off. Only menu items which are enabled are displayed in the corresponding menu block. Note that the default menu items generated by the menu module cannot be deleted, only disabled.</li> <li>Use the "add menu" tab to submit a title for a new custom menu. Once submitted, the menu will appear in a list toward the bottom of the administer menu page underneath the main navigation menu. Under the menu name there will be links to edit or delete the menu, and a link to add new items to the menu.</li> <li>Use the "add menu item" tab to create new links in either the navigation or a custom menu (such as a primary/secondary links menu). Select the parent item to place the new link within an existing menu structure. For top level menu items, choose the name of the menu in which the link is to be added.</li> -</ul>', array('%navigation' => theme('placeholder', 'Navigation'), '%primary-links' => theme('placeholder', 'primary links'), '%secondary-links' => theme('placeholder', 'secondary links'), '%admin-block' => url('admin/block'), '%menu-settings' => url('admin/settings/menu'))); +</ul>', array('%navigation' => theme('placeholder', 'Navigation'), '%primary-links' => theme('placeholder', 'primary links'), '%secondary-links' => theme('placeholder', 'secondary links'), '%admin-block' => url('admin/build/block'), '%menu-settings' => url('admin/build/menu/settings'))); $output .= t('<p>You can</p> <ul> <li>administer menus at <a href="%admin-menu">administer >> menus</a>.</li> @@ -28,16 +28,16 @@ function menu_help($section) { <li>modify menu settings (in particular, to specify a menu to use for primary or secondary links) at <a href="%admin-settings-menus">administer >> settings >> menus</a>.</li> <li>manage menu blocks at <a href="%admin-block">administer >> blocks</a>.</li> </ul> -', array('%admin-menu' => url('admin/menu'), '%admin-block' => url('admin/block'), '%admin-menu-menu-add' => url('admin/menu/menu/add'), '%admin-menu-item-add' => url('admin/menu/item/add'), '%admin-settings-menus' => url('admin/settings/menu'))); +', array('%admin-menu' => url('admin/build/menu'), '%admin-block' => url('admin/build/block'), '%admin-menu-menu-add' => url('admin/build/menu/menu/add'), '%admin-menu-item-add' => url('admin/build/menu/item/add'), '%admin-settings-menus' => url('admin/build/menu/settings'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%menu">Menu page</a>.', array('%menu' => 'http://drupal.org/handbook/modules/menu/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows administrators to customize the site navigation menu.'); - case 'admin/menu': - return '<p>'. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('%admin-settings-menus' => url('admin/settings/menu'), '%admin-block'=>url('admin/block'))) .'</p>'; - case 'admin/menu/menu/add': - return '<p>'. t('Enter the name for your new menu. Remember to enable the newly created block in the <a href="%blocks">blocks administration page</a>.', array('%blocks' => url('admin/block'))) .'</p>'; - case 'admin/menu/item/add': + case 'admin/build/menu': + return '<p>'. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('%admin-settings-menus' => url('admin/build/menu/settings'), '%admin-block'=>url('admin/build/block'))) .'</p>'; + case 'admin/build/menu/menu/add': + return '<p>'. t('Enter the name for your new menu. Remember to enable the newly created block in the <a href="%blocks">blocks administration page</a>.', array('%blocks' => url('admin/build/block'))) .'</p>'; + case 'admin/build/menu/item/add': return '<p>'. t('Enter the title, path, position and the weight for your new menu item.') .'</p>'; } } @@ -49,60 +49,68 @@ function menu_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/menu', + $items[] = array('path' => 'admin/build/menu', 'title' => t('menus'), + 'description' => t('Control your site\'s navigation menu, create menu blocks, as well as rename and reorganize menu items.'), 'callback' => 'menu_overview', 'access' => user_access('administer menu')); - $items[] = array('path' => 'admin/menu/list', + $items[] = array('path' => 'admin/build/menu/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/menu/item/add', + $items[] = array('path' => 'admin/build/menu/item/add', 'title' => t('add menu item'), 'callback' => 'menu_edit_item_form', + 'callback arguments' => array('add'), 'access' => user_access('administer menu'), 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/menu/item/edit', + $items[] = array('path' => 'admin/build/menu/item/edit', 'title' => t('edit menu item'), 'callback' => 'menu_edit_item_form', + 'callback arguments' => array('edit'), 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/menu/item/reset', + $items[] = array('path' => 'admin/build/menu/item/reset', 'title' => t('reset menu item'), 'callback' => 'menu_reset_item', 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/menu/item/disable', + $items[] = array('path' => 'admin/build/menu/item/disable', 'title' => t('disable menu item'), 'callback' => 'menu_disable_item', 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/menu/item/delete', + $items[] = array('path' => 'admin/build/menu/item/delete', 'title' => t('delete menu item'), 'callback' => 'menu_item_delete_form', 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/menu/menu/add', + $items[] = array('path' => 'admin/build/menu/menu/add', 'title' => t('add menu'), 'callback' => 'menu_edit_menu_form', + 'callback arguments' => array('add'), 'access' => user_access('administer menu'), 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/menu/menu/edit', + $items[] = array('path' => 'admin/build/menu/menu/edit', 'title' => t('edit menu'), 'callback' => 'menu_edit_menu_form', + 'callback arguments' => array('edit'), 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/menu/menu/delete', + $items[] = array('path' => 'admin/build/menu/menu/delete', 'title' => t('delete menu'), 'callback' => 'menu_item_delete_form', 'access' => user_access('administer menu'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/settings/menu', - 'title' => t('menus'), - 'callback' => 'menu_configure'); + $items[] = array('path' => 'admin/build/menu/settings', + 'title' => t('settings'), + 'callback' => 'menu_configure', + 'type' => MENU_LOCAL_TASK, + 'weight' => 5, + ); } return $items; @@ -238,7 +246,7 @@ function menu_form_alter($form_id, &$form) { ); $form['menu']['advanced'] = array('#type' => 'item', - '#value' => t('You may also <a href="%edit">edit the advanced settings</a> for this menu item.', array('%edit' => url("admin/menu/item/edit/{$item['mid']}"))), + '#value' => t('You may also <a href="%edit">edit the advanced settings</a> for this menu item.', array('%edit' => url("admin/build/menu/item/edit/{$item['mid']}"))), ); } } @@ -258,7 +266,7 @@ function menu_configure() { ); $form['settings_links']['intro'] = array('#type' => 'item', - '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the <a href="%menu">menu administration</a> page or from a built-in list of menu items such as the navigation menu links.', array('%menu' => url('admin/menu'))), + '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the <a href="%menu">menu administration</a> page or from a built-in list of menu items such as the navigation menu links.', array('%menu' => url('admin/build/menu'))), ); $form['settings_links']['menu_primary_menu'] = array('#type' => 'select', @@ -301,8 +309,8 @@ function menu_configure() { /** * Menu callback; handle the adding/editing of a new menu. */ -function menu_edit_menu_form($mid = 0) { - if (arg(3) == 'edit') { +function menu_edit_menu_form($type, $mid = 0) { + if ($type == 'edit') { if (!($item = db_fetch_array(db_query('SELECT * FROM {menu} WHERE mid = %d', $mid)))) { drupal_not_found(); return; @@ -331,8 +339,8 @@ function menu_edit_menu_form($mid = 0) { /** * Present the menu item editing form. */ -function menu_edit_item_form($mid = 0) { - if (arg(3) == 'edit') { +function menu_edit_item_form($type, $mid = 0) { + if ($type == 'edit') { if (!($item = db_fetch_array(db_query('SELECT * FROM {menu} WHERE mid = %d', $mid)))) { drupal_not_found(); return; @@ -411,7 +419,7 @@ function menu_edit_item_form($mid = 0) { */ function menu_edit_item_form_submit($form_id, $form_values) { menu_edit_item_save($form_values); - return 'admin/menu'; + return 'admin/build/menu'; } /** @@ -434,7 +442,7 @@ function menu_item_delete_form($mid) { $message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title))); } - return confirm_form('menu_confirm_delete_form', $form, $message, 'admin/menu', t('This action cannot be undone.'), t('Delete')); + return confirm_form('menu_confirm_delete_form', $form, $message, 'admin/build/menu', t('This action cannot be undone.'), t('Delete')); } /** @@ -453,7 +461,7 @@ function menu_confirm_delete_form_submit($form_id, $form_values) { watchdog('menu', t('Deleted menu item %title.', $t_args), WATCHDOG_NOTICE); } - return 'admin/menu'; + return 'admin/build/menu'; } /** @@ -462,7 +470,7 @@ function menu_confirm_delete_form_submit($form_id, $form_values) { function menu_reset_item($mid) { if (isset($mid) && $title = db_result(db_query('SELECT title FROM {menu} WHERE mid = %d', $mid))) { $form['mid'] = array('#type' => 'value', '#value' => $mid); - return confirm_form('menu_reset_item_form', $form, t('Are you sure you want to reset the item %item to its default values?', array('%item' => theme('placeholder', $title))), 'admin/menu', t('Any customizations will be lost. This action cannot be undone.'), t('Reset')); + return confirm_form('menu_reset_item_form', $form, t('Are you sure you want to reset the item %item to its default values?', array('%item' => theme('placeholder', $title))), 'admin/build/menu', t('Any customizations will be lost. This action cannot be undone.'), t('Reset')); } else { drupal_not_found(); @@ -476,7 +484,7 @@ function menu_reset_item_form_submit($form_id, $form_values) { menu_delete_item($form_values['mid']); drupal_set_message(t('The menu item was reset to its default settings.')); - return 'admin/menu'; + return 'admin/build/menu'; } /** @@ -490,7 +498,7 @@ function menu_disable_item($mid) { $type |= MENU_MODIFIED_BY_ADMIN; db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $mid); drupal_set_message(t('The menu item has been disabled.')); - drupal_goto('admin/menu'); + drupal_goto('admin/build/menu'); } /** @@ -525,7 +533,7 @@ function menu_edit_item_save($edit) { } elseif ($status == SAVED_NEW) { drupal_set_message(t('The menu item %title has been added.', $t_args)); - watchdog('menu', t('Added menu item %title.', $t_args), WATCHDOG_NOTICE, l(t('view'), 'admin/menu')); + watchdog('menu', t('Added menu item %title.', $t_args), WATCHDOG_NOTICE, l(t('view'), 'admin/build/menu')); } return $edit['mid']; } @@ -600,12 +608,12 @@ function menu_overview_tree() { foreach ($root_menus as $mid => $title) { $operations = array(); if ($menu['items'][$mid]['type'] & MENU_MODIFIABLE_BY_ADMIN) { - $operations[] = l(t('edit'), 'admin/menu/menu/edit/'. $mid); + $operations[] = l(t('edit'), 'admin/build/menu/menu/edit/'. $mid); } if ($menu['items'][$mid]['type'] & MENU_CREATED_BY_ADMIN) { - $operations[] = l(t('delete'), 'admin/menu/menu/delete/'. $mid); + $operations[] = l(t('delete'), 'admin/build/menu/menu/delete/'. $mid); } - $operations[] = l(t('add item'), 'admin/menu/item/add/'. $mid); + $operations[] = l(t('add item'), 'admin/build/menu/item/add/'. $mid); $table = theme('item_list', $operations); $table .= theme('table', $header, menu_overview_tree_rows($mid)); $output .= theme('box', check_plain($title), $table); @@ -645,7 +653,7 @@ function menu_overview_tree_rows($pid = 0, $depth = 0) { else { // Set the edit column. if ($item['type'] & (MENU_VISIBLE_IN_TREE | MENU_VISIBLE_IF_HAS_CHILDREN)) { - $operations[] = array('data' => l(t('edit'), 'admin/menu/item/edit/'. $mid)); + $operations[] = array('data' => l(t('edit'), 'admin/build/menu/item/edit/'. $mid)); } else { $operations[] = array('data' => ''); @@ -658,18 +666,18 @@ function menu_overview_tree_rows($pid = 0, $depth = 0) { $operations[] = array('data' => ''); } else if ($item['type'] & MENU_VISIBLE_IN_TREE) { - $operations[] = array('data' => l(t('disable'), 'admin/menu/item/disable/'. $mid)); + $operations[] = array('data' => l(t('disable'), 'admin/build/menu/item/disable/'. $mid)); } else { - $operations[] = array('data' => l(t('enable'), 'admin/menu/item/edit/'. $mid)); + $operations[] = array('data' => l(t('enable'), 'admin/build/menu/item/edit/'. $mid)); } // Set the reset column. if ($item['type'] & MENU_CREATED_BY_ADMIN) { - $operations[] = array('data' => l(t('delete'), 'admin/menu/item/delete/'. $mid)); + $operations[] = array('data' => l(t('delete'), 'admin/build/menu/item/delete/'. $mid)); } else if ($item['type'] & MENU_MODIFIED_BY_ADMIN) { - $operations[] = array('data' => l(t('reset'), 'admin/menu/item/reset/'. $mid)); + $operations[] = array('data' => l(t('reset'), 'admin/build/menu/item/reset/'. $mid)); } else { $operations[] = array('data' => ''); diff --git a/modules/node/node.module b/modules/node/node.module index 7d0749e3a9f11b21f736249ff5b20faadae3edc2..cfa5140dea1b65be1eaad57a55677accba8504de 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -29,14 +29,14 @@ function node_help($section) { <li>search for content at <a href="%search">search</a>.</li> <li>administer nodes at <a href="%admin-settings-content-types">administer >> settings >> content types</a>.</li> </ul> -', array('%search' => url('search'), '%admin-settings-content-types' => url('admin/settings/content-types'))); +', array('%search' => url('search'), '%admin-settings-content-types' => url('admin/content/types'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%node">Node page</a>.', array('%node' => 'http://drupal.org/handbook/modules/node/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows content to be submitted to the site and displayed on pages.'); - case 'admin/node': + case 'admin/content/node': return t('<p>Below is a list of all of the posts on your site. Other forms of content are listed elsewhere (e.g. <a href="%comments">comments</a>).</p><p>Clicking a title views the post, while clicking an author\'s name views their user information.</p>', array('%comments' => url('admin/comment'))); - case 'admin/node/search': + case 'admin/content/search': return t('<p>Enter a simple pattern to search for a post. This can include the wildcard character *.<br />For example, a search for "br*" might return "bread bakers", "our daily bread" and "brenda".</p>'); } @@ -827,27 +827,49 @@ function node_link($type, $node = NULL, $teaser = FALSE) { */ function node_menu($may_cache) { $items = array(); - if ($may_cache) { - $items[] = array('path' => 'admin/node', 'title' => t('content'), + $items[] = array('path' => 'admin/content', + 'title' => t('content management'), + 'description' => t('Manage your site\'s content.'), + 'position' => 'left', + 'weight' => -10, + 'callback' => 'system_admin_menu_block_page', + 'access' => user_access('access configuration pages'), + ); + + $items[] = array( + 'path' => 'admin/content/node', + 'title' => t('posts'), + 'description' => t('View, edit, and delete your site\'s content.'), 'callback' => 'node_admin_nodes', - 'access' => user_access('administer nodes')); - $items[] = array('path' => 'admin/node/overview', 'title' => t('list'), + 'access' => user_access('administer nodes') + ); + + $items[] = array('path' => 'admin/content/node/overview', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); if (module_exist('search')) { - $items[] = array('path' => 'admin/node/search', 'title' => t('search'), + $items[] = array('path' => 'admin/content/search', 'title' => t('search posts'), + 'description' => t('Search posts by keyword.'), 'callback' => 'node_admin_search', 'access' => user_access('administer nodes'), - 'type' => MENU_LOCAL_TASK); + 'type' => MENU_NORMAL_ITEM); } - $items[] = array('path' => 'admin/settings/node', 'title' => t('posts'), + $items[] = array( + 'path' => 'admin/content/node-settings', + 'title' => t('post settings'), + 'description' => t('Control posting behavior, such as teaser length, requiring previews before posting, and the number of posts on the front page.'), 'callback' => 'node_configure', - 'access' => user_access('administer nodes')); - $items[] = array('path' => 'admin/settings/content-types', 'title' => t('content types'), + 'access' => user_access('administer nodes') + ); + $items[] = array( + 'path' => 'admin/content/types', + 'title' => t('content types'), + 'description' => t('Manage posts by content type, including default status, front page promotion, etc.'), 'callback' => 'node_types_configure', - 'access' => user_access('administer nodes')); + 'access' => user_access('administer nodes') + ); $items[] = array('path' => 'node', 'title' => t('content'), 'callback' => 'node_page', @@ -892,7 +914,7 @@ function node_menu($may_cache) { } } else if (arg(0) == 'admin' && arg(1) == 'settings' && arg(2) == 'content-types' && is_string(arg(3))) { - $items[] = array('path' => 'admin/settings/content-types/'. arg(3), + $items[] = array('path' => 'admin/content/types/'. arg(3), 'title' => t("'%name' content type", array('%name' => node_get_name(arg(3)))), 'type' => MENU_CALLBACK); } @@ -1208,7 +1230,7 @@ function node_multiple_delete_confirm() { return confirm_form('node_multiple_delete_confirm', $form, t('Are you sure you want to delete these items?'), - 'admin/node', t('This action cannot be undone.'), + 'admin/content/node', t('This action cannot be undone.'), t('Delete all'), t('Cancel')); } @@ -1219,7 +1241,7 @@ function node_multiple_delete_confirm_submit($form_id, $edit) { } drupal_set_message(t('The items have been deleted.')); } - return 'admin/node'; + return 'admin/content/node'; } /** @@ -1249,7 +1271,7 @@ function node_types_configure($type = NULL) { $rows = array(); foreach (node_get_types() as $type => $name) { - $rows[] = array($name, l(t('configure'), 'admin/settings/content-types/'. $type)); + $rows[] = array($name, l(t('configure'), 'admin/content/types/'. $type)); } return theme('table', $header, $rows); @@ -1376,7 +1398,7 @@ function node_revision_list($node) { } function node_admin_search() { - $output = search_form(url('admin/node/search'), $_POST['edit']['keys'], 'node') . search_data($_POST['edit']['keys'], 'node'); + $output = search_form(url('admin/content/search'), $_POST['edit']['keys'], 'node') . search_data($_POST['edit']['keys'], 'node'); return $output; } @@ -2008,7 +2030,7 @@ function node_page_default() { </li> </ol> <p>For more information, please refer to the <a href="%help">help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>', - array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support') + array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/settings/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support') ); $output = '<div id="first-time">'. $output .'</div>'; } diff --git a/modules/page/page.module b/modules/page/page.module index ff0e36ac261f9f0e38f2a3f7faa82821ac09ff4b..3a65ef24e8282a6f9ea5a0118f49c411133ba305 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -24,10 +24,10 @@ function page_help($section) { <li>create a page at <a href="%node-add-page">create content >> page</a>.</li> <li>administer page content type at <a href="%admin-settings-content-types-page">administer >> settings >> content types >> configure page</a>.</li> </ul> -', array('%admin-help-node' => url('admin/help/node'), '%admin-help-page' => url('admin/help/page'), '%admin-help-story' => url('admin/help/story'), '%node-add-page' => url('node/add/page'), '%admin-settings-content-types-page' => url('admin/settings/content-types/page'))); +', array('%admin-help-node' => url('admin/help/node'), '%admin-help-page' => url('admin/help/page'), '%admin-help-story' => url('admin/help/story'), '%node-add-page' => url('node/add/page'), '%admin-settings-content-types-page' => url('admin/content/types/page'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%page">Page page</a>.', array('%page' => 'http://drupal.org/handbook/modules/page/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables the creation of pages that can be added to the navigation system.'); case 'node/add#page': return t('If you want to add a static page, like a contact page or an about page, use a page.'); diff --git a/modules/path/path.module b/modules/path/path.module index e437e72f5e0080e4e01f677a720ac224351288ac..66a7a146c673e232b537aa552000dc647fbaee99 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -31,14 +31,14 @@ function path_help($section) { <li>read how to <a href="%external-http-drupal-org-node-15365">configure clean URLs</a> for your webserver. <li>enable clean url\'s to remove the =? at <a href="%admin-clean-url-settings">administer >> settings >> clean URLs</a>.</li> </ul> -', array('%admin-path-add' => url('admin/path/add'), '%admin-path' => url('admin/path'), '%external-http-drupal-org-node-15365' => 'http://drupal.org/node/15365', '%admin-clean-url-settings' => url('admin/settings/clean-urls'))); +', array('%admin-path-add' => url('admin/build/path/add'), '%admin-path' => url('admin/build/path'), '%external-http-drupal-org-node-15365' => 'http://drupal.org/node/15365', '%admin-clean-url-settings' => url('admin/settings/clean-urls'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%path">Path page</a>.', array('%path' => 'http://drupal.org/handbook/modules/path/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to rename URLs.'); - case 'admin/path': + case 'admin/build/path': return t("<p>Drupal provides users complete control over URLs through aliasing. This feature is typically used to make URLs human-readable or easy to remember. For example, one could map the relative URL 'node/1' onto 'about'. Each system path can have multiple aliases.</p>"); - case 'admin/path/add': + case 'admin/build/path/add': return t('<p>Enter the path you wish to create the alias for, followed by the name of the new alias.</p>'); } } @@ -50,20 +50,21 @@ function path_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/path', 'title' => t('url aliases'), + $items[] = array('path' => 'admin/build/path', 'title' => t('url aliases'), + 'description' => t('Change your site\'s URL paths by aliasing them.'), 'callback' => 'path_admin', 'access' => user_access('administer url aliases')); - $items[] = array('path' => 'admin/path/edit', 'title' => t('edit alias'), + $items[] = array('path' => 'admin/build/path/edit', 'title' => t('edit alias'), 'callback' => 'path_admin_edit', 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/path/delete', 'title' => t('delete alias'), + $items[] = array('path' => 'admin/build/path/delete', 'title' => t('delete alias'), 'callback' => 'path_admin_delete_confirm', 'access' => user_access('administer url aliases'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/path/list', 'title' => t('list'), + $items[] = array('path' => 'admin/build/path/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/path/add', 'title' => t('add alias'), + $items[] = array('path' => 'admin/build/path/add', 'title' => t('add alias'), 'callback' => 'path_admin_edit', 'access' => user_access('administer url aliases'), 'type' => MENU_LOCAL_TASK); @@ -104,7 +105,7 @@ function path_admin_delete_confirm($pid) { $form['pid'] = array('#type' => 'value', '#value' => $pid); $output = confirm_form('path_admin_delete_confirm', $form, t('Are you sure you want to delete path alias %title?', array('%title' => theme('placeholder', $path['dst']))), - $_GET['destination'] ? $_GET['destination'] : 'admin/path', t('This action cannot be undone.'), + $_GET['destination'] ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'), t('Delete'), t('Cancel') ); } @@ -117,7 +118,7 @@ function path_admin_delete_confirm($pid) { function path_admin_delete_confirm_submit($form_id, $form_values) { if ($form_values['confirm']) { path_admin_delete($form_values['pid']); - return 'admin/path'; + return 'admin/build/path'; } } @@ -299,7 +300,7 @@ function path_overview() { $destination = drupal_get_destination(); while ($data = db_fetch_object($result)) { - $rows[] = array($data->dst, $data->src, l(t('edit'), "admin/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/path/delete/$data->pid", array(), $destination)); + $rows[] = array($data->dst, $data->src, l(t('edit'), "admin/build/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/build/path/delete/$data->pid", array(), $destination)); } if (!$rows) { @@ -346,7 +347,7 @@ function path_form_submit() { path_set_alias($src, $dst, $pid); drupal_set_message(t('The alias has been saved.')); - return 'admin/path'; + return 'admin/build/path'; } } diff --git a/modules/ping/ping.module b/modules/ping/ping.module index 258639ef77974c066d5b07ec8a7de12eca424e32..a1482fa987af7065aa5ec62d515b7c19e8a01f0c 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -20,10 +20,10 @@ function ping_help($section) { <li>run your cron job at your sites <a href="%file-cron">cron page</a>.</li> <li>read about <a href="%external-http-drupal-org-node-23714">configuring cron jobs</a>.</li> </ul></p> -', array('%admin-modules' => url('admin/modules'), '%file-cron' => 'cron.php', '%external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714')); +', array('%admin-modules' => url('admin/settings/modules'), '%file-cron' => 'cron.php', '%external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%ping">Ping page</a>.', array('%ping' => 'http://drupal.org/handbook/modules/ping/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Alerts other sites when your site has been updated.'); } } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 6e941d65e02599090aa51b87b1fe7496dbc3113b..5d70681094eac944c7c1589cffb1f35ce5dcbe19 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -20,10 +20,10 @@ function poll_help($section) { <li>view the <a href="%poll">polls page</a>.</li> <li><a href="%admin-node-configure-types-poll">administer >> settings >> content types >> configure poll</a>.</li> </ul> -', array('%poll' => url('poll'), '%admin-node-configure-types-poll' => url('admin/settings/content-types/poll'))); +', array('%poll' => url('poll'), '%admin-node-configure-types-poll' => url('admin/content/types/poll'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%poll">Poll page</a>.', array('%poll' => 'http://drupal.org/handbook/modules/poll/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t("Allows your site to capture votes on different topics in the form of multiple choice questions."); case 'node/add#poll': return t("A poll is a multiple-choice question which visitors can vote on."); diff --git a/modules/profile/profile.module b/modules/profile/profile.module index a172f7b5b332d0d50b64d52c2e7030a5e4ac71c5..9e7dbf285b5c2536900daa2acbc21f68e70ca474 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -37,12 +37,12 @@ function profile_help($section) { <li>view user <a href="%profile">profiles</a>.</li> <li>administer profile settings: <a href="%admin-settings-profile">administer >> settings >> profiles</a>.</li> </ul> -', array('%profile' => url('profile'), '%admin-settings-profile' => url('admin/settings/profile'))); +', array('%profile' => url('profile'), '%admin-settings-profile' => url('admin/user/profile'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%profile">Profile page</a>.', array('%profile' => 'http://drupal.org/handbook/modules/profile/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Supports configurable user profiles.'); - case 'admin/settings/profile': + case 'admin/user/profile': return t('<p>Here you can define custom fields that users can fill in in their user profile (such as <em>country</em>, <em>real name</em>, <em>age</em>, ...).</p>'); } } @@ -59,23 +59,24 @@ function profile_menu($may_cache) { 'callback' => 'profile_browse', 'access' => user_access('access user profiles'), 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'admin/settings/profile', - 'title' => t('user profiles'), + $items[] = array('path' => 'admin/user/profile', + 'title' => t('profiles'), + 'description' => t('Create customizable fields for your users.'), 'callback' => 'profile_admin_overview'); - $items[] = array('path' => 'admin/settings/profile/add', + $items[] = array('path' => 'admin/user/profile/add', 'title' => t('add field'), 'callback' => 'profile_field_form', 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/settings/profile/autocomplete', + $items[] = array('path' => 'admin/user/profile/autocomplete', 'title' => t('profile category autocomplete'), 'callback' => 'profile_admin_settings_autocomplete', 'access' => user_access('administer users'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/settings/profile/edit', + $items[] = array('path' => 'admin/user/profile/edit', 'title' => t('edit field'), 'callback' => 'profile_field_form', 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/settings/profile/delete', + $items[] = array('path' => 'admin/user/profile/delete', 'title' => t('delete field'), 'callback' => 'profile_field_delete', 'type' => MENU_CALLBACK); @@ -110,7 +111,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { '#title' => t('Profile fields to display'), '#default_value' => variable_get('profile_block_author_fields', NULL), '#options' => $fields, - '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the <a href="%profile-admin">profile field configuration</a> are available.', array('%profile-admin' => url('admin/settings/profile'))), + '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the <a href="%profile-admin">profile field configuration</a> are available.', array('%profile-admin' => url('admin/user/profile'))), ); return $form; } @@ -221,7 +222,7 @@ function profile_field_form($arg = NULL) { $form['fields']['category'] = array('#type' => 'textfield', '#title' => t('Category'), '#default_value' => $edit['category'], - '#autocomplete_path' => 'admin/settings/profile/autocomplete', + '#autocomplete_path' => 'admin/user/profile/autocomplete', '#description' => t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'), '#required' => TRUE, ); @@ -337,7 +338,7 @@ function profile_field_form_submit($form_id, $form_values) { db_query("INSERT INTO {profile_fields} (title, name, explanation, category, type, weight, required, register, visibility, autocomplete, options, page) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, '%s', '%s')", $form_values['title'], $form_values['name'], $form_values['explanation'], $form_values['category'], $form_values['type'], $form_values['weight'], $form_values['required'], $form_values['register'], $form_values['visibility'], $form_values['autocomplete'], $form_values['options'], $form_values['page']); drupal_set_message(t('The field has been created.')); - watchdog('profile', t('Profile field %field added under category %category.', array('%field' => theme('placeholder', $form_values['title']), '%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile')); + watchdog('profile', t('Profile field %field added under category %category.', array('%field' => theme('placeholder', $form_values['title']), '%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); } else { db_query("UPDATE {profile_fields} SET title = '%s', name = '%s', explanation = '%s', category = '%s', weight = %d, required = %d, register = %d, visibility = %d, autocomplete = %d, options = '%s', page = '%s' WHERE fid = %d", $form_values['title'], $form_values['name'], $form_values['explanation'], $form_values['category'], $form_values['weight'], $form_values['required'], $form_values['register'], $form_values['visibility'], $form_values['autocomplete'], $form_values['options'], $form_values['page'], $form_values['fid']); @@ -346,7 +347,7 @@ function profile_field_form_submit($form_id, $form_values) { } cache_clear_all(); - return 'admin/settings/profile'; + return 'admin/user/profile'; } /** @@ -361,7 +362,7 @@ function profile_field_delete($fid) { $form['fid'] = array('#type' => 'value', '#value' => $fid); $form['title'] = array('#type' => 'value', '#value' => $field->title); - return confirm_form('profile_field_delete', $form, t('Are you sure you want to delete the field %field?', array('%field' => theme('placeholder', $field->title))), 'admin/settings/profile', t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="%edit-field">edit this field</a> and change it to a %hidden-field so that it may only be accessed by administrators.', array('%edit-field' => url('admin/settings/profile/edit/' . $fid), '%hidden-field' => theme('placeholder', t('hidden profile field')))), t('Delete'), t('Cancel')); + return confirm_form('profile_field_delete', $form, t('Are you sure you want to delete the field %field?', array('%field' => theme('placeholder', $field->title))), 'admin/user/profile', t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="%edit-field">edit this field</a> and change it to a %hidden-field so that it may only be accessed by administrators.', array('%edit-field' => url('admin/user/profile/edit/' . $fid), '%hidden-field' => theme('placeholder', t('hidden profile field')))), t('Delete'), t('Cancel')); } /** @@ -374,9 +375,9 @@ function profile_field_delete_submit($form_id, $form_values) { cache_clear_all(); drupal_set_message(t('The field %field has been deleted.', array('%field' => theme('placeholder', $form_values['title'])))); - watchdog('profile', t('Profile field %field deleted.', array('%field' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile')); + watchdog('profile', t('Profile field %field deleted.', array('%field' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); - return 'admin/settings/profile'; + return 'admin/user/profile'; } /** @@ -387,7 +388,7 @@ function profile_admin_overview() { $result = db_query('SELECT * FROM {profile_fields} ORDER BY category, weight'); $rows = array(); while ($field = db_fetch_object($result)) { - $rows[] = array(check_plain($field->title), $field->name, _profile_field_types($field->type), $field->category, l(t('edit'), "admin/settings/profile/edit/$field->fid"), l(t('delete'), "admin/settings/profile/delete/$field->fid")); + $rows[] = array(check_plain($field->title), $field->name, _profile_field_types($field->type), $field->category, l(t('edit'), "admin/user/profile/edit/$field->fid"), l(t('delete'), "admin/user/profile/delete/$field->fid")); } if (count($rows) == 0) { $rows[] = array(array('data' => t('No fields defined.'), 'colspan' => '6')); @@ -399,7 +400,7 @@ function profile_admin_overview() { $output .= '<h2>'. t('Add new field') .'</h2>'; $output .= '<ul>'; foreach (_profile_field_types() as $key => $value) { - $output .= '<li>'. l($value, "admin/settings/profile/add/$key") .'</li>'; + $output .= '<li>'. l($value, "admin/user/profile/add/$key") .'</li>'; } $output .= '</ul>'; diff --git a/modules/search/search.module b/modules/search/search.module index eb20518ed1e883607c04220c85b5c25561a8888a..66454797c3a604b9bfb033638cf5cd7ba5683d19 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -107,7 +107,7 @@ function search_help($section) { ', array('%admin-help-system' => url('admin/help/system'), '%file-cron' => 'cron.php', '%external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714', '%admin-settings-search' => url('admin/settings/search'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%search">Search page</a>.', array('%search' => 'http://drupal.org/handbook/modules/search/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables site-wide keyword searching.'); case 'admin/settings/search': return t(' @@ -152,12 +152,13 @@ function search_menu($may_cache) { if ($may_cache) { $items[] = array('path' => 'search', - 'title' => t('search'), + 'title' => t('search settings'), 'callback' => 'search_view', 'access' => user_access('search content'), 'type' => MENU_SUGGESTED_ITEM); $items[] = array('path' => 'admin/settings/search', 'title' => t('search'), + 'description' => t('Configure relevance settings for search and other indexing options'), 'callback' => 'search_admin_settings', 'access' => user_access('administer search'), 'type' => MENU_CALLBACK); diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 7d5a7fb60c3dd49e15bd5d0c9f0b1f68488ce6c5..f6015fa3527f1888fa936d1fd20bb38b053c7d2e 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -38,12 +38,12 @@ function statistics_help($section) { <li>view recent hits <a href="%admin-logs-hits">administer >> logs >> recent hits</a>.</li> <li>enable \'popular content\' block in block administration <a href="%admin-block">administer >> blocks </a> but only after you have enabled \'Count content views\' in settings.</li> </ul> -', array('%admin-settings-statistics' => url('admin/settings/statistics'), '%admin-logs' => url('admin/logs'), '%admin-logs-hits' => url('admin/logs/hits'), '%admin-block' => url('admin/block'))); +', array('%admin-settings-statistics' => url('admin/logs/settings'), '%admin-logs' => url('admin/logs'), '%admin-logs-hits' => url('admin/logs/hits'), '%admin-block' => url('admin/build/block'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%statistics">Statistics page</a>.', array('%statistics' => 'http://drupal.org/handbook/modules/statistics/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Logs access statistics for your site.'); - case 'admin/settings/statistics': + case 'admin/logs/settings': return t('<p>Settings for the statistical information that Drupal will keep about the site. See <a href="%statistics">site statistics</a> for the actual information.</p>', array('%statistics' => url('admin/logs/hits'))); case 'admin/logs/hits': return t('<p>This page shows you the most recent hits.</p>'); @@ -117,35 +117,41 @@ function statistics_menu($may_cache) { $items[] = array( 'path' => 'admin/logs/hits', 'title' => t('recent hits'), + 'description' => t('View pages that have recently been hit.'), 'callback' => 'statistics_recent_hits', 'access' => $access, 'weight' => 3); $items[] = array( 'path' => 'admin/logs/pages', 'title' => t('top pages'), + 'description' => t('View pages that have been hit frequently.'), 'callback' => 'statistics_top_pages', 'access' => $access, 'weight' => 1); $items[] = array( 'path' => 'admin/logs/visitors', 'title' => t('top visitors'), + 'description' => t('View visitors that hit many pages.'), 'callback' => 'statistics_top_visitors', 'access' => $access, 'weight' => 2); $items[] = array( 'path' => 'admin/logs/referrers', 'title' => t('referrers'), + 'description' => t('View top referrers.'), 'callback' => 'statistics_top_referrers', 'access' => $access); $items[] = array( 'path' => 'admin/logs/access', 'title' => t('details'), + 'description' => t('View access log.'), 'callback' => 'statistics_access_log', 'access' => $access, 'type' => MENU_CALLBACK); $items[] = array( - 'path' => 'admin/settings/access-logging', - 'title' => t('access logging'), + 'path' => 'admin/logs/settings', + 'title' => t('access log settings'), + 'description' => t('Control details about what and how your site logs.'), 'callback' => 'statistics_access_logging_settings', 'access' => user_access('administer site configuration'), 'type' => MENU_NORMAL_ITEM diff --git a/modules/story/story.module b/modules/story/story.module index b91c63a06a0c09795fecfe73964dc5082a8005bf..6fc602377297db0be88809daa3387aec5d85dac6 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -19,10 +19,10 @@ function story_help($section) { <li>post a story at <a href="%node-add-story">create content >> story</a>.</li> <li>configure story at <a href="%admin-settings-content-types-story">administer >> settings >> content types >> configure story</a>.</li> </ul> -', array('%node-add-story' => url('node/add/story'), '%admin-settings-content-types-story' => url('admin/settings/content-types/story'))); +', array('%node-add-story' => url('node/add/story'), '%admin-settings-content-types-story' => url('admin/content/types/story'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%story">Story page</a>.', array('%story' => 'http://drupal.org/handbook/modules/story/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to submit stories, articles or similar content.'); case 'node/add#story': return t('Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles.'); diff --git a/modules/system/system.module b/modules/system/system.module index 7c211927ec1064cbad0ca74e48063f1f7840da09..56950f5ebcd5e133105533ee73dff35854f4aaa7 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -28,19 +28,19 @@ function system_help($section) { ', array('%file-cron' => 'cron.php', '%external-http-drupal-org-cron' => 'http://drupal.org/cron', '%admin-settings' => url('admin/settings/caching'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%system">System page</a>.', array('%system' => 'http://drupal.org/handbook/modules/system/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Handles general site configuration for administrators.'); case 'admin': - return t('<p>Welcome to the administration section. Below are the most recent system events.</p>'); - case 'admin/themes': + return t('<p>Welcome to the administration section. Here you may control how your site functions.</p>'); + case 'admin/build/themes': return t('<p>Select which themes are available to your users and specify the default theme. To configure site-wide display settings, click the "configure" task above. Alternately, to override these settings in a specific theme, click the "configure" link for the corresponding theme. Note that different themes may have different regions available for rendering content like blocks. If you want consistency in what your users see, you may wish to enable only one theme.</p>'); - case 'admin/themes/settings': + case 'admin/build/themes/settings': return t('<p>These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.</p>'); - case 'admin/themes/settings/'. arg(3): + case 'admin/build/themes/settings/'. arg(3): $reference = explode('.', arg(3), 2); $theme = array_pop($reference); - return t('<p>These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="%global">global settings</a> for this theme.</p>', array('%template' => $theme, '%global' => url('admin/themes/settings'))); - case 'admin/modules': + return t('<p>These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="%global">global settings</a> for this theme.</p>', array('%template' => $theme, '%global' => url('admin/build/themes/settings'))); + case 'admin/settings/modules': return t('<p>Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new <a href="%permissions">permissions</a> might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the <a href="%throttle">throttle configuration page</a> after having enabled the throttle module.</p> <p>It is important that <a href="%update-php">update.php</a> is run every time a module is updated to a newer version.</p>', array('%permissions' => url('admin/access/permissions'), '%throttle' => url('admin/settings/throttle'), '%update-php' => $base_url .'/update.php')); } @@ -101,87 +101,138 @@ function system_menu($may_cache) { $items[] = array('path' => 'admin', 'title' => t('administer'), 'access' => user_access('access administration pages'), - 'callback' => 'watchdog_overview', + 'callback' => 'system_main_admin_page', 'weight' => 9); + $items[] = array('path' => 'admin/compact', 'title' => t('compact mode'), + 'access' => user_access('access administration pages'), + 'callback' => 'system_admin_compact_page', + 'type' => MENU_CALLBACK); + + // menu items that are basically just menu blocks + $items[] = array( + 'path' => 'admin/settings', + 'title' => t('site configuration'), + 'description' => t('Adjust basic site configuration options.'), + 'position' => 'right', + 'weight' => -5, + 'callback' => 'system_settings_overview', + 'access' => $access); + + $items[] = array('path' => 'admin/build', + 'title' => t('site building'), + 'description' => t('Control how your site looks and feels.'), + 'position' => 'right', + 'weight' => -10, + 'callback' => 'system_admin_menu_block_page', + 'access' => $access); + + $items[] = array( + 'path' => 'admin/settings/admin', + 'title' => t('administration page'), + 'description' => t('Settings for how your administrative pages should look.'), + 'position' => 'left', + 'callback' => 'system_admin_page_settings', + 'block callback' => 'system_admin_page_settings', + 'access' => $access); // Themes: - $items[] = array('path' => 'admin/themes', 'title' => t('themes'), + $items[] = array( + 'path' => 'admin/build/themes', + 'title' => t('themes'), + 'description' => t('Change which theme your site uses or allows users to set.'), 'callback' => 'system_themes', 'access' => $access); - $items[] = array('path' => 'admin/themes/select', 'title' => t('list'), - 'callback' => 'system_themes', 'access' => $access, - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1); - - $items[] = array('path' => 'admin/themes/settings', 'title' => t('configure'), - 'callback' => 'system_theme_settings', 'access' => $access, + $items[] = array( + 'path' => 'admin/build/themes/select', + 'title' => t('list'), + 'description' => t('Select the default theme.'), + 'callback' => 'system_themes', + 'access' => $access, + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -1); + + $items[] = array('path' => 'admin/build/themes/settings', + 'title' => t('configure'), + 'callback' => 'system_theme_settings', + 'access' => $access, 'type' => MENU_LOCAL_TASK); // Theme configuration subtabs - $items[] = array('path' => 'admin/themes/settings/global', 'title' => t('global settings'), + $items[] = array('path' => 'admin/build/themes/settings/global', 'title' => t('global settings'), 'callback' => 'system_theme_settings', 'access' => $access, 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1); foreach (list_themes() as $theme) { if ($theme->status) { - $items[] = array('path' => 'admin/themes/settings/'. $theme->name, 'title' => $theme->name, + $items[] = array('path' => 'admin/build/themes/settings/'. $theme->name, 'title' => $theme->name, 'callback' => 'system_theme_settings', 'callback arguments' => array($theme->name), 'access' => $access, 'type' => MENU_LOCAL_TASK); } } // Modules: - $items[] = array('path' => 'admin/modules', 'title' => t('modules'), - 'callback' => 'system_modules', 'access' => $access); + $items[] = array('path' => 'admin/settings/modules', + 'title' => t('modules'), + 'description' => t('Enable or disable add-on modules for your site.'), + 'weight' => -10, + 'callback' => 'system_modules', + 'access' => $access); // Settings: - $items[] = array( - 'path' => 'admin/settings', - 'title' => t('settings'), - 'callback' => 'system_settings_overview', - 'access' => $access); $items[] = array( 'path' => 'admin/settings/site-information', 'title' => t('site information'), + 'description' => t('Change basic site information, such as the site name, slogan, e-mail address, mission, front page and more.'), 'callback' => 'system_site_information_settings'); $items[] = array( 'path' => 'admin/settings/error-reporting', 'title' => t('error reporting'), + 'description' => t('Control how Drupal deals with errors including 403/404 erros as well as PHP error reporting.'), 'callback' => 'system_error_reporting_settings'); $items[] = array( 'path' => 'admin/settings/page-caching', 'title' => t('page caching'), + 'description' => t('Enable or disable page caching for anonymous users.'), 'callback' => 'system_page_caching_settings'); $items[] = array( 'path' => 'admin/settings/file-system', 'title' => t('file system'), + 'description' => t('Tell Drupal where to store uploaded files and how they are accessed.'), 'callback' => 'system_file_system_settings'); $items[] = array( 'path' => 'admin/settings/image-toolkit', 'title' => t('image toolkit'), + 'description' => t('Choose which image toolkit to use if you have installed optional toolkits.'), 'callback' => 'system_image_toolkit_settings'); $items[] = array( - 'path' => 'admin/settings/rss-feed', + 'path' => 'admin/content/rss-feed', 'title' => t('RSS feeds'), + 'description' => t('Configure the number of items per feed and whether feeds should be titles/teasers/full-text.'), 'callback' => 'system_rss_feeds_settings'); $items[] = array( 'path' => 'admin/settings/date-time', 'title' => t('date and time'), + 'description' => t('Settings for how Drupal displays date and time, as well as the system\'s default timezone.'), 'callback' => 'system_date_time_settings'); $items[] = array( 'path' => 'admin/settings/site-status', 'title' => t('site status'), + 'description' => t('Take the site off-line for maintenance or bring it back online.'), 'callback' => 'system_site_status_settings'); $items[] = array( 'path' => 'admin/settings/unicode', 'title' => t('unicode'), + 'description' => t('Unicode string handling settings.'), 'callback' => 'system_unicode_settings'); $items[] = array( 'path' => 'admin/settings/cron-status', 'title' => t('cron status'), + 'description' => t('View whether or not cron is running on your site.'), 'callback' => 'system_cron_status'); $items[] = array( 'path' => 'admin/settings/clean-urls', 'title' => t('clean URLs'), + 'description' => t('Enable or disable clean URLs for your site.'), 'callback' => 'system_clean_url_settings'); } @@ -210,6 +261,121 @@ function system_user($type, $edit, &$user, $category = NULL) { } } +/** + * Provide the administration overview page. + */ +function system_main_admin_page($arg = NULL) { + // If we received an argument, they probably meant some other page. + // Let's 404 them since the menu system cannot be told we do not + // accept arguments. + if ($arg !== NULL) { + return drupal_not_found(); + } + + $menu = menu_get_item(NULL, 'admin'); + usort($menu['children'], '_menu_sort'); + foreach ($menu['children'] as $mid) { + $block = menu_get_item($mid); + if ($block['block callback'] && function_exists($block['block callback'])) { + $arguments = isset($block['block arguments']) ? $block['block arguments'] : array(); + $block['content'] .= call_user_func_array($block['block callback'], $arguments); + } + $block['content'] .= theme('admin_block_content', system_admin_menu_block($block)); + $blocks[] = $block; + } + + return theme('admin_page', $blocks); +} + +/** + * Provide a single block on the administration overview page. + */ +function system_admin_menu_block($block) { + $content = array(); + if (is_array($block['children'])) { + usort($block['children'], '_menu_sort'); + foreach ($block['children'] as $mid) { + $item = menu_get_item($mid); + if ($item['type'] & MENU_VISIBLE_IN_TREE) { + $content[] = $item; + } + } + } + return $content; +} + +/** + * Provide a single block from the administration menu as a page. + * This function is often a destination for these blocks. + * For example, 'admin/page' needs to have a destination to be valid + * in the Drupal menu system, but too much information there might be + * hidden, so we supply the contents of the block. + */ +function system_admin_menu_block_page() { + $menu = menu_get_item(NULL, $_GET['q']); + $content = system_admin_menu_block($menu); + + $output = theme('admin_block_content', $content); + return $output; +} + +function system_admin_compact_page($mode = 'off') { + global $user; + user_save($user, array('admin_compact_mode' => ($mode == 'on'))); + drupal_goto('admin'); +} +/** + * This function provides a form to control the settings of the + * administration page. + */ +function system_admin_page_settings() { + $themes = system_theme_data(); + ksort($themes); + $options[0] = t('System default'); + foreach ($themes as $theme) { + $options[$theme->name] = $theme->name; + } + + $form['admin_theme'] = array( + '#type' => 'select', + '#options' => $options, + '#title' => t('Administration theme'), + '#description' => t('Choose which theme the administration pages should display in. If you choose "System default" the administration pages theme will display in the same theme the rest of the site uses.'), + '#default_value' => variable_get('admin_theme', 'bluemarine'), + ); + + // In order to give it our own submit, we have to give it the default submit + // too because the presence of a #submit will prevent the default #submit + // from being used. Also we want ours first. + $form['#submit']['system_admin_page_submit'] = array(); + $form['#submit']['system_settings_form_submit'] = array(); + + return system_settings_form('system_admin_page_form', $form); +} + + +function system_admin_page_submit($form_id, $form_values) { + // If we're changing themes, make sure the theme has its blocks initialized. + if ($form_values['admin_theme'] != variable_get('admin_theme', 'bluemarine')) { + $result = db_query("SELECT status FROM {blocks} WHERE theme = '%s'", $form_values['admin_theme']); + if (!db_num_rows($result)) { + system_initialize_theme_blocks($form_values['admin_theme']); + } + } +} + +/** + * Implementation of hook_init. This hook will set the theme to the + * administrative theme if the user is looking at a page in the + * admin/* tree. + */ +function system_init() { + if (arg(0) == 'admin') { + global $custom_theme; + $custom_theme = variable_get('admin_theme', 'bluemarine'); + } +} + /* * Returns a fieldset containing the theme select form. * @@ -916,7 +1082,7 @@ function system_themes() { $status[] = $info->name; } if ($info->status && (function_exists($info->prefix . '_settings') || function_exists($info->prefix . '_features'))) { - $form[$info->name]['operations'] = array('#type' => 'markup', '#value' => l(t('configure'), 'admin/themes/settings/' . $info->name) ); + $form[$info->name]['operations'] = array('#type' => 'markup', '#value' => l(t('configure'), 'admin/build/themes/settings/' . $info->name) ); } else { // Dummy element for form_render. Cleaner than adding a check in the theme function. @@ -980,7 +1146,7 @@ function system_themes_submit($form_id, $values) { menu_rebuild(); drupal_set_message(t('The configuration options have been saved.')); - return 'admin/themes'; + return 'admin/build/themes'; } /** @@ -999,7 +1165,7 @@ function system_modules() { drupal_get_filename('module', $file->name, $file->filename); drupal_load('module', $file->name); - $file->description = module_invoke($file->name, 'help', 'admin/modules#description'); + $file->description = module_invoke($file->name, 'help', 'admin/settings/modules#description'); $form['name'][$file->name] = array('#value' => $file->name); $form['description'][$file->name] = array('#value' => $file->description); @@ -1115,7 +1281,7 @@ function system_modules_submit($form_id, $edit) { menu_rebuild(); drupal_set_message(t('The configuration options have been saved.')); - return 'admin/modules'; + return 'admin/settings/modules'; } @@ -1124,25 +1290,21 @@ function system_modules_submit($form_id, $edit) { */ function system_settings_overview() { - // Check database setup if necessary - if (function_exists('db_check_setup') && empty($_POST)) { - db_check_setup(); - } + // Check database setup if necessary + if (function_exists('db_check_setup') && empty($_POST)) { + db_check_setup(); + } - $output = '<ul>'; - $menu = menu_get_item(NULL, 'admin/settings'); - usort($menu['children'], '_menu_sort'); - foreach ($menu['children'] as $mid) { - $output .= ' <li>'. menu_item_link($mid) .'</li>'; - } - $output .= '</ul>'; + $menu = menu_get_item(NULL, 'admin/settings'); + $content = system_admin_menu_block($menu); - // TODO: remove this: - foreach (module_implements('settings') as $module) { - drupal_set_message("$module settings inaccessible: module needs updating because the _settings hook has been deprecated."); - } + $output = theme('admin_block_content', $content); + // TODO: remove this: + foreach (module_implements('settings') as $module) { + drupal_set_message("$module settings inaccessible: module needs updating because the _settings hook has been deprecated."); + } - return $output; + return $output; } /** @@ -1376,3 +1538,114 @@ function confirm_form($form_id, $form, $question, $path, $description = NULL, $y $form['actions']['cancel'] = array('#value' => l($no ? $no : t('Cancel'), $path)); return drupal_get_form($form_id, $form, 'confirm_form'); } + +/** + * Determine if a user is in compact mode. + */ +function system_admin_compact_mode() { + global $user; + return (isset($user->admin_compact_mode)) ? $user->admin_compact_mode : variable_get('admin_compact_mode', FALSE); +} + +/** + * This function formats an administrative page for viewing. + * + * @param $blocks + * An array of blocks to display. Each array should include a + * 'title', a 'description', a formatted 'content' and a + * 'position' which will control which container it will be + * in. This is usually 'left' or 'right'. + * @themeable + */ +function theme_admin_page($blocks) { + foreach ($blocks as $block) { + if ($block_output = theme('admin_block', $block)) { + if (!$block['position']) { + // perform automatic striping. + $block['position'] = $stripe++ % 2 ? 'left' : 'right'; + } + $container[$block['position']] .= $block_output; + } + } + + $output = '<div class="admin">'; + $output .= '<div class="compact-link">'; + if (system_admin_compact_mode()) { + $alt = t('Produce a less compact layout that includes descriptions.'); + $output .= l(t('Show descriptions'), 'admin/compact/off', array('alt' => $alt, 'title' => $alt)); + } + else { + $alt = t('Produce a more compact layout that doesn\'t include descriptions.'); + $output .= l(t('Hide descriptions'), 'admin/compact/on', array('alt' => $alt, 'title' => $alt)); + } + $output .= '</div>'; + + foreach ($container as $id => $data) { + $output .= '<div class="'. $id .'">'; + $output .= $data; + $output .= '</div>'; + } + $output .= '</div>'; + return $output; +} + +/** + * This function formats an administrative block for display. + * + * @param $block + * An array containing information about the block. It should + * include a 'title', a 'description' and a formatted 'content'. + * @themeable + */ +function theme_admin_block($block) { + // Don't display the block if it has no content to display. + if (!$block['content']) { + return ''; + } + + $output = <<< EOT + <div class="admin-panel collapsible"> + <div class="head"> + $block[title] + </div> + <div class="body"> + <div class="description"> + $block[description] + </div> + $block[content] + </div> + </div> +EOT; + return $output; +} + +/** + * This function formats the content of an administrative block. + * + * @param $block + * An array containing information about the block. It should + * include a 'title', a 'description' and a formatted 'content'. + * @themeable + */ +function theme_admin_block_content($content) { + if (!$content) { + return ''; + } + + if (system_admin_compact_mode()) { + $output = '<ul class="menu">'; + foreach ($content as $item) { + $output .= '<li class="leaf">'. l($item['title'], $item['path'], array('alt' => $item['description'], 'title' => $item['description'])) .'</li>'; + } + $output .= '</ul>'; + } + else { + $output = '<dl class="admin-list">'; + foreach ($content as $item) { + $output .= '<dt>'. l($item['title'], $item['path']) .'</dt>'; + $output .= '<dd>'. $item['description'] .'</dd>'; + } + $output .= '</dl>'; + } + return $output; +} diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index edb8386d9b4714c1223ab09da742feef2413639c..ee72e79eca3f5d5bb5dabf0a1c0853b6c4a397a6 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -62,29 +62,30 @@ function taxonomy_menu($may_cache) { $items = array(); if ($may_cache) { - $items[] = array('path' => 'admin/taxonomy', + $items[] = array('path' => 'admin/content/taxonomy', 'title' => t('categories'), + 'description' => t('Create vocabularies and terms to categorize your content.'), 'callback' => 'taxonomy_overview_vocabularies', 'access' => user_access('administer taxonomy')); - $items[] = array('path' => 'admin/taxonomy/list', + $items[] = array('path' => 'admin/content/taxonomy/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/taxonomy/add/vocabulary', + $items[] = array('path' => 'admin/content/taxonomy/add/vocabulary', 'title' => t('add vocabulary'), 'callback' => 'taxonomy_admin_vocabulary_edit', 'access' => user_access('administer taxonomy'), 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/taxonomy/edit/vocabulary', + $items[] = array('path' => 'admin/content/taxonomy/edit/vocabulary', 'title' => t('edit vocabulary'), 'callback' => 'taxonomy_admin_vocabulary_edit', 'access' => user_access('administer taxonomy'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/taxonomy/edit/term', + $items[] = array('path' => 'admin/content/taxonomy/edit/term', 'title' => t('edit term'), 'callback' => 'taxonomy_admin_term_edit', 'access' => user_access('administer taxonomy'), @@ -104,19 +105,19 @@ function taxonomy_menu($may_cache) { } else { if (is_numeric(arg(2))) { - $items[] = array('path' => 'admin/taxonomy/' . arg(2), + $items[] = array('path' => 'admin/content/taxonomy/' . arg(2), 'title' => t('list terms'), 'callback' => 'taxonomy_overview_terms', 'callback arguments' => array(arg(2)), 'access' => user_access('administer taxonomy'), 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/taxonomy/' . arg(2) . '/list', + $items[] = array('path' => 'admin/content/taxonomy/' . arg(2) . '/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/taxonomy/' . arg(2) . '/add/term', + $items[] = array('path' => 'admin/content/taxonomy/' . arg(2) . '/add/term', 'title' => t('add term'), 'callback' => 'taxonomy_form_term', 'callback arguments' => array(array('vid' => arg(2))), @@ -142,9 +143,9 @@ function taxonomy_overview_vocabularies() { } $rows[] = array('name' => check_plain($vocabulary->name), 'type' => implode(', ', $types), - 'edit' => l(t('edit vocabulary'), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), - 'list' => l(t('list terms'), "admin/taxonomy/$vocabulary->vid"), - 'add' => l(t('add terms'), "admin/taxonomy/$vocabulary->vid/add/term") + 'edit' => l(t('edit vocabulary'), "admin/content/taxonomy/edit/vocabulary/$vocabulary->vid"), + 'list' => l(t('list terms'), "admin/content/taxonomy/$vocabulary->vid"), + 'add' => l(t('add terms'), "admin/content/taxonomy/$vocabulary->vid/add/term") ); } if (empty($rows)) { @@ -175,7 +176,7 @@ function taxonomy_overview_terms($vid) { foreach ($tree as $term) { $total_entries++; // we're counting all-totals, not displayed if (($start_from && ($start_from * $page_increment) >= $total_entries) || ($displayed_count == $page_increment)) { continue; } - $rows[] = array(_taxonomy_depth($term->depth) . ' ' . l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/taxonomy/edit/term/$term->tid", array(), $destination)); + $rows[] = array(_taxonomy_depth($term->depth) . ' ' . l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination)); $displayed_count++; // we're counting tids displayed } @@ -285,7 +286,7 @@ function taxonomy_form_vocabulary_submit($form_id, $form_values) { drupal_set_message(t('Updated vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); break; } - return 'admin/taxonomy'; + return 'admin/content/taxonomy'; } function taxonomy_save_vocabulary(&$edit) { @@ -344,7 +345,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { return confirm_form('taxonomy_vocabulary_confirm_delete', $form, t('Are you sure you want to delete the vocabulary %title?', array('%title' => theme('placeholder', $vocabulary->name))), - 'admin/taxonomy', t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), + 'admin/content/taxonomy', t('Deleting a vocabulary will delete all the terms in it. This action cannot be undone.'), t('Delete'), t('Cancel')); } @@ -352,7 +353,7 @@ function _taxonomy_confirm_del_vocabulary($vid) { function taxonomy_vocabulary_confirm_delete_submit($form_id, $form_values) { $status = taxonomy_del_vocabulary($form_values['vid']); drupal_set_message(t('Deleted vocabulary %name.', array('%name' => theme('placeholder', $form_values['name'])))); - return 'admin/taxonomy'; + return 'admin/content/taxonomy'; } function taxonomy_form_term($edit = array()) { @@ -424,7 +425,7 @@ function taxonomy_form_term_submit($form_id, $form_values) { drupal_set_message(t('The term %term has been updated.', array('%term' => theme('placeholder', $form_values['name'])))); break; } - return 'admin/taxonomy'; + return 'admin/content/taxonomy'; } function taxonomy_save_term(&$edit) { @@ -530,7 +531,7 @@ function _taxonomy_confirm_del_term($tid) { return confirm_form('taxonomy_term_confirm_delete', $form, t('Are you sure you want to delete the term %title?', array('%title' => theme('placeholder', $term->name))), - 'admin/taxonomy', + 'admin/content/taxonomy', t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), t('Delete'), t('Cancel')); @@ -539,7 +540,7 @@ function _taxonomy_confirm_del_term($tid) { function taxonomy_term_confirm_delete_submit($form_id, $form_values) { taxonomy_del_term($form_values['tid']); drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $form_values['name'])))); - return 'admin/taxonomy'; + return 'admin/content/taxonomy'; } /** @@ -1343,14 +1344,14 @@ function taxonomy_help($section) { <li>restrict content access by category for specific users roles using the <a href="%external-http-drupal-org-project-taxonomy_access">taxonomy access module</a>.</li> <li>build a custom view of your categories using the <a href="%external-http-drupal-org-project-taxonomy_browser">taxonomy browser</a>.</li> </ul> -', array('%admin-taxonomy-add-vocabulary' => url('admin/taxonomy/add/vocabulary'), '%admin-taxonomy' => url('admin/taxonomy'), '%external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '%external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); +', array('%admin-taxonomy-add-vocabulary' => url('admin/content/taxonomy/add/vocabulary'), '%admin-taxonomy' => url('admin/content/taxonomy'), '%external-http-drupal-org-project-taxonomy_access' => 'http://drupal.org/project/taxonomy_access', '%external-http-drupal-org-project-taxonomy_browser' => 'http://drupal.org/project/taxonomy_browser')); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%taxonomy">Taxonomy page</a>.', array('%taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables the categorization of content.'); - case 'admin/taxonomy': + case 'admin/content/taxonomy': return t('<p>The taxonomy module allows you to classify content into categories and subcategories; it allows multiple lists of categories for classification (controlled vocabularies) and offers the possibility of creating thesauri (controlled vocabularies that indicate the relationship of terms), taxonomies (controlled vocabularies where relationships are indicated hierarchically), and free vocabularies where terms, or tags, are defined during content creation. To view and manage the terms of each vocabulary, click on the associated <em>list terms</em> link. To delete a vocabulary and all its terms, choose "edit vocabulary".</p>'); - case 'admin/taxonomy/add/vocabulary': + case 'admin/content/taxonomy/add/vocabulary': return t("<p>When you create a controlled vocabulary you are creating a set of terms to use for describing content (known as descriptors in indexing lingo). Drupal allows you to describe each piece of content (blog, story, etc.) using one or many of these terms. For simple implementations, you might create a set of categories without subcategories, similar to Slashdot.org's or Kuro5hin.org's sections. For more complex implementations, you might create a hierarchical list of categories.</p>"); } } diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module index 56f147e263d277f45806c948935fe7011e05e5f4..52aa2ddfceff72f269a924c7388f2abdfee49a04 100644 --- a/modules/throttle/throttle.module +++ b/modules/throttle/throttle.module @@ -12,6 +12,7 @@ function throttle_menu($may_cache) { if ($may_cache) { $items[] = array( 'path' => 'admin/settings/throttle', + 'description' => t('Control how your site cuts out content during heavy load.'), 'title' => t('throttle'), 'callback' => 'throttle_admin_settings', 'access' => user_access('administer site configuration'), @@ -128,10 +129,10 @@ function throttle_help($section) { <li>enable throttle for blocks at <a href="%admin-block">administer >> block</a>.</li> <li>administer throttle at <a href="%admin-settings-throttle">administer >> settings >> throttle</a>.</li> </ul> -', array('%admin-modules' => url('admin/modules'), '%admin-block' => url('admin/block'), '%admin-settings-throttle' => url('admin/settings/throttle'))); +', array('%admin-modules' => url('admin/settings/modules'), '%admin-block' => url('admin/build/block'), '%admin-settings-throttle' => url('admin/settings/throttle'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%throttle">Throttle page</a>.', array('%throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Handles the auto-throttling mechanism, to control site congestion.'); case 'admin/settings/throttle': return t('If your site gets linked to by a popular website, or otherwise comes under a "Denial of Service" (DoS) attack, your webserver might become overwhelmed. This module provides a congestion control throttling mechanism for automatically detecting a surge in incoming traffic. This mechanism is utilized by other Drupal modules to automatically optimize their performance by temporarily disabling CPU-intensive functionality.'); diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 7480c1d5dbe3033b60c7464e1c867ae339a702c8..2e3e71bfca5c4c0be6954a3c8d9cf7e039f490cc 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -23,7 +23,7 @@ function tracker_help($section) { ', array('%tracker' => url('tracker'), '%profile' => url('profile'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%tracker">Tracker page</a>.', array('%tracker' => 'http://drupal.org/handbook/modules/tracker/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Enables tracking of recent posts for users.'); } } diff --git a/modules/upload/upload.module b/modules/upload/upload.module index a07ecbc2632862683fc81b8494b24670574e2890..99455281d9bc1708457f64ee4f712fcb4d26ba35 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -21,13 +21,13 @@ function upload_help($section) { <li>administer content at <a href="%admin-content-types">administer >> settings >> content types</a>.</li> <li>administer upload at <a href="%admin-upload">administer >> settings >> upload</a>.</li> </ul> -', array('%admin-access' => url('admin/access'), '%admin-content-types' => url('admin/settings/content-types'), '%admin-upload' => url('admin/settings/upload'))); +', array('%admin-access' => url('admin/access'), '%admin-content-types' => url('admin/settings/types'), '%admin-upload' => url('admin/settings/upload'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%upload">Upload page</a>.', array('%upload' => 'http://drupal.org/handbook/modules/upload/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows users to upload and attach files to content.'); case 'admin/settings/upload': - return t('<p>Users with the <a href="%permissions">upload files permission</a> can upload attachments. Users with the <a href="%permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="%types">content types settings</a> page.</p>', array('%permissions' => url('admin/access'), '%types' => url('admin/settings/content-types'))); + return t('<p>Users with the <a href="%permissions">upload files permission</a> can upload attachments. Users with the <a href="%permissions">view uploaded files permission</a> can view uploaded attachments. You can choose which post types can take attachments on the <a href="%types">content types settings</a> page.</p>', array('%permissions' => url('admin/access'), '%types' => url('admin/settings/types'))); } } @@ -80,6 +80,7 @@ function upload_menu($may_cache) { ); $items[] = array('path' => 'admin/settings/uploads', 'title' => t('file uploads'), + 'description' => t('Control how files may be attached to content.'), 'callback' => 'upload_admin_settings', 'access' => user_access('administer site configuration'), 'type' => MENU_NORMAL_ITEM); diff --git a/modules/user/user.module b/modules/user/user.module index 85ddd692e9e819a0b0c9b8a1e96a53cdc79279dc..e77b6c26923ae46c732c29e6e07cd1100b7693e8 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -688,50 +688,59 @@ function user_menu($may_cache) { 'callback' => 'user_help_page', 'type' => MENU_CALLBACK); // Admin user pages - $items[] = array('path' => 'admin/user', 'title' => t('users'), + $items[] = array('path' => 'admin/user', + 'title' => t('user management'), + 'description' => t('Manage your site\'s users, groups and access to site features.'), + 'position' => 'left', + 'callback' => 'system_admin_menu_block_page', + 'access' => user_access('access configuration pages'), + ); + $items[] = array('path' => 'admin/user/user', 'title' => t('users'), + 'description' => t('List, add, and edit users.'), 'callback' => 'user_admin', 'access' => $admin_access); - $items[] = array('path' => 'admin/user/list', 'title' => t('list'), + $items[] = array('path' => 'admin/user/user/list', 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/user/create', 'title' => t('add user'), + $items[] = array('path' => 'admin/user/user/create', 'title' => t('add user'), 'callback' => 'user_admin', 'access' => $admin_access, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/settings/user', 'title' => t('users'), + $items[] = array('path' => 'admin/user/settings', 'title' => t('user settings'), + 'description' => t('Configure default behavior of users, including registration requirements, e-mails, and user pictures.'), 'callback' => 'user_admin_settings'); // Admin access pages - $items[] = array('path' => 'admin/access', 'title' => t('access control'), + $items[] = array('path' => 'admin/user/access', 'title' => t('access control'), + 'description' => t('Determine access to features by selecting permissions for roles.'), 'callback' => 'user_admin_perm', 'access' => $access_access); - $items[] = array('path' => 'admin/access/permissions', 'title' => t('permissions'), - 'callback' => 'user_admin_perm', 'access' => $access_access, - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/access/roles', 'title' => t('roles'), + $items[] = array('path' => 'admin/user/roles', 'title' => t('roles'), + 'description' => t('List, edit, or add user roles.'), 'callback' => 'user_admin_role', 'access' => $access_access, - 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/access/roles/edit', 'title' => t('edit role'), + 'type' => MENU_NORMAL_ITEM); + $items[] = array('path' => 'admin/user/roles/edit', 'title' => t('edit role'), 'callback' => 'user_admin_role', 'access' => $access_access, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/access/rules', 'title' => t('access rules'), - 'callback' => 'user_admin_access', 'access' => $access_access, - 'type' => MENU_LOCAL_TASK, 'weight' => 10); - $items[] = array('path' => 'admin/access/rules/list', 'title' => t('list'), + $items[] = array('path' => 'admin/user/rules', 'title' => t('access rules'), + 'description' => t('List and create rules to disallow usernames, e-mail addresses, and IP addresses.'), + 'callback' => 'user_admin_access', 'access' => $access_access); + $items[] = array('path' => 'admin/user/rules/list', 'title' => t('list'), 'access' => $access_access, 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'admin/access/rules/add', 'title' => t('add rule'), + $items[] = array('path' => 'admin/user/rules/add', 'title' => t('add rule'), 'callback' => 'user_admin_access_add', 'access' => $access_access, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/access/rules/check', 'title' => t('check rules'), + $items[] = array('path' => 'admin/user/rules/check', 'title' => t('check rules'), 'callback' => 'user_admin_access_check', 'access' => $access_access, 'type' => MENU_LOCAL_TASK); - $items[] = array('path' => 'admin/access/rules/edit', 'title' => t('edit rule'), + $items[] = array('path' => 'admin/user/rules/edit', 'title' => t('edit rule'), 'callback' => 'user_admin_access_edit', 'access' => $access_access, 'type' => MENU_CALLBACK); - $items[] = array('path' => 'admin/access/rules/delete', 'title' => t('delete rule'), + $items[] = array('path' => 'admin/user/rules/delete', 'title' => t('delete rule'), 'callback' => 'user_admin_access_delete', 'access' => $access_access, 'type' => MENU_CALLBACK); if (module_exist('search')) { - $items[] = array('path' => 'admin/user/search', 'title' => t('search'), + $items[] = array('path' => 'admin/user/search', 'title' => t('search users'), + 'description' => t('Search users by name.'), 'callback' => 'user_admin', 'access' => $admin_access, - 'type' => MENU_LOCAL_TASK); + 'type' => MENU_NORMAL_ITEM); } // Your personal page @@ -1141,7 +1150,7 @@ function user_register() { '#type' => 'checkbox', '#title' => t('Notify user of new account') ); - // Redirect back to page which initiated the create request; usually admin/user/create + // Redirect back to page which initiated the create request; usually admin/user/user/create $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } $extra = _user_forms($null, $null, $null, 'register'); @@ -1352,7 +1361,7 @@ function user_edit($category = 'account') { $account = user_load(array('uid' => arg(1))); if ($account === FALSE) { drupal_set_message(t('The account does not exist or has already been deleted.')); - drupal_goto('admin/user'); + drupal_goto('admin/user/user'); } $edit = $_POST['op'] ? $_POST['edit'] : (array)$account; @@ -1365,7 +1374,7 @@ function user_edit($category = 'account') { watchdog('user', t('Deleted user: %name %email.', array('%name' => theme('placeholder', $account->name), '%email' => theme('placeholder', '<'. $account->mail .'>'))), WATCHDOG_NOTICE); drupal_set_message(t('The account has been deleted.')); module_invoke_all('user', 'delete', $edit, $account); - drupal_goto('admin/user'); + drupal_goto('admin/user/user'); } else { return confirm_form('user_confirm_delete', array(), t('Are you sure you want to delete the account %name?', array('%name' => theme('placeholder', $account->name))), 'user/'. $account->uid, t('All submissions made by this user will be attributed to the anonymous account. This action cannot be undone.'), t('Delete'), t('Cancel')); @@ -1556,7 +1565,7 @@ function user_admin_access_add($mask = NULL, $type = NULL) { $aid = db_next_id('{access}_aid'); db_query("INSERT INTO {access} (aid, mask, type, status) VALUES ('%s', '%s', '%s', %d)", $aid, $edit['mask'], $edit['type'], $edit['status']); drupal_set_message(t('The access rule has been added.')); - drupal_goto('admin/access/rules'); + drupal_goto('admin/user/rules'); } } else { @@ -1581,7 +1590,7 @@ function user_admin_access_delete($aid = 0) { $form['aid'] = array('#type' => 'hidden', '#value' => $aid); $output = confirm_form('user_admin_access_delete_confirm', $form, t('Are you sure you want to delete the %type rule for %rule?', array('%type' => $access_types[$edit->type], '%rule' => theme('placeholder', $edit->mask))), - 'admin/access/rules', + 'admin/user/rules', t('This action cannot be undone.'), t('Delete'), t('Cancel')); @@ -1591,7 +1600,7 @@ function user_admin_access_delete($aid = 0) { function user_admin_access_delete_confirm_submit($form_id, $edit) { db_query('DELETE FROM {access} WHERE aid = %d', $edit['aid']); drupal_set_message(t('The access rule has been deleted.')); - return 'admin/access/rules'; + return 'admin/user/rules'; } /** @@ -1605,7 +1614,7 @@ function user_admin_access_edit($aid = 0) { else { db_query("UPDATE {access} SET mask = '%s', type = '%s', status = '%s' WHERE aid = %d", $edit['mask'], $edit['type'], $edit['status'], $aid); drupal_set_message(t('The access rule has been saved.')); - drupal_goto('admin/access/rules'); + drupal_goto('admin/user/rules'); } } else { @@ -1652,7 +1661,7 @@ function user_admin_access() { $access_types = array('user' => t('username'), 'mail' => t('e-mail'), 'host' => t('host')); $rows = array(); while ($rule = db_fetch_object($result)) { - $rows[] = array($rule->status ? t('allow') : t('deny'), $access_types[$rule->type], $rule->mask, l(t('edit'), 'admin/access/rules/edit/'. $rule->aid), l(t('delete'), 'admin/access/rules/delete/'. $rule->aid)); + $rows[] = array($rule->status ? t('allow') : t('deny'), $access_types[$rule->type], $rule->mask, l(t('edit'), 'admin/user/rules/edit/'. $rule->aid), l(t('delete'), 'admin/user/rules/delete/'. $rule->aid)); } if (count($rows) == 0) { $rows[] = array(array('data' => '<em>'. t('There are currently no access rules.') .'</em>', 'colspan' => 5)); @@ -1701,7 +1710,7 @@ function user_admin_perm($str_rids = NULL) { if($rids) { $breadcrumbs = drupal_get_breadcrumb(); - $breadcrumbs[] = l(t('all roles'), 'admin/access'); + $breadcrumbs[] = l(t('all roles'), 'admin/user/access'); drupal_set_breadcrumb($breadcrumbs); $result = db_query('SELECT r.rid, p.perm FROM {role} r LEFT JOIN {permission} p ON r.rid = p.rid WHERE r.rid IN (%s) ORDER BY name', implode(', ', $rids)); } @@ -1747,7 +1756,7 @@ function user_admin_perm($str_rids = NULL) { // Have to build checkboxes here after checkbox arrays are built foreach ($role_names as $rid => $name) { $form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => $status[$rid]); - $form['role_names'][$rid] = array('#type' => 'markup', '#value' => l($name, 'admin/access/'. $rid), '#tree' => TRUE); + $form['role_names'][$rid] = array('#type' => 'markup', '#value' => l($name, 'admin/user/access/'. $rid), '#tree' => TRUE); } $form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions')); @@ -1824,7 +1833,7 @@ function user_admin_role() { if ($edit['name']) { db_query("UPDATE {role} SET name = '%s' WHERE rid = %d", $edit['name'], $id); drupal_set_message(t('The changes have been saved.')); - drupal_goto('admin/access/roles'); + drupal_goto('admin/user/roles'); } else { form_set_error('name', t('You must specify a valid role name.')); @@ -1837,13 +1846,13 @@ function user_admin_role() { db_query('DELETE FROM {users_roles} WHERE rid = %d', $id); drupal_set_message(t('The role has been deleted.')); - drupal_goto('admin/access/roles'); + drupal_goto('admin/user/roles'); } else if ($op == t('Add role')) { if ($edit['name']) { db_query("INSERT INTO {role} (name) VALUES ('%s')", $edit['name']); drupal_set_message(t('The role has been added.')); - drupal_goto('admin/access/roles'); + drupal_goto('admin/user/roles'); } else { form_set_error('name', t('You must specify a valid role name.')); @@ -1866,7 +1875,7 @@ function theme_user_admin_new_role($form) { $header = array(t('Name'), t('Operations')); foreach (user_roles() as $rid => $name) { if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) { - $rows[] = array($name, l(t('edit'), 'admin/access/roles/edit/'. $rid)); + $rows[] = array($name, l(t('edit'), 'admin/user/roles/edit/'. $rid)); } else { $rows[] = array($name, '<span class="disabled">'. t('locked') .'</span>'); @@ -1948,7 +1957,7 @@ function user_admin() { switch ($op) { case 'search': case t('Search'): - $output = search_form(url('admin/user/search'), $_POST['edit']['keys'], 'user') . search_data($_POST['edit']['keys'], 'user'); + $output = search_form(url('admin/user/user/search'), $_POST['edit']['keys'], 'user') . search_data($_POST['edit']['keys'], 'user'); break; case t('Create new account'): case 'create': @@ -1978,27 +1987,27 @@ function user_help($section) { <li>read user profile help at <a href="%admin-help-profile">administer >> help >> profile</a>.</li> <li>read about distributed authentication in the system module help at <a href="%admin-help-system">administer >> help >> system</a>.</li> </ul> -', array('%user' => url('user'), '%admin-user' => url('admin/user'), '%admin-themes' => url('admin/themes'), '%admin-help-profile' => url('admin/help/profile'), '%admin-help-system' => url('admin/help/system'))); +', array('%user' => url('user'), '%admin-user' => url('admin/user/user'), '%admin-themes' => url('admin/themes'), '%admin-help-profile' => url('admin/help/profile'), '%admin-help-system' => url('admin/help/system'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%user">User page</a>.', array('%user' => 'http://drupal.org/handbook/modules/user/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Manages the user registration and login system.'); - case 'admin/user': + case 'admin/user/user': return t('<p>Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.</p>'); - case 'admin/user/create': - case 'admin/user/account/create': + case 'admin/user/user/create': + case 'admin/user/user/account/create': return t('<p>This web page allows the administrators to register a new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.</p>'); - case strstr($section, 'admin/access/rules'): + case strstr($section, 'admin/user/rules'): return t('<p>Set up username and e-mail address access rules for new <em>and</em> existing accounts (currently logged in accounts will not be logged out). If a username or e-mail address for an account matches any deny rule, but not an allow rule, then the account will not be allowed to be created or to log in. A host rule is effective for every page view, not just registrations.</p>'); - case 'admin/access': - return t('<p>Permissions let you control what users can do on your site. Each user role (defined on the <a href="%role">user roles page</a>) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.</p>', array('%role' => url('admin/access/roles'))); - case 'admin/access/roles': + case 'admin/user/access': + return t('<p>Permissions let you control what users can do on your site. Each user role (defined on the <a href="%role">user roles page</a>) has its own set of permissions. For example, you could give users classified as "Administrators" permission to "administer nodes" but deny this power to ordinary, "authenticated" users. You can use permissions to reveal new features to privileged users (those with subscriptions, for example). Permissions also allow trusted users to share the administrative burden of running a busy site.</p>', array('%role' => url('admin/user/roles'))); + case 'admin/user/roles': return t('<p>Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in <a href="%permissions">user permissions</a>. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the <em>role names</em> of the various roles. To delete a role choose "edit".</p><p>By default, Drupal comes with two user roles:</p> <ul> <li>Anonymous user: this role is used for users that don\'t have a user account or that are not authenticated.</li> <li>Authenticated user: this role is automatically granted to all logged in users.</li> - </ul>', array('%permissions' => url('admin/access/permissions'))); - case 'admin/user/search': + </ul>', array('%permissions' => url('admin/user/access/permissions'))); + case 'admin/user/user/search': return t('<p>Enter a simple pattern ("*" may be used as a wildcard match) to search for a username. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda".</p>'); case 'user/help#user': $site = variable_get('site_name', 'this website'); diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 3a85689a82171d15642bda651d78822f2dbd82ca..f7f2c59f8c017c3b1cbc9ce793688679a4200c21 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -28,7 +28,7 @@ function watchdog_help($section) { ', array('%admin-watchdog' => url('admin/watchdog'), '%admin-watchdog-events' => url('admin/watchdog/events'))); $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%watchdog">Watchdog page</a>.', array('%watchdog' => 'http://drupal.org/handbook/modules/watchdog/')) .'</p>'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Logs and records system events.'); case 'admin/logs': return t('<p>The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.</p>'); @@ -43,6 +43,13 @@ function watchdog_menu($may_cache) { if ($may_cache) { $items[] = array('path' => 'admin/logs', 'title' => t('logs'), + 'description' => t('View system logs and other status information.'), + 'callback' => 'system_admin_menu_block_page', + 'weight' => 5, + 'position' => 'left'); + $items[] = array('path' => 'admin/logs/watchdog', 'title' => t('watchdog log'), + 'description' => t('View the primary system log.'), + 'weight' => -10, 'callback' => 'watchdog_overview'); $items[] = array('path' => 'admin/logs/event', 'title' => t('details'), 'callback' => 'watchdog_event',