DeveloperApp.SliceListView = Marionette.CompositeView.extend({
tagName: "table",\r
- className: "table table-bordered",\r
+ className: "table table-bordered table-striped",\r
template: "#developer-slicetable-template",\r
childView: DeveloperApp.SliceDetailView,\r
childViewContainer: "tbody",\r
this.collection.sortVar = fieldName;\r
this.collection.sortOrder = order;\r
this.collection.sort();\r
- }\r
+ },\r
+\r
+ attachHtml: function(compositeView, childView, index) {\r
+ // The REST API will let admin users see everything. For the developer\r
+ // view we still want to hide slices we are not members of.\r
+ if (childView.model.get("sliceInfo").roles.length == 0) {\r
+ return;\r
+ }\r
+ DeveloperApp.SliceListView.__super__.attachHtml(compositeView, childView, index);\r
+ },\r
});\r
DeveloperApp.on("start", function() {