fixed stats pluralization flub
parent
e4bb30bd58
commit
199131ba77
|
@ -3,11 +3,11 @@
|
|||
<p id="statsloader" class="muted">Loading statistics...</p>
|
||||
|
||||
<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
|
||||
<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
|
||||
<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">
|
||||
|
||||
|
@ -20,16 +20,16 @@ $(document).ready(function() {
|
|||
var stats = data;
|
||||
|
||||
$('#userCount').html(stats.userCount);
|
||||
if (stats.userCount == 1) {
|
||||
if (stats.userCount != 1) {
|
||||
$('#userCountLabel').append('s');
|
||||
}
|
||||
$('#clientCount').html(stats.clientCount);
|
||||
if (stats.clientCount == 1) {
|
||||
$('#clientCount').append('s');
|
||||
if (stats.clientCount != 1) {
|
||||
$('#clientCountLabel').append('s');
|
||||
}
|
||||
$('#approvalCount').html(stats.approvalCount);
|
||||
if (stats.approvalCount == 1) {
|
||||
$('#approvalCount').append('s');
|
||||
if (stats.approvalCount != 1) {
|
||||
$('#approvalCountLabel').append('s');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue