Skip to content

Commit f6d6886

Browse files
committedOct 5, 2017
Do not show "Show Annotations" link when there are none
1 parent 6ef0e8b commit f6d6886

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed
 

‎app/views/directives/annotations.html

+21-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
<p ng-class="{'mar-bottom-xl': !expandAnnotations}">
2-
<a href="" ng-click="toggleAnnotations()" ng-if="!expandAnnotations">Show Annotations</a>
3-
<a href="" ng-click="toggleAnnotations()" ng-if="expandAnnotations">Hide Annotations</a>
1+
<p ng-if="annotations" ng-class="{'mar-bottom-xl': !expandAnnotations}">
2+
<a href="" ng-click="toggleAnnotations()">{{!expandAnnotations ? 'Hide Annotations' : 'Show Annotations'}}</a>
43
</p>
5-
<div ng-if="expandAnnotations">
6-
<div ng-if="annotations" class="table-responsive scroll-shadows-horizontal">
7-
<table class="table table-bordered table-bordered-columns key-value-table">
8-
<tbody>
9-
<tr ng-repeat="(annotationKey, annotationValue) in annotations">
10-
<td class="key">{{annotationKey}}</td>
11-
<td class="value">
12-
<truncate-long-text
13-
content="annotationValue | prettifyJSON"
14-
limit="500"
15-
newline-limit="20"
16-
expandable="true">
17-
</truncate-long-text>
18-
</td>
19-
</tr>
20-
</tbody>
21-
</table>
22-
</div>
23-
<p ng-if="!annotations" class="mar-bottom-xl">
24-
There are no annotations on this resource.
25-
</p>
4+
<div ng-if="expandAnnotations && annotations" class="table-responsive scroll-shadows-horizontal">
5+
<table class="table table-bordered table-bordered-columns key-value-table">
6+
<tbody>
7+
<tr ng-repeat="(annotationKey, annotationValue) in annotations">
8+
<td class="key">{{annotationKey}}</td>
9+
<td class="value">
10+
<truncate-long-text
11+
content="annotationValue | prettifyJSON"
12+
limit="500"
13+
newline-limit="20"
14+
expandable="true">
15+
</truncate-long-text>
16+
</td>
17+
</tr>
18+
</tbody>
19+
</table>
2620
</div>
21+
<p ng-if="!annotations" class="mar-bottom-xl">
22+
There are no annotations on this resource.
23+
</p>

‎dist/scripts/templates.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -5763,12 +5763,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
57635763

57645764

57655765
$templateCache.put('views/directives/annotations.html',
5766-
"<p ng-class=\"{'mar-bottom-xl': !expandAnnotations}\">\n" +
5767-
"<a href=\"\" ng-click=\"toggleAnnotations()\" ng-if=\"!expandAnnotations\">Show Annotations</a>\n" +
5768-
"<a href=\"\" ng-click=\"toggleAnnotations()\" ng-if=\"expandAnnotations\">Hide Annotations</a>\n" +
5766+
"<p ng-if=\"annotations\" ng-class=\"{'mar-bottom-xl': !expandAnnotations}\">\n" +
5767+
"<a href=\"\" ng-click=\"toggleAnnotations()\">{{!expandAnnotations ? 'Hide Annotations' : 'Show Annotations'}}</a>\n" +
57695768
"</p>\n" +
5770-
"<div ng-if=\"expandAnnotations\">\n" +
5771-
"<div ng-if=\"annotations\" class=\"table-responsive scroll-shadows-horizontal\">\n" +
5769+
"<div ng-if=\"expandAnnotations && annotations\" class=\"table-responsive scroll-shadows-horizontal\">\n" +
57725770
"<table class=\"table table-bordered table-bordered-columns key-value-table\">\n" +
57735771
"<tbody>\n" +
57745772
"<tr ng-repeat=\"(annotationKey, annotationValue) in annotations\">\n" +
@@ -5783,8 +5781,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
57835781
"</div>\n" +
57845782
"<p ng-if=\"!annotations\" class=\"mar-bottom-xl\">\n" +
57855783
"There are no annotations on this resource.\n" +
5786-
"</p>\n" +
5787-
"</div>"
5784+
"</p>"
57885785
);
57895786

57905787

0 commit comments

Comments
 (0)
Please sign in to comment.