mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 02:47:36 -02:30
Adjust template to account for more than one tag type.
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
<div class="ToggleComponent-wrapper">
|
<div class="ToggleComponent-wrapper">
|
||||||
<div ng-show="vm.truncated" class="ToggleComponent-container">
|
<div ng-show="vm.truncated" class="ToggleComponent-container">
|
||||||
<div ng-repeat="tag in vm.tags | limitTo: vm.truncatedLength">
|
<div ng-repeat="tag in vm.tags | limitTo: vm.truncatedLength">
|
||||||
<at-tag tag="tag.value" icon="{{ tag.icon }}" link="{{ tag.link }}"></at-tag>
|
<at-tag ng-if="tagType === 'cred'" tag="tag.value" icon="{{ tag.icon }}" link="{{ tag.link }}"></at-tag>
|
||||||
|
<at-tag ng-if="tagType !== 'cred'" tag="tag.value"></at-tag>
|
||||||
</div>
|
</div>
|
||||||
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_MORE') }}</button>
|
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_MORE') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="!vm.truncated" class="ToggleComponent-container">
|
<div ng-show="!vm.truncated" class="ToggleComponent-container">
|
||||||
<div ng-repeat="tag in vm.tags">
|
<div ng-repeat="tag in vm.tags">
|
||||||
<at-tag tag="tag.value" icon="{{ tag.icon }}" link="{{ tag.link }}"></at-tag>
|
<at-tag ng-if="tagType === 'cred'" tag="tag.value" icon="{{ tag.icon }}" link="{{ tag.link }}"></at-tag>
|
||||||
|
<at-tag ng-if="tagType !== 'cred'" tag="tag.value"></at-tag>
|
||||||
</div>
|
</div>
|
||||||
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_LESS') }}</button>
|
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_LESS') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ function TagService (strings, $filter) {
|
|||||||
};
|
};
|
||||||
this.buildTag = tag => {
|
this.buildTag = tag => {
|
||||||
const value = $filter('sanitize')(tag);
|
const value = $filter('sanitize')(tag);
|
||||||
|
|
||||||
return { value };
|
return { value };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user