xref: /template/sprintdoc/tpl/nav-page-tools.php (revision 89a4c45d5c6ba04e314d66ca3a050ff8ebb49921)
1<?php
2    if (!defined('DOKU_INC')) die();
3?>
4
5<?php if ($showTools): ?>
6    <nav id="dokuwiki__pagetools">
7        <div class="tools">
8
9        <?php include('nav-status.php');?>
10            <ul>
11                <?php
12                $data = array(
13                    'view'  => 'main-svg',
14                    'items' => array(
15                            'edit'      => dokuwiki\template\sprintdoc\tpl::pageToolAction('edit'),
16                            'revert'    => dokuwiki\template\sprintdoc\tpl::pageToolAction('revert'),
17                            'revisions' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revisions'),
18                            'backlink'  => dokuwiki\template\sprintdoc\tpl::pageToolAction('backlink'),
19                            'subscribe' => dokuwiki\template\sprintdoc\tpl::pageToolAction('subscribe'),
20                            'top'       => dokuwiki\template\sprintdoc\tpl::pageToolAction('top'),
21                         )
22                     );
23
24                     // the page tools can be amended through a custom plugin hook
25                     $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
26                     if($evt->advise_before()){
27                        foreach($evt->data['items'] as $k => $html) {
28                            if($html)
29                                echo "<li>$html</li>";
30                        }
31                     }
32                     $evt->advise_after();
33                     unset($data);
34                ?>
35            </ul>
36        </div>
37    </nav>
38<?php endif; ?>
39