-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate_tarefa.php
70 lines (63 loc) · 1.99 KB
/
template_tarefa.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>tarefa</title>
</head>
<body>
<h1>Tarefa: <?php echo $tarefa['nome'];?></h1>
<p>
<a href="tarefas.php">Voltar para a lista de tarefas</a>
</p>
<p>
<strong>Concluída:</strong>
<?php echo nl2br($tarefa['descricao']);?>
</p>
<p>
<strong>Prazo:</strong>
<?php echo traduz_data_para_exibir($tarefa['prazo']);?>
</p>
<p>
<strong>Prioridade:</strong>
<?php echo traduz_prioridade($tarefa['prioridade']);?>
</p>
<h2>Anexos</h2>
<!-- lista de anexos -->
<?php if (count($anexos) > 0) : ?>
<table>
<tr>
<th>Arquivo</th>
<th>Opções</th>
</tr>
<?php foreach($anexos as $anexo) : ?>
<tr>
<td><?php echo $anexo['nome'];?></td>
<td>
<a href="anexos/<?php echo $anexo['arquivo'];?>">Download</a>
</td>
</tr>
<?php endforeach;?>
</table>
<?php else : ?>
<p>Não há anexos para esta tarefa.</p>
<?php endif;?>
<!-- formulário para um novo anexo -->
<form action="" method="post" enctype="multipart/form-data">
<fieldset>
<legend>Novo anexo</legend>
<input type="hidden" name="tarefa_id" value="<?php echo $tarefa['id'];?>">
<label>
<?php if ($tem_erros && isset($erros_validacao['anexo'])) : ?>
<span class="erro">
<?php echo $erros_validacao['anexo'];?>
</span>
<?php endif;?>
<input type="file" name="anexo">
</label>
<input type="submit" value="Cadastrar">
</fieldset>
</form>
</body>
</html>