Added some created at data and cleaned up some stuff

This commit is contained in:
Josh Sherman 2013-12-17 20:01:33 -05:00
parent 64a246838b
commit 706ebca0cf
5 changed files with 63 additions and 33 deletions

View file

@ -25,9 +25,9 @@ if ($this->module['api_key'])
<p class="lead">All <?php echo $site; ?> API calls start with <span class="label label-primary"><?php echo $url; ?>{version}</span> where <span class="label label-primary">{version}</span> corresponds to the version of the API you would like to use.</p>
<p class="lead">The current version of the <?php echo $site; ?> API is <span class="label label-primary">v1.0</span></p>
<p class="lead">The current version of the <?php echo $site; ?> API is <span class="label label-primary">v1</span></p>
<?php $url .= 'v1.0/'; ?>
<?php $url .= 'v1/'; ?>
<h2>Authentication</h2>

View file

@ -11,25 +11,39 @@
<?php
if ($this->module['leaderboards'])
{
echo '<table class="table table-striped table-responsive">';
echo '<thead><tr><th>UID</th><th>Name</th><th>Last Activity</th><th></th></tr></thead><tbody>';
foreach ($this->module['leaderboards'] as $uid => $updated_at)
{
?>
<tr class="lead">
<td><?php echo $uid; ?></td>
<td><a href="/leaderboard/<?php echo $uid; ?>"><?php echo $this->module['names'][$uid]; ?></a></td>
<td><?php echo Time::ago($updated_at); ?></td>
<td class="text-right">
<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>
</td>
</tr>
<?php
}
echo '</tbody></table>';
?>
<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 => $updated_at)
{
$data = $this->module['data'][$uid];
?>
<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($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
{