Browse Source

HUE-3632 [editor] Create button on query list page is notebook only

Romain Rigaux 9 years ago
parent
commit
9ef4c5238a
1 changed files with 7 additions and 1 deletions
  1. 7 1
      desktop/libs/notebook/src/notebook/templates/notebooks.mako

+ 7 - 1
desktop/libs/notebook/src/notebook/templates/notebooks.mako

@@ -87,7 +87,13 @@ ${ commonheader(_("Notebooks"), "spark", user, "60px") | n,unicode }
     </%def>
 
     <%def name="creation()">
-      <a href="${ url('notebook:new') }" class="btn"><i class="fa fa-plus-circle"></i> ${ _('Create') }</a>
+      % if editor_type != 'notebook':
+        <a href="${ url('notebook:editor') }?type=${ editor_type }" class="btn">
+      % else:
+        <a href="${ url('notebook:new') }" class="btn">
+      % endif
+        <i class="fa fa-plus-circle"></i> ${ _('Create') }
+      </a>
       <a data-bind="click: function() { $('#import-documents').modal('show'); }" class="btn">
         <i class="fa fa-upload"></i> ${ _('Import') }
       </a>