1e8827d73SSzymon Olewniczak<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?> 2c8bd19cbSSzymon Olewniczak<?php $D = 2 ?> 3c8bd19cbSSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['correction']) > 0) $D++ ?> 479fbde34SSzymon Olewniczak<?php if (count($tpl->get('causes')) > 0) $D++ ?> 5c8bd19cbSSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['corrective']) > 0) $D++ ?> 679fbde34SSzymon Olewniczak<?php if (count($tpl->get('risks')) > 0 || count($tpl->get('opportunities')) > 0) $D++ ?> 7c8bd19cbSSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['preventive']) > 0) $D++ ?> 8c8bd19cbSSzymon Olewniczak<?php if ($tpl->get('thread')->state == 'closed') $D++ ?> 9c8bd19cbSSzymon Olewniczak 10e8fc7594Sghi<h1> 11c8bd19cbSSzymon Olewniczak <?php printf($tpl->getLang('8d_report_header'), $D); ?> 12e8fc7594Sghi <span id="bez_8d_send_button">[<a href=" 13e8827d73SSzymon Olewniczak <?php echo $tpl->mailto('', 14e8827d73SSzymon Olewniczak $tpl->getLang('8d_report').': #'.$tpl->get('thread')->id.' '.$tpl->get('thread')->title, 152467512fSSzymon Olewniczak $tpl->url('8d', 'id', $tpl->get('thread')->id) . '?t=' . $_GET['t']) ?>"> 16e8827d73SSzymon Olewniczak ✉ <?php echo $tpl->getLang('send_mail') ?> 17e8fc7594Sghi </a>]</span> 18e8fc7594Sghi</h1> 19f2f5b3feSghi 20f2f5b3feSghi<table> 21f2f5b3feSghi<tr> 22f2f5b3feSghi <td> 2338ce6055Sghi <strong> 24e8827d73SSzymon Olewniczak <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id) ?>"> 25e8827d73SSzymon Olewniczak #<?php echo $tpl->get('thread')->id ?> 2638ce6055Sghi </a> 2738ce6055Sghi </strong> 28e8827d73SSzymon Olewniczak <?php if (!empty($tpl->get('thread')->label_name)): ?> 29e8827d73SSzymon Olewniczak <?php echo $tpl->get('thread')->label_name ?> 30e8827d73SSzymon Olewniczak <?php else: ?> 31e8827d73SSzymon Olewniczak <i style="color: #777"><?php echo $tpl->getLang('issue_type_no_specified') ?></i> 32e8827d73SSzymon Olewniczak <?php endif ?> 33f2f5b3feSghi </td> 34f2f5b3feSghi 35f2f5b3feSghi <td> 36e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('open_date') ?>:</strong> 37ff14b107SSzymon Olewniczak <?php echo $tpl->date($tpl->get('thread')->create_date) ?> 38f2f5b3feSghi </td> 39f2f5b3feSghi</tr> 40f2f5b3feSghi 41f2f5b3feSghi <tr> 429fbfe943Sghi <td colspan="2"> 43e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('title') ?>:</strong> 44e8827d73SSzymon Olewniczak <?php echo $tpl->get('thread')->title ?> 45f2f5b3feSghi </td> 46f2f5b3feSghi</tr> 47f2f5b3feSghi</table> 48e2b0e8caSSzymon Olewniczak<?php $D = 1 ?> 49e8827d73SSzymon Olewniczak<h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('1d') ?></h2> 5066b54849Sghi<ul> 51e8827d73SSzymon Olewniczak <?php foreach($tpl->get('thread')->get_participants() as $participant): ?> 52e8827d73SSzymon Olewniczak <li><?php echo $tpl->user_name($participant['user_id']) ?></li> 5366b54849Sghi <?php endforeach ?> 5466b54849Sghi</ul> 55f2f5b3feSghi 56e8827d73SSzymon Olewniczak<h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('2d') ?></h2> 57e8827d73SSzymon Olewniczak<?php echo $tpl->get('thread')->content_html ?> 58f2f5b3feSghi 59e8827d73SSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['correction']) > 0): ?> 60e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('3d') ?></h2> 61e8827d73SSzymon Olewniczak <?php $tpl->set('tasks', $tpl->get('8d_tasks')['correction']) ?> 6244189046SSzymon Olewniczak <?php include '8d_tasks.php' ?> 63e2b0e8caSSzymon Olewniczak<?php endif ?> 64683e6b20Sghi 6579fbde34SSzymon Olewniczak<?php if (count($tpl->get('causes')) > 0): ?> 66e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('4d') ?></h2> 6779fbde34SSzymon Olewniczak <?php $tpl->set('causes', $tpl->get('causes')) ?> 6844189046SSzymon Olewniczak <?php include '8d_causes.php' ?> 69e2b0e8caSSzymon Olewniczak<?php endif ?> 7038ce6055Sghi 71e8827d73SSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['corrective']) > 0): ?> 72e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('5d') ?></h2> 73e8827d73SSzymon Olewniczak <?php $tpl->set('tasks', $tpl->get('8d_tasks')['corrective']) ?> 7444189046SSzymon Olewniczak <?php include '8d_tasks.php' ?> 75e2b0e8caSSzymon Olewniczak<?php endif ?> 76f2f5b3feSghi 7779fbde34SSzymon Olewniczak<?php if (count($tpl->get('risks')) > 0 || count($tpl->get('opportunities')) > 0): ?> 78e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('6d') ?></h2> 7979fbde34SSzymon Olewniczak <?php if (count($tpl->get('risks')) > 0): ?> 8079fbde34SSzymon Olewniczak <h3><?php echo $tpl->getLang('risks') ?></h3> 8179fbde34SSzymon Olewniczak <?php $tpl->set('causes', $tpl->get('risks')) ?> 8244189046SSzymon Olewniczak <?php include '8d_causes.php' ?> 83e2b0e8caSSzymon Olewniczak <?php endif ?> 8479fbde34SSzymon Olewniczak <?php if (count($tpl->get('opportunities')) > 0): ?> 8579fbde34SSzymon Olewniczak <h3><?php echo $tpl->getLang('opportunities') ?></h3> 8679fbde34SSzymon Olewniczak <?php $tpl->set('causes', $tpl->get('opportunities')) ?> 8779fbde34SSzymon Olewniczak <?php include '8d_causes.php' ?> 8879fbde34SSzymon Olewniczak <?php endif ?> 8979fbde34SSzymon Olewniczak<?php endif ?> 90f2f5b3feSghi 91e8827d73SSzymon Olewniczak<?php if (count($tpl->get('8d_tasks')['preventive']) > 0): ?> 92e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('7d') ?></h2> 93e8827d73SSzymon Olewniczak <?php $tpl->set('tasks', $tpl->get('8d_tasks')['preventive']) ?> 9444189046SSzymon Olewniczak <?php include '8d_tasks.php' ?> 95e2b0e8caSSzymon Olewniczak<?php endif ?> 960e31399aSSzymon Olewniczak 97e2b0e8caSSzymon Olewniczak 9853df74e7SSzymon Olewniczak<?php if ($tpl->get('thread')->state == 'closed'): ?> 99e8827d73SSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('8d') ?></h2> 100e8827d73SSzymon Olewniczak <?php echo $tpl->get('thread')->closing_comment() ?> 101f2f5b3feSghi <table> 102f2f5b3feSghi <tr> 103f2f5b3feSghi <td> 104e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('true_date') ?>:</strong> 105ff14b107SSzymon Olewniczak <?php echo $tpl->date($tpl->get('thread')->close_date) ?> 106f2f5b3feSghi </td> 107f2f5b3feSghi <td> 108e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('state') ?>:</strong> 109e8827d73SSzymon Olewniczak <?php echo $tpl->getLang('state_' . $tpl->get('thread')->state) ?> 110f2f5b3feSghi </td> 111f2f5b3feSghi </tr> 112f2f5b3feSghi 113f2f5b3feSghi <tr> 114f2f5b3feSghi <td> 115e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('totalcost') ?>:</strong> 116e8827d73SSzymon Olewniczak <?php if ($tpl->get('thread')->task_sum_cost != ''): ?> 117e8827d73SSzymon Olewniczak <?php echo $tpl->get('thread')->task_sum_cost ?> 11844189046SSzymon Olewniczak <?php else: ?> 11944189046SSzymon Olewniczak <em>---</em> 12044189046SSzymon Olewniczak <?php endif ?> 121f2f5b3feSghi </td> 122f2f5b3feSghi <td> 123e8827d73SSzymon Olewniczak <strong><?php echo $tpl->getLang('coordinator') ?>:</strong> 124e8827d73SSzymon Olewniczak <?php echo $tpl->user_name($tpl->get('thread')->coordinator) ?> 125f2f5b3feSghi </td> 126f2f5b3feSghi </tr> 127f2f5b3feSghi </table> 12844189046SSzymon Olewniczak<?php endif ?> 12944189046SSzymon Olewniczak 13044189046SSzymon Olewniczak 131*bf67f2caSSzymon Olewniczak<?php if ($tpl->get('thread')->state == 'closed' || $tpl->get('thread')->state == 'rejected'): ?> 132*bf67f2caSSzymon Olewniczak <h2><?php echo $D++ ?>D - <?php echo $tpl->getLang('8d') ?></h2> 133*bf67f2caSSzymon Olewniczak <?php echo $tpl->get('thread')->closing_comment() ?> 134*bf67f2caSSzymon Olewniczak <table> 135*bf67f2caSSzymon Olewniczak <tr> 136*bf67f2caSSzymon Olewniczak <td> 137*bf67f2caSSzymon Olewniczak <strong><?php echo $tpl->getLang('true_date') ?>:</strong> 138*bf67f2caSSzymon Olewniczak <?php echo $tpl->date($tpl->get('thread')->close_date) ?> 139*bf67f2caSSzymon Olewniczak </td> 140*bf67f2caSSzymon Olewniczak <td> 141*bf67f2caSSzymon Olewniczak <strong><?php echo $tpl->getLang('state') ?>:</strong> 142*bf67f2caSSzymon Olewniczak <?php echo $tpl->getLang('state_' . $tpl->get('thread')->state) ?> 143*bf67f2caSSzymon Olewniczak </td> 144*bf67f2caSSzymon Olewniczak </tr> 145*bf67f2caSSzymon Olewniczak 146*bf67f2caSSzymon Olewniczak <tr> 147*bf67f2caSSzymon Olewniczak <td> 148*bf67f2caSSzymon Olewniczak <strong><?php echo $tpl->getLang('totalcost') ?>:</strong> 149*bf67f2caSSzymon Olewniczak <?php if ($tpl->get('thread')->task_sum_cost != ''): ?> 150*bf67f2caSSzymon Olewniczak <?php echo $tpl->get('thread')->task_sum_cost ?> 151*bf67f2caSSzymon Olewniczak <?php else: ?> 152*bf67f2caSSzymon Olewniczak <em>---</em> 153*bf67f2caSSzymon Olewniczak <?php endif ?> 154*bf67f2caSSzymon Olewniczak </td> 155*bf67f2caSSzymon Olewniczak <td> 156*bf67f2caSSzymon Olewniczak <strong><?php echo $tpl->getLang('coordinator') ?>:</strong> 157*bf67f2caSSzymon Olewniczak <?php echo $tpl->user_name($tpl->get('thread')->coordinator) ?> 158*bf67f2caSSzymon Olewniczak </td> 159*bf67f2caSSzymon Olewniczak </tr> 160*bf67f2caSSzymon Olewniczak </table> 161*bf67f2caSSzymon Olewniczak<?php endif ?> 162