Index: drupalorg_handbook/drupalorg_handbook.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/drupalorg_handbook/drupalorg_handbook.module,v
retrieving revision 1.28
diff -u -r1.28 drupalorg_handbook.module
--- drupalorg_handbook/drupalorg_handbook.module 6 Jan 2011 04:06:01 -0000 1.28
+++ drupalorg_handbook/drupalorg_handbook.module 15 Jan 2011 01:47:19 -0000
@@ -33,7 +33,7 @@
break;
}
$node->content['body']['#value'] .= $extra;
-
+
if (drupalorg_crosssite_section() === 'documentation' && isset($node->book['bid'])) {
// Prepend the handbook meta data to book bodies.
$node->content['body']['#value'] = drupalorg_handbook_meta_data($node) . $node->content['body']['#value'];
@@ -90,7 +90,7 @@
}
}
}
-
+
$modified = format_date($node->changed, 'custom', 'F j, Y');
return theme('drupalorg_handbook_meta_data', $info, $modified);
@@ -199,15 +199,15 @@
$result = drupalorg_handbook_get_recent_updates($count);
while ($page = db_fetch_object($result)) {
$row = array(
- l($page->title, "node/$page->nid") .' '. theme('mark', node_mark($page->nid, $page->changed)) . ($page->log ? "
". check_plain($page->log) : ''),
- theme('username', $page),
+ l($page->title, "node/$page->nid") .' '. theme('mark', node_mark($page->nid, $page->changed)) . ($page->log ? "
". check_plain($page->log) : ''),
+ theme('username', $page),
t('%time ago', array('%time' => format_interval(time() - $page->changed))),
);
if (user_access('view revisions')) {
$row[] = l(t('Diff'), "node/$page->nid/revisions/view/latest");
}
$rows[] = $row;
- }
+ }
$header = array('Page', 'Edited', 'Updated');
if (user_access('view revisions')) {
$header[] = 'Diff';
@@ -220,7 +220,9 @@
}
/**
- * License and quick links blocks for docs.
+ * Implements hook_block().
+ *
+ * Defines license, next steps, and doc home page info blocks for docs.
*/
function drupalorg_handbook_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
@@ -230,6 +232,10 @@
'info' => t('Handbook License'),
'cache' => BLOCK_CACHE_PER_PAGE,
),
+ 'next_steps' => array(
+ 'info' => t('Handbook page next steps'),
+ 'cache' => BLOCK_CACHE_PER_PAGE,
+ ),
'info' => array(
'info' => t('Documentation home info'),
'cache' => BLOCK_CACHE_PER_PAGE,
@@ -246,6 +252,18 @@
}
break;
+ case 'next_steps':
+ $arg = arg();
+ if (drupalorg_crosssite_section() === 'documentation' && $arg[0] == 'node' && is_numeric($arg[1])) {
+ return array(
+ 'subject' => t('Next steps'),
+ 'content' => '
' . t('Need more help on this topic? Ask in the Forums or on IRC.') . '
' . + '' . t('Does this page need corrections or updates? Edit the page if you\'re logged in, or file an issue.', + array('@issue-link' => url('node/add/project-issue/documentation', array('query' => array('title' => 'Documentation problem with node/' . $arg[1], 'component' => 'Correction/Clarification', 'categories' => 'bug'))))) . '
' . + '' . t('Want to contribute to documentation? Learn more about the Documentation team.') . '
'); + } + break; + case 'info': return array( 'subject' => t('Help Us Write Documentation'), @@ -297,7 +315,7 @@ while ($node = db_fetch_object($result)) { // Fake the created time for the theme function, so we can easily theme it. $node->created = $node->changed; - $recent_updates .= ''. theme('node_submitted', $node) .'
'; + $recent_updates .= ''. theme('node_submitted', $node) .'
'; } $recent_updates .= '' . l(t('More updates…'), 'handbook/updates') .'
'; cache_set('drupalorg_handbook_recent_updates_' . $count, $recent_updates); Index: drupalorg_handbook/drupalorg_handbook.install =================================================================== RCS file: drupalorg_handbook/drupalorg_handbook.install diff -N drupalorg_handbook/drupalorg_handbook.install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ drupalorg_handbook/drupalorg_handbook.install 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,41 @@ +