[saem-devel] [PATCH saem_ref] [views] Fix query displaying organization on the index view

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Feb 22 10:41:26 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1487754246 -3600
#      Wed Feb 22 10:04:06 2017 +0100
# Node ID bd2d743fda306bcabd856ed0b2d4b13ef35264e1
# Parent  6caab7efc2ad7209daca92f2ae36122eeaab9544
[views] Fix query displaying organization on the index view

* we should have a limit of 5 as for other boxes
* ordering is expected on latest modification date
* prefetch ark which is used to generation URL

diff --git a/cubicweb_saem_ref/views/startup.py b/cubicweb_saem_ref/views/startup.py
--- a/cubicweb_saem_ref/views/startup.py
+++ b/cubicweb_saem_ref/views/startup.py
@@ -86,12 +86,12 @@ class SAEMRefIndexView(startup.IndexView
         'SEDAArchiveTransfer': (
             'Any X,XT,XA,XD,MD ORDERBY MD DESC LIMIT 5 WHERE X is SEDAArchiveTransfer, '
             'X modification_date MD, X title XT, X ark XA, '
             'X user_annotation XD'),
         'Organization': (
-            'Any X,XN,MD ORDERBY XN WHERE X is Organization, X name XN, '
-            'X modification_date MD'),
+            'Any X,XN,XA,MD ORDERBY MD DESC LIMIT 5 WHERE X is Organization, '
+            'X modification_date MD, X name XN, X ark XA'),
     }
 
     def _render_modified_rset(self, rset):
         if rset:
             self.w(tags.div(self._cw._('recently modified entities'),


More information about the saem-devel mailing list