Merge pull request #5726 from AlanCoding/jt_org_2020

Add read-only organization field to job templates

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-03-16 20:03:47 +00:00
committed by GitHub
46 changed files with 1325 additions and 412 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

@@ -92,6 +92,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',