Corrected some bugs when editing stats and added some files I forgot.

This commit is contained in:
José Carlos Cuevas 2013-06-04 01:45:36 +02:00
parent a47943e5f9
commit 1c6db4313a
3 changed files with 39 additions and 0 deletions

11
views/player.html Normal file
View file

@ -0,0 +1,11 @@
$def with (player_name, player_id, stats, edit_links)
<h2>$player_name summary</h2>
<p>Player UUID:
<textarea style="width: 98%;">$player_id</textarea></p>
<p>Player stats:<br />
<ul>
$for stat in stats:
<li>$stat: $stats[stat]</li>
</ul>
$if edit_links:
<p><a href="/app/player_edit/$player_name">[edit]</a>&nbsp;<a href="/app/player_remove/$player_name">[remove]</a></p>

14
views/register.html Normal file
View file

@ -0,0 +1,14 @@
$def with (register_form, registering_new)
$if registering_new:
<h2>Registering new player</h2>
$else:
<h2>Modifying player</h2>
<div class="register_form">
$if registering_new:
<form name="register_player_form" method="post" action="register">
$else:
<form name="edit_player_form" method="post" action="">
$:register_form
</form>
</div>

14
views/statistics.html Normal file
View file

@ -0,0 +1,14 @@
$def with (game_name, stats, add_stat_form)
<h2>$game_name stat list</h2>
<ul>
$for stat in stats:
<li>$stat.name (default: $stat.default_value)
<a href="/app/stats/edit/$stat.id">[edit]</a>&nbsp;
<a href="/app/stats/remove/$stat.id">[remove]</a>
</li>
</ul>
<div class="stat_form">
<form name="add_stat_form" method="post" action="stats/add">
$:add_stat_form
</form>
</div>