hide workflow and survey buttons from non-detail tabs

since the two are basically sub-states of the edit form (detail tab), they should only show up when that tab is selected
This commit is contained in:
John Mitchell
2017-10-10 17:08:04 -04:00
parent 8d19555cf1
commit 54640dbca0

View File

@@ -163,7 +163,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
}, },
add_survey: { add_survey: {
ngClick: 'addSurvey()', ngClick: 'addSurvey()',
ngShow: '!survey_exists && ($state.includes(\'templates.addWorkflowJobTemplate\') || $state.includes(\'templates.editWorkflowJobTemplate\'))', ngShow: '!survey_exists && ($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\'))',
awFeature: 'surveys', awFeature: 'surveys',
awToolTip: '{{surveyTooltip}}', awToolTip: '{{surveyTooltip}}',
dataPlacement: 'top', dataPlacement: 'top',
@@ -173,7 +173,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
edit_survey: { edit_survey: {
ngClick: 'editSurvey()', ngClick: 'editSurvey()',
awFeature: 'surveys', awFeature: 'surveys',
ngShow: 'survey_exists && ($state.includes(\'templates.addWorkflowJobTemplate\') || $state.includes(\'templates.editWorkflowJobTemplate\'))', ngShow: 'survey_exists && ($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\'))',
label: i18n._('Edit Survey'), label: i18n._('Edit Survey'),
class: 'Form-primaryButton', class: 'Form-primaryButton',
awToolTip: '{{surveyTooltip}}', awToolTip: '{{surveyTooltip}}',
@@ -181,7 +181,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
}, },
workflow_editor: { workflow_editor: {
ngClick: 'openWorkflowMaker()', ngClick: 'openWorkflowMaker()',
ngShow: '$state.includes(\'templates.addWorkflowJobTemplate\') || $state.includes(\'templates.editWorkflowJobTemplate\')', ngShow: '$state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\')',
awToolTip: '{{workflowEditorTooltip}}', awToolTip: '{{workflowEditorTooltip}}',
dataPlacement: 'top', dataPlacement: 'top',
label: i18n._('Workflow Editor'), label: i18n._('Workflow Editor'),