xref: /plugin/bez/tpl/thread_box.php (revision addc91ee3302cfabdbe6588b98874f0b355a06f3)
1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?>
2<div    id="bds_issue_box"
3        class="pr<?php
4        if ($tpl->get('thread')->state != 'opened') {
5            echo '-1';
6        } elseif($tpl->get('thread')->priority != '') {
7            echo $tpl->get('thread')->priority;
8        } else {
9            echo 'None';
10        }
11        ?>">
12
13<h1 class="bez__plugin_thread_title">
14
15<a href="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id) ?>">
16    #<?php echo $tpl->get('thread')->id ?>
17</a>
18
19<?php if ($tpl->get('thread')->type == 'project'): ?>
20    <?php echo $tpl->getLang('project') ?>
21<?php elseif (!empty($tpl->get('thread')->label_name)): ?>
22	<?php echo $tpl->get('thread')->label_name ?>
23<?php else: ?>
24	<i style="color: #777"><?php echo $tpl->getLang('issue_type_no_specified') ?></i>
25<?php endif ?>
26
27(<?php echo $tpl->getLang('state_' . $tpl->get('thread')->state) ?>)
28
29<?php if ($tpl->get('thread')->private == '1'): ?>
30    <?php echo inlineSVG(DOKU_PLUGIN . 'bez/images/lock.svg') ?>
31<?php endif ?>
32</h1>
33
34<h1 id="bez_issue_title"><?php echo $tpl->get('thread')->title ?></h1>
35
36<div class="bez_timebox">
37    <span>
38        <strong><?php echo $tpl->getLang('open') ?>:</strong>
39        <?php echo $tpl->date($tpl->get('thread')->create_date) ?>
40    </span>
41
42
43<?php if ($tpl->get('thread')->state == 'closed' || $tpl->get('thread')->state == 'rejected'): ?>
44    <span>
45        <strong><?php echo $tpl->getLang('closed') ?>:</strong>
46        <?php echo $tpl->date($tpl->get('thread')->close_date) ?>
47    </span>
48
49	<span>
50		<strong><?php echo $tpl->getLang('report_priority') ?>: </strong>
51        <?php echo $tpl->date_diff_days($tpl->get('task')->create_date, $tpl->get('task')->close_date, '%a') ?>
52	</span>
53<?php endif ?>
54</div>
55
56<table class="bez_box_data_table">
57<tr>
58    <th><?php echo $tpl->getLang('reporter') ?>:</th>
59    <td>
60        <?php echo $tpl->user_name($tpl->get('thread')->original_poster) ?>
61    </td>
62
63    <th><?php echo $tpl->getLang('coordinator') ?>:</th>
64    <td>
65        <?php if ($tpl->get('thread')->coordinator == ''): ?>
66            <i style="font-weight: normal; color: #aaa"><?php echo $tpl->getLang('none') ?></i>
67        <?php else: ?>
68            <?php echo $tpl->user_name($tpl->get('thread')->coordinator) ?>
69        <?php endif?>
70    </td>
71</tr>
72</table>
73
74<?php echo $tpl->get('thread')->content_html ?>
75
76<div class="bez_buttons">
77	<?php if (count($tpl->get('thread')->changable_fields(array('label_id', 'title', 'content', 'coordinator'))) > 0): ?>
78		<a href="<?php echo $tpl->url('thread_report', 'action', 'edit', 'id', $tpl->get('thread')->id) ?>" class="bds_inline_button">
79<?php echo $tpl->getLang('edit') ?>
80		</a>
81	<?php endif ?>
82
83	<a class="bds_inline_button" href="
84		<?php echo $tpl->mailto($tpl->user_email($tpl->get('thread')->coordinator),
85                                   '#'.$tpl->get('thread')->id.' '.$tpl->get('thread')->title,
86		$tpl->url('thread', 'id', $tpl->get('thread')->id)) ?>">
87<?php echo $tpl->getLang('send_mail') ?>
88	</a>
89
90    <?php if ($tpl->get('thread')->type == 'issue'): ?>
91        <a href="<?php echo $tpl->url('8d', 'id', $tpl->get('thread')->id) ?>" class="bds_inline_button bds_report_button">
92<?php echo $tpl->getLang('8d_report') ?>
93        </a>
94    <?php else: ?>
95        <a href="<?php echo $tpl->url('kp', 'id', $tpl->get('thread')->id) ?>" class="bds_inline_button bds_report_button">
96<?php echo $tpl->getLang('kp_report') ?>
97        </a>
98    <?php endif ?>
99</div>
100
101</div>
102
103