fixed stats pluralization flub

pull/618/head
Justin Richer 11 years ago
parent e4bb30bd58
commit 199131ba77

@ -3,11 +3,11 @@
<p id="statsloader" class="muted">Loading statistics...</p> <p id="statsloader" class="muted">Loading statistics...</p>
<p id="stats">There have been <p id="stats">There have been
<span class="label label-info" id="userCount">?</span> <span id="userCountLabel">users</span> <span class="label label-info" id="userCount">?</span> <span id="userCountLabel">user</span>
of this system who have authorized of this system who have authorized
<span class="label label-info" id="clientCount">?</span> total <span id="clientCountLabel">sites</span>, <span class="label label-info" id="clientCount">?</span> <span id="clientCountLabel">application</span>,
with a total of with a total of
<span class="label label-info" id="approvalCount">?</span> site <span id="approvalCountLabel">approvals</span>.</p> <span class="label label-info" id="approvalCount">?</span> site <span id="approvalCountLabel">approval</span>.</p>
<script type="text/javascript"> <script type="text/javascript">
@ -20,16 +20,16 @@ $(document).ready(function() {
var stats = data; var stats = data;
$('#userCount').html(stats.userCount); $('#userCount').html(stats.userCount);
if (stats.userCount == 1) { if (stats.userCount != 1) {
$('#userCountLabel').append('s'); $('#userCountLabel').append('s');
} }
$('#clientCount').html(stats.clientCount); $('#clientCount').html(stats.clientCount);
if (stats.clientCount == 1) { if (stats.clientCount != 1) {
$('#clientCount').append('s'); $('#clientCountLabel').append('s');
} }
$('#approvalCount').html(stats.approvalCount); $('#approvalCount').html(stats.approvalCount);
if (stats.approvalCount == 1) { if (stats.approvalCount != 1) {
$('#approvalCount').append('s'); $('#approvalCountLabel').append('s');
} }

Loading…
Cancel
Save