Handle the three different owner types (organization, user, team) with separate links

This commit is contained in:
Michael Abashian
2016-06-06 17:01:16 -04:00
parent ae06286a01
commit 731e2384bb

View File

@@ -1,3 +1,5 @@
<div ng-repeat="owner in owners_list"> <div ng-repeat="owner in owners_list">
<a ui-sref="organizations.edit({ organization_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a> <a ng-if="owner.type === 'organization'" ui-sref="organizations.edit({ organization_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
<a ng-if="owner.type === 'user'" ui-sref="users.edit({ user_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
<a ng-if="owner.type === 'team'" ui-sref="teams.edit({ team_id: owner.id })">{{ owner.name }}{{$last ? '' : ', '}}</a>
</div> </div>