Browse Source

[notebook] Do not display the history documents

Romain Rigaux 10 years ago
parent
commit
c127eb3653

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

@@ -26,7 +26,7 @@ ${ commonheader(_("Notebooks"), "spark", user, "60px") | n,unicode }
 
 <div class="container-fluid">
   <div class="card card-small">
-  <h1 class="card-heading simple">${ _('Spark Editor') }</h1>
+  <h1 class="card-heading simple">${ _('Notebooks') }</h1>
 
   <%actionbar:render>
     <%def name="search()">

+ 1 - 1
desktop/libs/notebook/src/notebook/views.py

@@ -100,7 +100,7 @@ def new(request):
 
 
 def notebooks(request):
-  notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(request.user, Document2, extra='notebook')]
+  notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(request.user, Document2, extra='notebook') if not d.content_object.is_history]
 
   return render('notebooks.mako', request, {
       'notebooks_json': json.dumps(notebooks, cls=JSONEncoderForHTML)