Explorar o código

[fb] Hide the submit buttons in case Oozie is blacklisted

Enrico Berti %!s(int64=10) %!d(string=hai) anos
pai
achega
a315d60

+ 2 - 0
apps/filebrowser/src/filebrowser/templates/listdir.mako

@@ -91,10 +91,12 @@ ${ fb_components.menubar() }
             </ul>
           </div>
           <!-- /ko -->
+          % if 'oozie' in apps:
           <button class="btn fileToolbarBtn" title="${_('Submit')}"
             data-bind="visible: selectedFiles().length == 1 && $.inArray(selectedFile().name, ['workflow.xml', 'coordinator.xml', 'bundle.xml']) > -1, click: submitSelected">
             <i class="fa fa-play"></i> ${_('Submit')}
           </button>
+          % endif
         </div>
       </%def>
 

+ 5 - 1
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -457,7 +457,11 @@ from django.utils.translation import ugettext as _
       <td class="center" data-bind="click: handleSelect" style="cursor: default">
         <div data-bind="visible: name != '..', css: { hueCheckbox: name != '..', 'fa': name != '..', 'fa-check': selected }"></div>
       </td>
-      <td class="left"><i data-bind="click: $root.viewFile, css: { 'fa': true, 'fa-play': $.inArray(name, ['workflow.xml', 'coordinator.xml', 'bundle.xml']) > -1, 'fa-file-o': type == 'file', 'fa-folder': type != 'file', 'fa-folder-open': type != 'file' && hovered }"></i></td>
+      <td class="left"><i data-bind="click: $root.viewFile, css: { 'fa': true,
+       % if 'oozie' in apps:
+      'fa-play': $.inArray(name, ['workflow.xml', 'coordinator.xml', 'bundle.xml']) > -1,
+       % endif
+      'fa-file-o': type == 'file', 'fa-folder': type != 'file', 'fa-folder-open': type != 'file' && hovered }"></i></td>
       <td data-bind="attr: {'title': tooltip}" rel="tooltip">
         <!-- ko if: name == '..' -->
         <a href="#" data-bind="click: $root.viewFile"><i class="fa fa-level-up"></i></a>