add organization to template views in old and new ui

This commit is contained in:
John Mitchell
2020-02-05 15:51:55 -05:00
committed by AlanCoding
parent 7d0b207571
commit 7547793792
4 changed files with 21 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ function TemplatesStrings (BaseString) {
ADD_DD_JT_LABEL: t.s('Job Template'),
ADD_DD_WF_LABEL: t.s('Workflow Template'),
OPEN_WORKFLOW_VISUALIZER: t.s('Click here to open the workflow visualizer'),
ROW_ITEM_LABEL_ORGANIZATION: t.s('Organization'),
ROW_ITEM_LABEL_DESCRIPTION: t.s('Description'),
ROW_ITEM_LABEL_ACTIVITY: t.s('Activity'),
ROW_ITEM_LABEL_INVENTORY: t.s('Inventory'),

View File

@@ -91,6 +91,11 @@
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_DESCRIPTION') }}"
value="{{ template.description | sanitize }}">
</at-row-item>
<at-row-item
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_ORGANIZATION') }}"
value="{{ template.summary_fields.organization.name }}"
value-link="/#/organizations/{{ template.summary_fields.organization.id }}">
</at-row-item>
<at-row-item
label-value="{{:: vm.strings.get('list.ROW_ITEM_LABEL_INVENTORY') }}"
value="{{ template.summary_fields.inventory.name }}"

View File

@@ -47,6 +47,7 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
sourceField: 'name',
dataTitle: i18n._('Organization'),
required: true,
awPopOver: '<p>' + i18n._('When this project is used by a Job Template, Organization cannot be changed.') + '</p>',
dataContainer: 'body',
dataPlacement: 'right',
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd) || !canEditOrg',