game overview now works using clearsilver.

This commit is contained in:
phear 2005-12-13 10:10:34 +00:00
parent 34420b0598
commit 6abbcee533
6 changed files with 99 additions and 131 deletions

View file

@ -0,0 +1,3 @@
<?cs include:"templates/header.cs" ?>
You must be logged in to access this page.
<?cs include:Settings.TemplateDir +"footer.cs" ?>

38
templates/overview.cs Normal file
View file

@ -0,0 +1,38 @@
<?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 /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" ?>