Delink the build-mini-status if the user is not the repo admin
This commit is contained in:
parent
ab2331a486
commit
99c56b7f98
3 changed files with 19 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
|||
<a class="build-mini-status-element" href="/repository/{{ build.repository.namespace }}/{{ build.repository.name }}/build/{{ build.id }}">
|
||||
<span class="build-mini-status-element">
|
||||
<a href="/repository/{{ build.repository.namespace }}/{{ build.repository.name }}/build/{{ build.id }}"
|
||||
ng-if="is_admin">
|
||||
<div>
|
||||
<span class="build-state-icon" build="build"></span>
|
||||
<span class="timing">
|
||||
|
@ -7,4 +9,14 @@
|
|||
|
||||
<div class="build-description triggered-build-description" build="build"></div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
|
||||
<div ng-if="!is_admin">
|
||||
<span class="build-state-icon" build="build"></span>
|
||||
<span class="timing">
|
||||
<i class="fa fa-clock-o"></i><span am-time-ago="build.started || 0"></span>
|
||||
</span>
|
||||
|
||||
<div class="build-description triggered-build-description" build="build"></div>
|
||||
</div>
|
||||
</span>
|
|
@ -48,7 +48,8 @@
|
|||
|
||||
<!-- Builds -->
|
||||
<div ng-if="builds && builds.length">
|
||||
<div class="build-mini-status" ng-repeat="build in builds" build="build"></div>
|
||||
<div class="build-mini-status" ng-repeat="build in builds" build="build"
|
||||
is-admin="repository.can_admin"></div>
|
||||
</div>
|
||||
|
||||
<!-- View All -->
|
||||
|
|
|
@ -9,7 +9,8 @@ angular.module('quay').directive('buildMiniStatus', function () {
|
|||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'build': '=build'
|
||||
'build': '=build',
|
||||
'isAdmin': '=isAdmin'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.isBuilding = function(build) {
|
||||
|
|
Reference in a new issue