Merge pull request #526 from jlmitch5/hideWorkflowAndSurveyButtons

hide workflow and survey buttons from non-detail tabs
This commit is contained in:
jlmitch5
2017-10-11 11:35:35 -04:00
committed by GitHub

View File

@@ -157,13 +157,13 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
view_survey: { view_survey: {
ngClick: 'editSurvey()', ngClick: 'editSurvey()',
awFeature: 'surveys', awFeature: 'surveys',
ngShow: '($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\')) && survey_exists && !(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)', ngShow: '($state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate.workflowMaker\')) && survey_exists && !(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)',
label: i18n._('View Survey'), label: i18n._('View Survey'),
class: 'Form-primaryButton' class: 'Form-primaryButton'
}, },
add_survey: { add_survey: {
ngClick: 'addSurvey()', ngClick: 'addSurvey()',
ngShow: '!survey_exists && ($state.includes(\'templates.addWorkflowJobTemplate\') || $state.includes(\'templates.editWorkflowJobTemplate\'))', ngShow: '$state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate.workflowMaker\')',
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: '$state.is(\'templates.addWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate\') || $state.is(\'templates.editWorkflowJobTemplate.workflowMaker\')',
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\') || $state.is(\'templates.editWorkflowJobTemplate.workflowMaker\')',
awToolTip: '{{workflowEditorTooltip}}', awToolTip: '{{workflowEditorTooltip}}',
dataPlacement: 'top', dataPlacement: 'top',
label: i18n._('Workflow Editor'), label: i18n._('Workflow Editor'),