summaryrefslogtreecommitdiff
path: root/modules/tracker
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-02 04:27:23 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-02 04:27:23 +0000
commit0142292c718eaf31e73c3ee0cd9ef427bc18de16 (patch)
tree69e3a1784a48af68ec65537d375058bb2cb61daa /modules/tracker
parente9ca98b69d45b935fe4963a345cba92a87164ddb (diff)
downloadbrdo-0142292c718eaf31e73c3ee0cd9ef427bc18de16.tar.gz
brdo-0142292c718eaf31e73c3ee0cd9ef427bc18de16.tar.bz2
#373201 by moshe weitzman, chx, Frando, eaton: Allow renderable array properties to be passed directly to theme functions.
Diffstat (limited to 'modules/tracker')
-rw-r--r--modules/tracker/tracker.css4
-rw-r--r--modules/tracker/tracker.pages.inc23
2 files changed, 15 insertions, 12 deletions
diff --git a/modules/tracker/tracker.css b/modules/tracker/tracker.css
index 3a2d30f47..0fadc53a7 100644
--- a/modules/tracker/tracker.css
+++ b/modules/tracker/tracker.css
@@ -1,8 +1,8 @@
/* $Id$ */
-#tracker td.replies {
+.page-tracker td.replies {
text-align: center;
}
-#tracker table {
+.page-tracker table {
width: 100%;
}
diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc
index d8dd9f344..b97933233 100644
--- a/modules/tracker/tracker.pages.inc
+++ b/modules/tracker/tracker.pages.inc
@@ -11,11 +11,6 @@
* Menu callback. Prints a listing of active nodes on the site.
*/
function tracker_page($account = NULL, $set_title = FALSE) {
- // Add CSS
- drupal_add_css(drupal_get_path('module', 'tracker') . '/tracker.css', array('preprocess' => FALSE));
-
- $header = array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last updated'));
-
// TODO: These queries are very expensive, see http://drupal.org/node/105639
$query = db_select('node', 'n', array('target' => 'slave'))->extend('PagerDefault');
$query->join('users', 'u', 'n.uid = u.uid');
@@ -73,10 +68,18 @@ function tracker_page($account = NULL, $set_title = FALSE) {
$rows[] = array(array('data' => t('No posts available.'), 'colspan' => '5'));
}
- $output = '<div id="tracker">';
- $output .= theme('table', $header, $rows);
- $output .= theme('pager', NULL);
- $output .= '</div>';
+ $page['tracker'] = array(
+ '#rows' => $rows,
+ '#header' => array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last updated')),
+ '#theme' => 'table',
+ '#attached_css' => array(drupal_get_path('module', 'tracker') . '/tracker.css' => array('preprocess' => FALSE)),
+ );
+ $page['pager'] = array(
+ '#theme' => 'pager',
+ '#quantity' => 25,
+ '#weight' => 10,
+ );
+ $page['#sorted'] = TRUE;
- return $output;
+ return $page;
}