disable toggle on individual schedule pages, also show view schedule buttons even if user doesn't have edit permission

This commit is contained in:
John Mitchell
2017-01-30 13:35:41 -05:00
parent 4b2daba3f7
commit 55643d5a1d
4 changed files with 2 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ export default
awToolTip: "{{ group.group_schedule_tooltip }}", awToolTip: "{{ group.group_schedule_tooltip }}",
ngClass: "group.scm_type_class", ngClass: "group.scm_type_class",
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "!(group.summary_fields.inventory_source.source === '') && group.summary_fields.user_capabilities.schedule" ngShow: "!(group.summary_fields.inventory_source.source === '')"
}, },
edit: { edit: {
//label: 'Edit', //label: 'Edit',

View File

@@ -97,7 +97,6 @@ export default
awToolTip: "{{ project.scm_schedule_tooltip }}", awToolTip: "{{ project.scm_schedule_tooltip }}",
ngClass: "project.scm_type_class", ngClass: "project.scm_type_class",
dataPlacement: 'top', dataPlacement: 'top',
ngShow: "project.summary_fields.user_capabilities.schedule"
}, },
edit: { edit: {
ngClick: "editProject(project.id)", ngClick: "editProject(project.id)",

View File

@@ -19,6 +19,7 @@ export default
fields: { fields: {
toggleSchedule: { toggleSchedule: {
ngDisabled: "!schedule.summary_fields.user_capabilities.edit",
label: '', label: '',
columnClass: 'List-staticColumn--toggle', columnClass: 'List-staticColumn--toggle',
type: "toggle", type: "toggle",

View File

@@ -94,7 +94,6 @@ export default
ngClick: 'scheduleJob(template)', ngClick: 'scheduleJob(template)',
awToolTip: i18n._('Schedule future job template runs'), awToolTip: i18n._('Schedule future job template runs'),
dataPlacement: 'top', dataPlacement: 'top',
ngShow: 'template.summary_fields.user_capabilities.schedule'
}, },
copy: { copy: {
label: i18n._('Copy'), label: i18n._('Copy'),