]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MacOSX/lib/RecentChanges.php
include [all] Include and file path should be devided with single space. File path...
[SourceForge/phpwiki.git] / themes / MacOSX / lib / RecentChanges.php
1 <?php // $Id$
2 /*
3  * Extensions/modifications to the stock RecentChanges (and PageHistory) format.
4  */
5
6 require_once 'lib/plugin/RecentChanges.php';
7 require_once 'lib/plugin/PageHistory.php';
8
9 function MacOSX_RC_revision_formatter (&$fmt, &$rev) {
10     $class = 'rc-' . $fmt->importance($rev);
11
12     return HTML::li(array('class' => $class),
13                     $fmt->diffLink($rev), ' ',
14                     $fmt->pageLink($rev), ' ',
15                     $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)),
16                     ' . . . ',
17                     $fmt->summaryAsHTML($rev),
18                     ' -- ',
19                     $fmt->authorLink($rev));
20 }
21
22 function MacOSX_PH_revision_formatter (&$fmt, &$rev) {
23     $class = 'rc-' . $fmt->importance($rev);
24
25     return HTML::li(array('class' => $class),
26                     $fmt->diffLink($rev), ' ',
27                     $fmt->pageLink($rev), ' ',
28                     $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)),
29                     ' . . . ',
30                     $fmt->summaryAsHTML($rev),
31                     ' -- ',
32                     $fmt->authorLink($rev),
33                     $rev->get('is_minor_edit') ? HTML::em(" (" . _("minor edit") . ")") : '');
34 }
35
36 class _MacOSX_RecentChanges_Formatter
37 extends _RecentChanges_HtmlFormatter
38 {
39     function format_revision (&$rev) {
40         return MacOSX_RC_revision_formatter($this, $rev);
41     }
42 }
43
44 class _MacOSX_PageHistory_Formatter
45 extends _PageHistory_HtmlFormatter
46 {
47     function format_revision (&$rev) {
48         return MacOSX_PH_revision_formatter($this, $rev);
49     }
50 }
51
52 // Local Variables:
53 // mode: php
54 // tab-width: 8
55 // c-basic-offset: 4
56 // c-hanging-comment-ender-p: nil
57 // indent-tabs-mode: nil
58 // End:
59 ?>