mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 22:30:30 -04:00
Add projects index page, and more detail on placeholder pages
This commit is contained in:
parent
fe5bb8ed48
commit
c7a4e34e31
15 changed files with 211 additions and 59 deletions
48
templates/ProjectsTable.php
Normal file
48
templates/ProjectsTable.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?
|
||||
/**
|
||||
* @var array<Project> $projects
|
||||
*/
|
||||
|
||||
$includeTitle = $includeTitle ?? true;
|
||||
?>
|
||||
<table class="data-table">
|
||||
<caption aria-hidden="hidden">Scroll right →</caption>
|
||||
<thead>
|
||||
<tr class="mid-header">
|
||||
<? if($includeTitle){ ?>
|
||||
<th scope="col">Title</th>
|
||||
<? } ?>
|
||||
<th scope="col">Started</th>
|
||||
<th scope="col">Producer</th>
|
||||
<th scope="col">Status</th>
|
||||
<th/>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? foreach($projects as $project){ ?>
|
||||
<tr>
|
||||
<? if($includeTitle){ ?>
|
||||
<td class="row-header">
|
||||
<a href="<?= $project->Ebook->Url ?>"><?= Formatter::EscapeHtml($project->Ebook->Title) ?></a>
|
||||
</td>
|
||||
<? } ?>
|
||||
<td>
|
||||
<?= $project->Started->format(Enums\DateTimeFormat::ShortDate->value) ?>
|
||||
</td>
|
||||
<td class="producer">
|
||||
<? if($project->ProducerEmail !== null){ ?>
|
||||
<a href="mailto:<?= Formatter::EscapeHtml($project->ProducerEmail) ?>"><?= Formatter::EscapeHtml($project->ProducerName) ?></a>
|
||||
<? }else{ ?>
|
||||
<?= Formatter::EscapeHtml($project->ProducerName) ?>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td class="status">
|
||||
<?= ucfirst($project->Status->GetDisplayName()) ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= Formatter::EscapeHtml($project->VcsUrl) ?>">GitHub repo</a>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue