mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Adjust template to account for more than one tag type.
This commit is contained in:
parent
cc91729f72
commit
22ddf7883a
@ -1,13 +1,15 @@
|
||||
<div class="ToggleComponent-wrapper">
|
||||
<div ng-show="vm.truncated" class="ToggleComponent-container">
|
||||
<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>
|
||||
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_MORE') }}</button>
|
||||
</div>
|
||||
<div ng-show="!vm.truncated" class="ToggleComponent-container">
|
||||
<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>
|
||||
<button class="ToggleComponent-button" ng-click="vm.toggle()">{{:: vm.strings.get('toggle.VIEW_LESS') }}</button>
|
||||
</div>
|
||||
|
||||
@ -9,6 +9,7 @@ function TagService (strings, $filter) {
|
||||
};
|
||||
this.buildTag = tag => {
|
||||
const value = $filter('sanitize')(tag);
|
||||
|
||||
return { value };
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user