This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
56 lines (50 loc) · 1.56 KB
/
index.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
<?php declare(strict_types=1);
require_once './inc/util.php';
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./assets/style/main.css">
<script src="./assets/js/main.js"></script>
<title>Projekten</title>
</head>
<body>
<nav>
<a href="./index.php">Home</a>
<a href="./timesheet-set.html">Zeiterfassung</a>
<a href="./vacation-set.html">Ferien</a>
<a href="./equipment-list.php">Equipment</a>
<a href="./reservation-set.html">Reservation</a>
<a href="./index.php">Home</a>
</nav>
<section class="object-list">
<?php
$order = ["ProjectName"=>"ASC"];
foreach (\NeueMedien\projectview::findAll( order:$order ) as $projectID => $project) {
?><div class='object-tile' href='project-detail.php?pid=<?= $projectID ?>'>
<div class='flip-card-inner'>
<div class='flip-card-front'>
<h1><?= $project->ProjectName ?>
</div>
<div class='flip-card-back'>
<h3><?= $project->ProjectName ?>
<p><?=$project->ProjectNr?>
<p>Type: <?=$project->ProjectType?>
<p>Coach: <?=$project->Coach?>
</div>
</div>
</div>
<?php } ?>
</section>
</body>
<script>
$('.object-list').addEventListener('click', function(e) {
const projectTile = e.target.closest('.object-tile');
if (projectTile) {
e.preventDefault();
window.location.href = projectTile.getAttribute('href');
}
});
</script>
</html>