updated policy display

pull/820/merge
Justin Richer 2015-07-02 15:10:11 -04:00
parent f0d628bf27
commit 1259b8cd68
2 changed files with 8 additions and 9 deletions

View File

@ -21,15 +21,16 @@ var ResourceSetModel = Backbone.Model.extend({
var ResourceSetCollection = Backbone.Collection.extend({ var ResourceSetCollection = Backbone.Collection.extend({
model: ResourceSetModel, model: ResourceSetModel,
url: 'api/claims' url: 'api/policy'
}); });
var ClaimModel = Backbone.Model.extend({ var PolicyModel = Backbone.Model.extend({
}); });
var ClaimCollection = Backbone.Collection.extend({ var PolicyCollection = Backbone.Collection.extend({
model: ClaimModel model: PolicyModel,
baseUrl: 'api/policy'
}); });
var ResourceSetListView = Backbone.View.extend({ var ResourceSetListView = Backbone.View.extend({

View File

@ -48,11 +48,9 @@
<div class="client-more-info-block"></div> <div class="client-more-info-block"></div>
<div class="scope-list"></div> <div class="scope-list"></div>
<div><span class="text-warning" data-i18n="policy.policy-table.shared-with"><i class="icon-share"></i> Shared with:</span> <div><span class="text-warning" data-i18n="policy.policy-table.shared-with"><i class="icon-share"></i> Shared with:</span>
<% if (!_.isEmpty(rs.claimsRequired)) { <% if (!_.isEmpty(rs.policies)) {
_.each(rs.claimsRequired, function(claim) { %> %><span class="label label-info"><%- _.size(rs.policies) %></span>
<span class="label label-info"><%- claim.value %></span> <% } else { %>
<% });
} else { %>
<span class="label label-important" data-i18n="policy.policy-table.shared-nobody;[title]policy.policy-table.shared-nobody-tooltip" title="This resource is not accessible by anyone else, edit the policies and share it with someone.">NOBODY</span> <span class="label label-important" data-i18n="policy.policy-table.shared-nobody;[title]policy.policy-table.shared-nobody-tooltip" title="This resource is not accessible by anyone else, edit the policies and share it with someone.">NOBODY</span>
<% } %> <% } %>