xref: /plugin/bez/tpl/start.php (revision 4da807da68245bfa1e9764160638087fcd9ff6df)
1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?>
2<div id="plugin__bez_start_buttons">
3<?php if ($tpl->factory('thread')->permission() >= BEZ_TABLE_PERMISSION_INSERT): ?>
4    <a href="<?php echo $tpl->url('thread_report', 'type', 'issue') ?>" class="bez_start_button" id="bez_report_issue_button">
5        <?php echo $tpl->getLang('report_threads') ?>
6    </a>
7<?php endif ?>
8<?php if ($tpl->factory('thread')->permission() >= BEZ_TABLE_PERMISSION_INSERT): ?>
9    <a href="<?php echo $tpl->url('thread_report', 'type', 'project') ?>" class="bez_start_button" id="bez_report_issue_button">
10        <?php echo $tpl->getLang('report_projects') ?>
11    </a>
12<?php endif ?>
13
14<?php if ($tpl->factory('task')->permission() >= BEZ_TABLE_PERMISSION_INSERT): ?>
15    <a href="<?php echo $tpl->url('task_form') ?>" class="bez_start_button" id="bez_report_task_button">
16        <?php echo $tpl->getLang('add_task') ?>
17    </a>
18<?php endif ?>
19
20<?php if ($tpl->factory('subscription')->isMuted()): ?>
21    <a href="<?php echo $tpl->url('start', array('GET' => array('action' => 'unmute'))) ?>" class="bez_start_button">
22        <span class="bez_awesome">&#xf0f3;</span>
23        <?php printf($tpl->getLang('unmute_notifications'), $tpl->user_email()) ?>
24    </a>
25<?php else: ?>
26    <a href="<?php echo $tpl->url('start', array('GET' => array('action' => 'mute'))) ?>" class="bez_start_button">
27        <span class="bez_awesome">&#xf1f6;</span>
28        <?php printf($tpl->getLang('mute_notifications'), $tpl->user_email()) ?>
29    </a>
30<?php endif ?>
31</div>
32
33<div id="plugin__bez_start_tabs">
34    <ul>
35        <li><a href="#plugin__bez_tabs-0">
36                <?php echo $tpl->getLang('menu_activity') ?>
37            </a></li>
38        <?php if ($tpl->user_acl_level() >= BEZ_AUTH_ADMIN): ?>
39        <li><a href="#plugin__bez_tabs-1">
40                <?php echo $tpl->getLang('proposals') ?>
41                (<span class="count"><?php echo $tpl->get('proposals_count') ?></span>)
42            </a></li>
43        <?php endif ?>
44        <li><a href="#plugin__bez_tabs-2">
45                <?php echo $tpl->getLang('close_issues') ?>
46                (<span class="count"><?php echo $tpl->get('my_threads_count') ?></span>)
47            </a></li>
48        <li><a href="#plugin__bez_tabs-3">
49                <?php echo $tpl->getLang('close_tasks') ?>
50                (<span class="count"><?php echo $tpl->get('my_tasks_count') ?></span>)
51            </a></li>
52        <li><a href="#plugin__bez_tabs-4">
53                <?php echo $tpl->getLang('my_reported_threads') ?>
54                (<span class="count"><?php echo $tpl->get('reported_threads_count') ?></span>)
55            </a></li>
56        <li><a href="#plugin__bez_tabs-5">
57                <?php echo $tpl->getLang('my_reported_tasks') ?>
58                (<span class="count"><?php echo $tpl->get('reported_tasks_count') ?></span>)
59            </a></li>
60    </ul>
61    <div id="plugin__bez_tabs-0">
62        <?php include 'activity.php' ?>
63    </div>
64    <?php $tpl->set('no_filters', true) ?>
65    <?php if ($tpl->user_acl_level() >= BEZ_AUTH_ADMIN): ?>
66    <div id="plugin__bez_tabs-1">
67        <?php $tpl->set('threads', $tpl->get('proposals')) ?>
68        <?php include 'threads.php' ?>
69    </div>
70    <?php endif ?>
71    <div id="plugin__bez_tabs-2">
72        <?php $tpl->set('threads', $tpl->get('my_threads')) ?>
73        <?php include 'threads.php' ?>
74    </div>
75    <div id="plugin__bez_tabs-3">
76        <?php $tpl->set('tasks', $tpl->get('my_tasks')) ?>
77        <?php include 'tasks.php' ?>
78    </div>
79    <div id="plugin__bez_tabs-4">
80        <?php $tpl->set('threads', $tpl->get('reported_threads')) ?>
81        <?php include 'threads.php' ?>
82    </div>
83    <div id="plugin__bez_tabs-5">
84        <?php $tpl->set('tasks', $tpl->get('reported_tasks')) ?>
85        <?php include 'tasks.php' ?>
86    </div>
87</div>