Allow editing of projects

This commit is contained in:
Alex Cabal 2024-12-18 14:20:28 -06:00
parent e21f411191
commit b2191d1219
16 changed files with 191 additions and 75 deletions

View file

@ -4,13 +4,16 @@
*/
$showAddButton = $showAddButton ?? false;
$showEditButton = $showEditButton ?? false;
?>
<section id="projects">
<h2>Projects</h2>
<? if($showAddButton){ ?>
<a href="<?= $ebook->Url ?>/projects/new">New project</a>
<p>
<a href="<?= $ebook->Url ?>/projects/new">New project</a>
</p>
<? } ?>
<? if(sizeof($ebook->Projects) > 0){ ?>
<?= Template::ProjectsTable(['projects' => $ebook->Projects, 'includeTitle' => false]) ?>
<?= Template::ProjectsTable(['projects' => $ebook->Projects, 'includeTitle' => false, 'showEditButton' => $showEditButton]) ?>
<? } ?>
</section>