webgo/templates/overview.cs

40 lines
1.2 KiB
C#
Raw Normal View History

<?cs include:"templates/header.cs" ?>
<h2> Current Games: </h2>
<?cs if:Data.GamelistNotEmpty ?>
<table><tr><td></td><td>Name of game</td><td>White</td>
<td>Black</td><td>Time of Creation</td><td>Time of last move</td>
<td></td></tr>
<?cs each:game = Data.Games ?>
<tr><form action="/playgame/" method="get">
<input type="hidden" name="game" value="<?cs var:game.Name ?>">
<td><input type=submit class="submit" value="Play"></form></td>
<td><?cs var:game.Description ?></td>
<td><?cs var:game.Player1 ?></td>
<td><?cs var:game.Player2 ?></td>
<td><?cs var:game.Created ?></td>
<td><?cs var:game.Lastmove ?></td>
<td><form action="/overview/" method="get">
<input type="hidden" name="game" value="<?cs var:game.Name ?>">
<input type=submit class="submit" name="delete" value="Delete"></form></td>
</tr>
<?cs /each ?>
</table>
<?cs else ?>
You don't have any running games.
<?cs /if ?>
<h2>New Game:</h2>
<?cs if:Data.Counter ?>
You have <?cs var:Data.Counter ?> free game slots.<br>
<a href="/gamecreation"> Start a new game</a><br>
<?cs else ?>
Sorry, all your game slots are in use.
<?cs /if ?>
<?cs include:Settings.TemplateDir +"footer.cs" ?>