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,5 +1,17 @@
|
||||||
<a class="build-mini-status-element" href="/repository/{{ build.repository.namespace }}/{{ build.repository.name }}/build/{{ build.id }}">
|
<span class="build-mini-status-element">
|
||||||
<div>
|
<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">
|
||||||
|
<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>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div ng-if="!is_admin">
|
||||||
<span class="build-state-icon" build="build"></span>
|
<span class="build-state-icon" build="build"></span>
|
||||||
<span class="timing">
|
<span class="timing">
|
||||||
<i class="fa fa-clock-o"></i><span am-time-ago="build.started || 0"></span>
|
<i class="fa fa-clock-o"></i><span am-time-ago="build.started || 0"></span>
|
||||||
|
@ -7,4 +19,4 @@
|
||||||
|
|
||||||
<div class="build-description triggered-build-description" build="build"></div>
|
<div class="build-description triggered-build-description" build="build"></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</span>
|
|
@ -48,7 +48,8 @@
|
||||||
|
|
||||||
<!-- Builds -->
|
<!-- Builds -->
|
||||||
<div ng-if="builds && builds.length">
|
<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>
|
</div>
|
||||||
|
|
||||||
<!-- View All -->
|
<!-- View All -->
|
||||||
|
|
|
@ -9,7 +9,8 @@ angular.module('quay').directive('buildMiniStatus', function () {
|
||||||
transclude: false,
|
transclude: false,
|
||||||
restrict: 'C',
|
restrict: 'C',
|
||||||
scope: {
|
scope: {
|
||||||
'build': '=build'
|
'build': '=build',
|
||||||
|
'isAdmin': '=isAdmin'
|
||||||
},
|
},
|
||||||
controller: function($scope, $element) {
|
controller: function($scope, $element) {
|
||||||
$scope.isBuilding = function(build) {
|
$scope.isBuilding = function(build) {
|
||||||
|
|
Reference in a new issue