scope management UI

pull/306/merge
Justin Richer 2013-01-31 15:15:10 -05:00
parent a3037a18a7
commit 1ceee853f9
2 changed files with 36 additions and 0 deletions

View File

@ -222,6 +222,15 @@
return new SystemScopeCollection(filtered); return new SystemScopeCollection(filtered);
}, },
getByValue: function(value) {
var scopes = this.where({value: scope});
if (scopes.length == 1) {
return scopes[0];
} else {
return null;
}
}
}); });
var ClientModel = Backbone.Model.extend({ var ClientModel = Backbone.Model.extend({

View File

@ -531,4 +531,31 @@
</fieldset> </fieldset>
</form> </form>
</script>
<!-- system scope -->
<script type="text/html" id = "tmpl-system-scope-table">
<div class="well well-small">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button> &nbsp;
<button class="btn btn-small btn-primary new-client"><i class="icon-plus icon-white"></i> New Scope</button>
</div>
<table id="client-table" class="table table-hover table-striped">
<thead>
<tr>
<th></th>
<th>Scope</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="well well-small">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button> &nbsp;
<button class="btn btn-small btn-primary new-client"><i class="icon-plus icon-white"></i> New Scope</button>
</div>
</script> </script>