瀏覽代碼

HUE-3453 [editor] Do not show clear history button when empty history

Romain Rigaux 9 年之前
父節點
當前提交
825d38d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -447,7 +447,7 @@ ${ hueIcons.symbols() }
       <ul class="nav nav-tabs">
         <li class="active" data-bind="click: function(){ currentQueryTab('queryHistory'); }">
           <a class="inactive-action" href="#queryHistory" data-toggle="tab">${_('Query History')}
-            <div class="inline-block inactive-action margin-left-10 hand" title="${_('Clear the query history')}" data-target="#clearHistoryModal" data-toggle="modal" rel="tooltip"><i class="snippet-icon fa fa-calendar-times-o"></i></div>
+            <div class="inline-block inactive-action margin-left-10 hand" title="${_('Clear the query history')}" data-target="#clearHistoryModal" data-toggle="modal" rel="tooltip" data-bind="visible: $parent.history().length > 0"><i class="snippet-icon fa fa-calendar-times-o"></i></div>
           </a>
         </li>
         <li data-bind="click: function(){ currentQueryTab('savedQueries'); }"><a class="inactive-action" href="#savedQueries" data-toggle="tab">${_('Saved Queries')}</a></li>