Had to work out the API parent class a bit. Also closing #8 as the API docs are about done. Time to knock out the rest of the API calls so I can start using this shit.
51 lines
1.2 KiB
PHTML
51 lines
1.2 KiB
PHTML
<div class="row">
|
|
<div class="col-xs-12 col-sm-6">
|
|
<h1>My Leaderboards</h1>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-6 text-right">
|
|
<br>
|
|
<a class="btn btn-success" href="/leaderboard/new">New Leaderboard</a>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
if ($this->module['leaderboards'])
|
|
{
|
|
?>
|
|
<table class="table table-striped table-responsive">
|
|
<thead><tr>
|
|
<th>UID</th>
|
|
<th>Name</th>
|
|
<th>Created</th>
|
|
<th>Last Activity</th>
|
|
<th></th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<?php
|
|
foreach ($this->module['leaderboards'] as $uid => $data)
|
|
{
|
|
?>
|
|
<tr class="lead">
|
|
<td><?php echo $uid; ?></td>
|
|
<td><a href="/leaderboard/<?php echo $uid; ?>"><?php echo $data['name']; ?></a></td>
|
|
<td><?php echo Time::ago($data['created_at']); ?></td>
|
|
<td><?php echo Time::ago($data['updated_at']); ?></td>
|
|
<td class="text-right">
|
|
<div class="btn-group">
|
|
<a class="btn btn-danger" href="/leaderboard/delete/<?php echo $uid; ?>">Delete</a>
|
|
<a class="btn btn-primary" href="/leaderboard/edit/<?php echo $uid; ?>">Edit</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
echo '<div class="lead">You have no leaderboards, <a href="/leaderboard/new">want to create one?</a></div>';
|
|
}
|
|
?>
|