xref: /plugin/bez/tpl/start.php (revision 69c6de4bf5f70096a2b761cbfef7f1ff6b7df5ec)
1<div id="bez_version">
2	<div>
3		<?php echo $bezlang['bez'] ?>, <?php echo $bezlang['version'] ?>: <?php echo $template[version] ?>
4	</div>
5</div>
6<div id="bez_info">
7	<?php if ($helper->user_editor()): ?>
8		<a href="?id=<?php echo $this->id('issue_report') ?>" class="bez_start_button" id="bez_report_issue_button">
9			<?php echo $bezlang['report_issue'] ?>
10		</a>
11	<?php endif ?>
12	<a href="?id=<?php echo $this->id('issues:state:0:coordinator:'.$template['client']) ?>" class="bez_start_button" id="bez_info_issues">
13		<?php echo $bezlang['close_issues'] ?>:
14		<strong><?php echo $template['my_issues'] ?></strong>
15	</a>
16	<a href="?id=<?php echo $this->id('tasks:state:0:executor:'.$template['client']) ?>" class="bez_start_button" id="bez_info_tasks">
17		<?php echo $bezlang['close_tasks'] ?>:
18		<strong><?php echo $template['my_tasks'] ?></strong>
19	</a>
20	<?php if ($helper->user_admin()): ?>
21		<a href="?id=<?php echo $this->id('issues:state:-proposal') ?>" class="bez_start_button" id="bez_info_proposals">
22			<?php echo $bezlang['proposals'] ?>:
23			<strong><?php echo $template['proposals'] ?></strong>
24		</a>
25	<?php endif ?>
26</div>
27
28<dl id="bds_timeline">
29<?php foreach ($template['timeline'] as $day => $elms): ?>
30	<h2>
31		<?php echo $helper->time2date(strtotime("-$day days")) ?><?php if ($day < 2) echo ':' ?>
32		<?php if ($day == 0): ?>
33			<?php echo $bezlang['today'] ?>
34		<?php elseif ($day == 1): ?>
35			<?php echo $bezlang['yesterday'] ?>
36		<?php endif ?>
37	</h2>
38	<?php foreach ($elms as $elm): ?>
39		<dt class="<?php echo $elm['class'] ?> pr<?php echo $elm['priority'] ?>">
40			<?php if (strstr($elm['class'], 'issue')): ?>
41				<a href="<?php echo $this->issue_uri($elm['id']) ?>">
42					<span class="time"><?php echo date('H:i', $elm['date']) ?></span>
43						<span class="id">#<?php echo $elm['id'] ?></span>
44						<?php if ($elm['class'] == 'issue_created'): ?>
45							<?php echo $bezlang['issue_created'] ?>
46						<?php elseif ($elm['class'] == 'issue_closed'): ?>
47							<?php echo $bezlang['issue_closed'] ?>
48						<?php elseif ($elm['class'] == 'issue_rejected'): ?>
49							<?php echo $bezlang['issue_rejected'] ?>
50						<?php endif ?>
51						<?php echo $elm['type'] ?>
52						"<?php echo $elm['title'] ?>"
53						<span class="author"><?php echo $bezlang['coordinator'] ?>: <strong><?php echo $elm['coordinator'] ?></strong></span>
54				</a>
55			<?php elseif (strstr($elm['class'], 'task')): ?>
56				<a href="?id=<?php echo $this->id('issue_task', 'id', $elm[issue], 'tid', $elm[id]) ?>">
57					<span class="time"><?php echo date('H:i', $elm['date']) ?></span>
58						<span class="id">#<?php echo $elm['issue'] ?> #z<?php echo $elm['id'] ?></span>
59						<?php echo $bezlang['task'] ?>
60						<?php echo lcfirst($elm['action']) ?>
61						<?php if ($elm['class'] == 'task_opened'): ?>
62							<?php echo lcfirst($bezlang['task_opened']) ?>
63						<?php elseif ($elm['class'] == 'task_done'): ?>
64							<?php echo lcfirst($bezlang['task_done']) ?>
65						<?php elseif ($elm['class'] == 'task_rejected'): ?>
66							<?php echo lcfirst($bezlang['task_rejected']) ?>
67						<?php endif ?>
68						<?php echo $elm['title'] ?>
69						<span class="author"><?php echo $bezlang['executor'] ?>: <strong><?php echo $elm['executor'] ?></strong></span>
70				</a>
71			<?php elseif (strstr($elm['class'], 'comment')): ?>
72				<a href="?id=<?php echo $this->id('issue', 'id', $elm[issue]) ?>" style="background-image:none;">
73					<span class="time"><?php echo date('H:i', $elm['date']) ?></span>
74					<span class="id">#<?php echo $elm['issue'] ?> #k<?php echo $elm['id'] ?></span>
75					<?php echo $bezlang['comment_added'] ?>
76					<?php echo $bezlang['by'] ?>
77					<span class="author"><strong><?php echo $elm['reporter'] ?></strong></span>
78				</a>
79			<?php elseif (strstr($elm['class'], 'cause')): ?>
80				<a href="?id=<?php echo $this->id('issue_cause', 'id', $elm[issue], 'cid', $elm[id]) ?>">
81					<span class="time"><?php echo date('H:i', $elm['date']) ?></span>
82						<span class="id">#<?php echo $elm['issue'] ?> #p<?php echo $elm['id'] ?></span>
83						<?php if ($elm['potential'] == 0): ?>
84							<?php echo $bezlang['cause_added'] ?>:
85						<?php else: ?>
86							<?php echo ucfirst($bezlang['cause_type_potential']) ?>
87							<?php echo lcfirst($bezlang['cause_added']) ?>:
88						<?php endif ?>
89						<strong><?php echo $elm['rootcause'] ?></strong>
90				</a>
91			<?php endif ?>
92		</dt>
93		<dd>
94			<?php if (strstr($elm['class'], 'issue')): ?>
95				<?php echo $elm['description'] ?>
96				<?php if ($elm['class'] == 'issue_closed'): ?>
97					<h3><?php echo $bezlang['opinion'] ?></h3>
98					<?php echo $elm['opinion'] ?>
99				<?php endif ?>
100			<?php elseif (strstr($elm['class'], 'task')): ?>
101				<?php echo $elm['task'] ?>
102				<?php if ($elm['class'] == 'task_rejected'): ?>
103					<h3><?php echo $bezlang['reason'] ?></h3>
104					<?php echo $elm['reason'] ?>
105				<?php endif ?>
106			<?php elseif (strstr($elm['class'], 'comment')): ?>
107				<?php echo $elm['content'] ?>
108			<?php elseif (strstr($elm['class'], 'cause')): ?>
109				<?php echo $elm['cause'] ?>
110			<?php endif ?>
111		</dd>
112	<?php endforeach ?>
113<?php endforeach ?>
114</dl>
115