]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/smaller/themeinfo.php
themes are now easier derivable classes from other themes.
[SourceForge/phpwiki.git] / themes / smaller / themeinfo.php
1 <?php
2 rcs_id('$Id: themeinfo.php,v 1.6 2007-07-01 09:36:10 rurban Exp $');
3 /**
4  * tiny actionbar, only Edit (if signed in) and Info => PageInfo,
5  *   all other Actionbars buttons in info.tmpl
6  * old-style Sign In button
7  * navbar also shorter labels and without buttons, just links
8  */
9
10 require_once('lib/Theme.php');
11
12 class Theme_smaller extends Theme {
13
14     function makeActionButton ($action, $label = false, $page_or_rev = false) {
15         extract($this->_get_name_and_rev($page_or_rev));
16
17         if (is_array($action)) {
18             $attr = $action;
19             $action = isset($attr['action']) ? $attr['action'] : 'browse';
20         }
21         else
22             $attr['action'] = $action;
23
24         $class = is_safe_action($action) ? 'named-wiki' : 'wikiadmin';
25         if (!$label)
26             $label = $this->_labelForAction($action);
27
28         if ($version)
29             $attr['version'] = $version;
30
31         if ($action == 'browse')
32             unset($attr['action']);
33
34         return $this->makeButton($label, WikiURL($pagename, $attr), $class);
35     }
36     
37 }
38
39 $WikiTheme = new Theme_smaller('smaller');
40
41 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42 // (c-file-style: "gnu")
43 // Local Variables:
44 // mode: php
45 // tab-width: 8
46 // c-basic-offset: 4
47 // c-hanging-comment-ender-p: nil
48 // indent-tabs-mode: nil
49 // End:   
50 ?>