Skip to content

Commit 616640e

Browse files
nidhibhatgathithyaaselvam
authored andcommitted
[ui-documentBrowser] Hide the new workflow button based on config (#4022)
1 parent 458f3ca commit 616640e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

desktop/core/src/desktop/templates/document_browser.mako

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import sys
1919
2020
from desktop import conf
2121
from desktop.views import _ko
22+
from desktop.conf import ENABLE_WORKFLOW_CREATION_ACTION
2223
2324
if sys.version_info[0] > 2:
2425
from django.utils.translation import gettext as _
@@ -134,12 +135,14 @@ else:
134135
</a>
135136
</li>
136137
% endif
137-
% if 'oozie' in apps:
138-
<li>
139-
<a title="${_('Oozie Workflow')}" data-bind="hueLink: addDirectoryParamToUrl('${ url('oozie:new_workflow') }')">
140-
<!-- ko template: { name: 'app-icon-template', data: { icon: 'oozie-workflow' } } --><!-- /ko --> ${_('Workflow') if is_embeddable else _('Oozie Workflow')}
141-
</a>
142-
</li>
138+
% if ('oozie' in apps):
139+
% if ENABLE_WORKFLOW_CREATION_ACTION.get():
140+
<li>
141+
<a title="${_('Oozie Workflow')}" data-bind="hueLink: addDirectoryParamToUrl('${ url('oozie:new_workflow') }')">
142+
<!-- ko template: { name: 'app-icon-template', data: { icon: 'oozie-workflow' } } --><!-- /ko --> ${_('Workflow') if is_embeddable else _('Oozie Workflow')}
143+
</a>
144+
</li>
145+
% endif
143146
<li>
144147
<a title="${_('Oozie Schedule')}" data-bind="hueLink: addDirectoryParamToUrl('${ url('oozie:new_coordinator') }')">
145148
<!-- ko template: { name: 'app-icon-template', data: { icon: 'oozie-coordinator' } } --><!-- /ko --> ${_('Schedule') if is_embeddable else _('Oozie Coordinator')}

0 commit comments

Comments
 (0)