浏览代码

[notebook] Do not display history notebook in the top menu

Romain Rigaux 10 年之前
父节点
当前提交
6492385f5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/templates/common_header.mako

+ 1 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -434,7 +434,7 @@ from django.utils.translation import ugettext as _
        % endif
        % endif
        % if 'spark' in apps:
        % if 'spark' in apps:
          <% from desktop.models import Document2, Document %>
          <% from desktop.models import Document2, Document %>
-         <% notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(user, Document2, extra='notebook')] %>
+         <% notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(user, Document2, extra='notebook') if not d.content_object.is_history] %>
          % if not notebooks:
          % if not notebooks:
            <li>
            <li>
              <a title="${_('Notebook')}" rel="navigator-tooltip" href="${ url('notebook:new') }">${_('Notebooks')}</a>
              <a title="${_('Notebook')}" rel="navigator-tooltip" href="${ url('notebook:new') }">${_('Notebooks')}</a>