| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <table class="table table-sm table-hover">
- <thead>
- <tr>
- <th class="text-right pr-3">ID</th>
- <th>Name</th>
- <th>Deadline</th>
- <th>Report Month</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($projects as $project) {
- $date_deadline = explode(" ", $project->dts_deadline)[0];
- $report_month = "N/A";
- if($project->dts_report) {
- $dt_report = new DateTime($project->dts_report . " UTC");
- $report_month = $dt_report->format("M Y");
- }
- ?>
- <tr>
- <td class="text-right pr-3 align-middle">
- <?=$project->id?>
- </td>
- <td class="align-middle">
- <a href="/account/projects/<?=$project->id?>"><?=htmlspecialchars($project->name)?></a>
- </td>
- <td class="align-middle">
- <?=$date_deadline?>
- </td>
- <td class="align-middle">
- <?=$report_month?>
- </td>
- <td class="text-right align-middle">
- <a class="btn btn-outline-primary" href="/account/projects/<?=$project->id?>/edit">Edit</a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- if(empty($projects)) {
- ?>
- <div class="alert alert-info">
- No projects to display.
- </div>
- <?php
- }
- ?>
|