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