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

Sylvain Thénault sylvain.thenault at logilab.fr
Wed Feb 22 10:42:26 CET 2017


CI build: https://jenkins.logilab.org/job/cubicweb-saem_ref/88/


Le 22/02/2017 à 10:41, Sylvain Thenault a écrit :
> # 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'),
> _______________________________________________
> saem-devel mailing list
> saem-devel at lists.cubicweb.org
> http://lists.cubicweb.org/mailman/listinfo/saem-devel

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the saem-devel mailing list