Merged in bugfix/MAPG-117-map-selection-page (pull request #94)

MAPG-117 show the edit button only if user is admin
This commit is contained in:
Bence Pőcze 2020-06-10 18:22:51 +00:00
commit cfb0513825

View File

@ -31,7 +31,9 @@
<p class="small justify marginTop"><?= $map['description'] ?></p> <p class="small justify marginTop"><?= $map['description'] ?></p>
</div> </div>
<a class="button fullWidth" href="game/<?= $map['id']; ?>" title="Play map '<?= $map['name'] ?>'">Play this map</a> <a class="button fullWidth" href="game/<?= $map['id']; ?>" title="Play map '<?= $map['name'] ?>'">Play this map</a>
<a class="button yellow fullWidth marginTop" href="admin/mapEditor/<?= $map['id']; ?>" title="Edit map '<?= $map['name'] ?>'">Edit this map</a> <?php if ($isAdmin): ?>
<a class="button yellow fullWidth marginTop" href="admin/mapEditor/<?= $map['id']; ?>" title="Edit map '<?= $map['name'] ?>'">Edit this map</a>
<?php endif; ?>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<?php if (count($maps) < 4): ?> <?php if (count($maps) < 4): ?>