1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13: class Wicked_Page_AllPages extends Wicked_Page {
14:
15: 16: 17:
18: public $supportedModes = array(
19: Wicked::MODE_CONTENT => true,
20: Wicked::MODE_DISPLAY => true);
21:
22: 23: 24: 25: 26:
27: public function content()
28: {
29: return $GLOBALS['wicked']->getAllPages();
30: }
31:
32: 33: 34: 35: 36: 37:
38: public function displayContents($isBlock)
39: {
40: $template = $GLOBALS['injector']->createInstance('Horde_Template');
41: $pages = array();
42: foreach ($this->content() as $page) {
43: $page = new Wicked_Page_StandardPage($page);
44: $pages[] = array('author' => $page->author(),
45: 'created' => $page->formatVersionCreated(),
46: 'name' => $page->pageName(),
47: 'context' => false,
48: 'url' => $page->pageUrl(),
49: 'version' => $page->version(),
50: 'class' => '');
51: }
52: $template->set('pages', $pages, true);
53: $template->set('hits', false, true);
54:
55: Horde::addScriptFile('tables.js', 'horde', true);
56:
57:
58: ob_start();
59: require WICKED_TEMPLATES . '/pagelist/header.inc';
60: echo $template->fetch(WICKED_TEMPLATES . '/pagelist/pagelist.html');
61: require WICKED_TEMPLATES . '/pagelist/footer.inc';
62: $contents = ob_get_contents();
63: ob_end_clean();
64: return $contents;
65: }
66:
67: public function pageName()
68: {
69: return 'AllPages';
70: }
71:
72: public function pageTitle()
73: {
74: return _("All Pages");
75: }
76:
77: }
78: