xref: /plugin/bez/tpl/thread.php (revision fe5d6d1ebd253c129098b67fff8cf438a54d8650)
1<?php if ($template['action'] === 'issue_edit_metadata'): ?>
2    <?php $id = $this->id('issue', 'id', $template['issue']->id, 'action', 'issue_edit_metadata') ?>
3    <form class="bez_metaform" action="?id=<?php echo $id ?>" method="POST">
4<?php endif ?>
5
6<?php include "thread_box.php" ?>
7
8<!-- Comments -->
9<div class="bez_comments">
10	<div class="bez_left_col">
11		<!-- Correction -->
12		<div style="margin-top: 10px">
13			<?php foreach ($template['corrections'] as $task): ?>
14				<?php $template['task'] = $task ?>
15				<?php if (	$template['action'] === 'task_edit' &&
16							$template['tid'] === $template['task']->id): ?>
17					<?php include 'task_form.php' ?>
18				<?php else: ?>
19					<?php include 'task_box.php' ?>
20				<?php endif ?>
21
22			<?php endforeach ?>
23			<?php if ($template['action'] === 'task_correction_add'): ?>
24				<?php include 'task_form.php' ?>
25			<?php endif ?>
26		</div>
27
28		<div class="bez_second_lv_buttons" style="margin-top: 10px">
29			<?php if (	$template['issue']->user_is_coordinator() &&
30						$template['issue']->state === '0'): ?>
31				<a href="?id=<?php echo $this->id('issue', 'id', $template['issue']->id, 'action', 'task_correction_add') ?>#z_" class="bez_subscribe_button">
32					<span class="bez_awesome">&#xf0fe;</span>&nbsp;&nbsp;<?php echo $bezlang['correction_add'] ?>
33				</a>
34			<?php endif ?>
35			<a href="#" class="bez_subscribe_button bez_hide_comments">
36				<span class="bez_awesome">&#xf070;</span>&nbsp;&nbsp;<?php echo $bezlang['hide_comments'] ?>
37			</a>
38			<a href="#" class="bez_subscribe_button bez_show_comments">
39				<span class="bez_awesome">&#xf06e;</span>&nbsp;&nbsp;<?php echo $bezlang['show_comments'] ?>
40			</a>
41		</div>
42
43		<?php foreach ($template['commcauses'] as $commcause): ?>
44			<?php $template['commcause'] = $commcause ?>
45			<?php if (	$template['action'] === 'commcause_edit' &&
46						$template['kid'] === $template['commcause']->id): ?>
47				<?php include 'commcause_form.php' ?>
48			<?php else: ?>
49				<?php include 'commcause_box.php' ?>
50			<?php endif ?>
51		<?php endforeach ?>
52
53<?php if (	$template['issue']->state === '0' &&
54			!(strpos($template['action'], 'task') === 0) &&
55			$template['action'] !== 'issue_close' &&
56            $template['action'] !== 'issue_edit_metadata' &&
57			$template['kid'] === '-1'): ?>
58
59<?php include 'commcause_form.php' ?>
60
61<?php endif ?>
62
63</div>
64<div class="bez_right_col">
65
66<div class="bez_box">
67<h2><?php echo $bezlang['comment_last_activity'] ?></h2>
68
69<?php if ($template['action'] === 'issue_edit_metadata'): ?>
70<div style="white-space: nowrap;">
71    <input name="last_activity_date" style="width:90px;" data-validation="required,date" value="<?php echo $value['last_activity_date'] ?>" />
72                          <?php echo $this->model->action->getLang('at_hour') ?>
73     <input name="last_activity_time" style="width:60px;" data-validation="required,custom" data-validation-regexp="^(\d{1,2}):(\d{1,2}):(\d{1,2})$" value="<?php echo $value['last_activity_time'] ?>" />
74</div>
75<?php else: ?>
76    <?php echo $template['issue']->last_activity ?>
77<?php endif ?>
78
79
80</div>
81
82<div class="bez_box bez_subscribe_box">
83<h2><?php echo $bezlang['norifications'] ?></h2>
84<?php if ($template['issue']->is_subscribent()): ?>
85	<a href="?id=<?php echo $this->id('issue', 'id', $template['issue']->id, 'action', 'unsubscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome">&#xf1f6;</span>&nbsp;&nbsp;<?php echo $bezlang['unsubscribe'] ?></a>
86	<p><?php echo $bezlang['subscribed_info'] ?></p>
87<?php else: ?>
88	<a href="?id=<?php echo $this->id('issue', 'id', $template['issue']->id, 'action', 'subscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome">&#xf0f3;</span>&nbsp;&nbsp;<?php echo $bezlang['subscribe'] ?></a>
89	<p><?php echo $bezlang['not_subscribed_info'] ?></p>
90<?php endif ?>
91
92</div>
93
94<div class="bez_box">
95<h2><?php echo $bezlang['comment_participants'] ?></h2>
96<ul id="issue_participants">
97<?php foreach ($template['issue']->get_participants() as $nick => $participant): ?>
98	<li><a href="<?php echo $helper->mailto($this->model->users->get_user_email($nick),
99		$bezlang['issue'].': #'.$template['issue']->id.' '.$template['issue']->title,
100		DOKU_URL . 'doku.php?id='.$this->id('issue', 'id', $template['issue']->id)) ?>"  title="<?php echo $nick ?>">
101		<span class="bez_name"><?php echo $participant ?></span>
102		<span class="bez_icons">
103		<?php if($template['issue']->reporter === $nick): ?>
104			<span class="bez_awesome"
105				title="<?php echo $bezlang['reporter'] ?>">
106				&#xf058;
107			</span>
108		<?php endif ?>
109		<?php if($template['issue']->coordinator === $nick): ?>
110			<span class="bez_awesome"
111				title="<?php echo $bezlang['coordinator'] ?>">
112				&#xf0e3;
113			</span>
114		<?php endif ?>
115		<?php if($template['issue']->is_task_executor($nick)): ?>
116			<span class="bez_awesome"
117				title="<?php echo $bezlang['executor'] ?>">
118				&#xf073;
119			</span>
120		<?php endif ?>
121		<?php if($template['issue']->is_commentator($nick)): ?>
122			<span class="bez_awesome"
123				title="<?php echo $bezlang['commentator'] ?>">
124				&#xf27a;
125			</span>
126		<?php endif ?>
127		<?php if($template['issue']->is_subscribent($nick)): ?>
128			<span class="bez_awesome"
129				title="<?php echo $bezlang['subscribent'] ?>">
130				&#xf0e0;
131			</span>
132		<?php endif ?>
133		</span>
134	</a></li>
135<?php endforeach ?>
136</ul>
137
138<?php if (	$template['issue']->user_is_coordinator() &&
139						$template['issue']->state === '0' &&
140                        $template['action'] !== 'issue_edit_metadata'): ?>
141    <h2><?php echo $bezlang['issue_invite_header'] ?></h2>
142    <form action="?id=<?php echo $this->id('issue', 'id', $template['issue']->id, 'action', 'invite') ?>" method="post" id="bez_invite_users_form">
143    <div id="bez_invite_users" class="ui-widget">
144        <select name="client">
145            <option value="">--- <?php echo $bezlang['select'] ?> ---</option>
146            <?php foreach ($template['users_to_invite'] as $nick => $name): ?>
147                <option value="<?php echo $nick ?>"><?php echo $name ?></option>
148            <?php endforeach ?>
149        </select>
150    </div>
151    <button class="bez_subscribe_button"><?php echo $bezlang['issue_invite_button'] ?></button>
152    </form>
153<?php endif ?>
154
155
156</div>
157
158
159</div>
160
161</div>
162
163<?php if ($template['action'] === 'issue_edit_metadata'): ?>
164    </form>
165<?php endif?>
166