split approved sites into two tables

pull/263/head
Justin Richer 2012-12-21 15:35:33 -05:00
parent 198a45369a
commit a85b1f5d74
2 changed files with 27 additions and 5 deletions

View File

@ -673,7 +673,13 @@
var client = app.clientList.getByClientId(approvedSite.get('clientId'));
if (client != null) {
$('#grant-table', this.el).append(new ApprovedSiteView({model: approvedSite, client: client}).render().el);
if (approvedSite.get('whitelistedSite') != null) {
$('#grant-whitelist-table', this.el).append(new ApprovedSiteView({model: approvedSite, client: client}).render().el);
} else {
$('#grant-table', this.el).append(new ApprovedSiteView({model: approvedSite, client: client}).render().el);
}
}
}, this);

View File

@ -373,12 +373,14 @@
<script type="text/html" id="tmpl-grant-table">
<h2>Your approved sites</h2>
<h2>Approved sites</h2>
<div class="well">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i></button>
</div>
<h3>Sites you have manually approved</h3>
<table id="grant-table" class="table">
<thead>
<tr>
@ -394,6 +396,23 @@
</tbody>
</table>
<h3>Sites that have been whitelisted by an administrator</h3>
<table id="grant-whitelist-table" class="table">
<thead>
<tr>
<th></th>
<th>Application</th>
<th>Created</th>
<th>Last Accessed</th>
<th>Expires</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="well">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i></button>
</div>
@ -405,9 +424,6 @@
<% if (client.dynamicallyRegistered) { %>
<span class="dynamically-registered"><i class="icon-globe"></i></span>
<% } %>
<% if (grant.whitelistedSite != null) { %>
<span class="whitelisted-site"><i class="icon-thumbs-up"></i></span>
<% } %>
</td>
<td>