Commit b138793b authored by Dries's avatar Dries

- Patch #72079 by Earl et al: give Drupal an overall administration page ... :-)

parent 3a7b64ae
......@@ -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
......
......@@ -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();
......
......@@ -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'
);
}
......
......@@ -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;
}
This diff is collapsed.
......@@ -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 &gt;&gt; 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.');
}
}
......
This diff is collapsed.
......@@ -67,10 +67,10 @@ function blog_help($section) {
<li>administer blog api at <a href="%admin-settings-blogapi">administer &gt;&gt; settings &gt;&gt; blogapi</a>.</li>
<li>enable the "recent blog posts" block at <a href="%admin-block">administer &gt;&gt; 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.");
......
......@@ -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
......
......@@ -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 &gt;&gt; blocks</a>.</li>
<li>control who can create, edit, and outline posts in books by setting access permissions: <a href="%admin-access">administer &gt;&gt; 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.");
......
......@@ -77,17 +77,17 @@ function comment_help($section) {
<li>control access for various comment module functions through access permissions <a href="%admin-access">administer &gt;&gt; access control</a>.</li>
<li>administer comments <a href="%admin-comment-configure"> administer &gt;&gt; comments &gt;&gt; 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');
}
/**
......
This diff is collapsed.
......@@ -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 &gt;&gt; settings &gt;&gt; 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 &gt;&gt; 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 &raquo; 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 &raquo; settings &raquo; 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'));;
......
......@@ -27,29 +27,29 @@ function filter_help($section) {
<li>administer input format permissions and settings at <a href="%admin-filters">administer &gt;&gt; input formats</a>.</li>
<li>configure the filters for each input format at <a href="%admin-filters">administer &gt;&gt; input formats &gt;&gt; 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;
}
}
......
......@@ -22,16 +22,16 @@ function forum_help($section) {
<li>read about the comment module at <a href="%admin-help-comment">administer &gt;&gt; help &gt;&gt; comment</a>.</li>
<li>read about the taxonomy module at <a href="%admin-help-taxonomy">administer &gt;&gt; help &gt;&gt; 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);
}
......
......@@ -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.');
}
}
......
......@@ -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':