# HG changeset patch # User Sylvain Thénault # Date 1251290160 -7200 # Node ID 238ad682bcb7f187f09fd6bea9088db8989f7c54 # Parent bdb120240d75323982c9a9322bf063cd1196d383# Parent a2d6caa8ff44fe734cc2bb9166eb503c0310c577 backport stable diff -r bdb120240d75 -r 238ad682bcb7 debian/control --- a/debian/control Wed Aug 26 13:09:19 2009 +0200 +++ b/debian/control Wed Aug 26 14:36:00 2009 +0200 @@ -76,7 +76,7 @@ Package: cubicweb-common Architecture: all XB-Python-Version: ${python:Versions} -Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.44.0), python-yams (>= 0.24.0), python-rql (>= 0.22.1), python-lxml +Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.44.0), python-yams (>= 0.24.0), python-rql (>= 0.22.3), python-lxml Recommends: python-simpletal (>= 4.0) Conflicts: cubicweb-core Replaces: cubicweb-core diff -r bdb120240d75 -r 238ad682bcb7 rset.py --- a/rset.py Wed Aug 26 13:09:19 2009 +0200 +++ b/rset.py Wed Aug 26 14:36:00 2009 +0200 @@ -395,7 +395,7 @@ if rqlst.TYPE == 'select': # UNION query, find the subquery from which this entity has been # found - rqlst = rqlst.locate_subquery(col, etype, self.args) + rqlst, col = rqlst.locate_subquery(col, etype, self.args) # take care, due to outer join support, we may find None # values for non final relation for i, attr, x in attr_desc_iterator(rqlst, col): @@ -495,7 +495,8 @@ if len(self.column_types(i)) > 1: break # UNION query, find the subquery from which this entity has been found - select = rqlst.locate_subquery(locate_query_col, etype, self.args) + select = rqlst.locate_subquery(locate_query_col, etype, self.args)[0] + col = rqlst.subquery_selection_index(select, col) try: myvar = select.selection[col].variable except AttributeError: @@ -503,7 +504,7 @@ return None, None rel = myvar.main_relation() if rel is not None: - index = rel.children[0].variable.selected_index() + index = rel.children[0].root_selection_index() if index is not None and self.rows[row][index]: return self.get_entity(row, index), rel.r_type return None, None diff -r bdb120240d75 -r 238ad682bcb7 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Wed Aug 26 13:09:19 2009 +0200 +++ b/server/sources/pyrorql.py Wed Aug 26 14:36:00 2009 +0200 @@ -26,6 +26,12 @@ from cubicweb.server.sources import (AbstractSource, ConnectionWrapper, TimedCache, dbg_st_search, dbg_results) + +def uidtype(union, col, etype, args): + select, col = union.locate_subquery(col, etype, args) + return getattr(select.selection[col], 'uidtype', None) + + class ReplaceByInOperator(Exception): def __init__(self, eids): self.eids = eids @@ -295,8 +301,8 @@ needtranslation = [] rows = rset.rows for i, etype in enumerate(descr[0]): - if (etype is None or not self.schema.eschema(etype).is_final() or - getattr(union.locate_subquery(i, etype, args).selection[i], 'uidtype', None)): + if (etype is None or not self.schema.eschema(etype).is_final() + or uidtype(union, i, etype, args)): needtranslation.append(i) if needtranslation: cnx = session.pool.connection(self.uri) diff -r bdb120240d75 -r 238ad682bcb7 test/unittest_rset.py --- a/test/unittest_rset.py Wed Aug 26 13:09:19 2009 +0200 +++ b/test/unittest_rset.py Wed Aug 26 14:36:00 2009 +0200 @@ -328,6 +328,7 @@ entity, rtype = rset.related_entity(1, 1) self.assertEquals(entity.id, 'CWGroup') self.assertEquals(rtype, 'name') + # rset = self.execute('Any X,N ORDERBY N WHERE X is Bookmark WITH X,N BEING ' '((Any X,N WHERE X is CWGroup, X name N)' ' UNION ' @@ -335,6 +336,14 @@ entity, rtype = rset.related_entity(0, 1) self.assertEquals(entity.eid, e.eid) self.assertEquals(rtype, 'title') + # + rset = self.execute('Any X,N ORDERBY N WITH N,X BEING ' + '((Any N,X WHERE X is CWGroup, X name N)' + ' UNION ' + ' (Any N,X WHERE X is Bookmark, X title N))') + entity, rtype = rset.related_entity(0, 1) + self.assertEquals(entity.eid, e.eid) + self.assertEquals(rtype, 'title') def test_entities(self): rset = self.execute('Any U,G WHERE U in_group G') diff -r bdb120240d75 -r 238ad682bcb7 web/views/basetemplates.py --- a/web/views/basetemplates.py Wed Aug 26 13:09:19 2009 +0200 +++ b/web/views/basetemplates.py Wed Aug 26 14:36:00 2009 +0200 @@ -430,7 +430,7 @@ req._(ChangeLogView.title).lower())) self.w(u'%s | ' % (req.build_url('doc/about'), req._('about this site'))) - self.w(u'© 2001-2009 Logilab S.A.') + self.w(u'%s' % req._('powered by CubicWeb')) self.w(u'') diff -r bdb120240d75 -r 238ad682bcb7 web/views/navigation.py --- a/web/views/navigation.py Wed Aug 26 13:09:19 2009 +0200 +++ b/web/views/navigation.py Wed Aug 26 14:36:00 2009 +0200 @@ -160,7 +160,7 @@ # make a link to see them all if show_all_option: url = xml_escape(self.build_url(__force_display=1, **params)) - w(u'

%s

\n' + w(u'%s\n' % (url, req._('show %s results') % len(rset))) rset.limit(offset=start, limit=stop-start, inplace=True) diff -r bdb120240d75 -r 238ad682bcb7 web/wdoc/ChangeLog_en --- a/web/wdoc/ChangeLog_en Wed Aug 26 13:09:19 2009 +0200 +++ b/web/wdoc/ChangeLog_en Wed Aug 26 14:36:00 2009 +0200 @@ -1,27 +1,34 @@ .. -*- coding: utf-8 -*- -.. _`user preferences`: myprefs#fieldset_ui - -2008-09-25 -- 2.50.0 - * jQuery replaces MochiKit - * schema inheritance support +.. _`user preferences`: myprefs +.. _here: sparql +.. _SPARQL: http://www.w3.org/TR/rdf-sparql-query/ +.. _schema: schema +.. _OWL: http://www.w3.org/TR/owl-features/ -2008-05-13 -- 2.48.0 - * web pages are now served with the ``xhtml+xml`` content type +2009-08-07 -- 3.4.0 + + * support for SPARQL_. Click here_ to test it. -2008-03-27 -- 2.47.0 - * fckeditor is now integrated to edit rich text fields. If you don't see it, - check your `user preferences`_. + * and another step toward the semantic web: new `ExternalUri` entity type + with its associated `same_as` relation. See + http://www.w3.org/TR/owl-ref/#sameAs-def for more information and check + this instance schema_ to see on which entity types it may be applied -2008-03-13 -- 2.46.0 - * new calendar and timetable views. - - * click-and-edit functionalities : if you see the text edit cursor when - you're over a fied, try to double-click! - - * automatic facets oriented search : a filter box should appear when you're - looking for something and more than one entity are displayed. + * new "view workflow" and "view history" items in the workflow + sub-menu of the actions box + + * you can now edit comments of workflow transition afterward (if authorized, + of course) + + * modification date of an entity is updated when its state is changed + -2008-02-15 -- 2.44.0 - * new internationalized online help system. Click the question mark on the - right top corner! Hopefuly some new documentation will appear as time is - going. +2009-02-26 -- 3.1.0 + + * schema may be exported as OWL_ + + * new ajax interface for site configuration / `user preferences`_ + + +2008-10-24 -- 2.99.0 + * cubicweb is now open source ! diff -r bdb120240d75 -r 238ad682bcb7 web/wdoc/ChangeLog_fr --- a/web/wdoc/ChangeLog_fr Wed Aug 26 13:09:19 2009 +0200 +++ b/web/wdoc/ChangeLog_fr Wed Aug 26 14:36:00 2009 +0200 @@ -1,31 +1,34 @@ .. -*- coding: utf-8 -*- .. _`préférences utilisateurs`: myprefs#fieldset_ui - -2008-09-25 -- 2.50.0 - * jQuery remplace MochiKit - * support de l'héritage de schéma +.. _ici: sparql +.. _SPARQL: http://www.w3.org/TR/rdf-sparql-query/ +.. _schema: schema +.. _OWL: http://www.w3.org/TR/owl-features/ -2008-05-13 -- 2.48.0 - * les pages sont servies en tant que ``xhtml+xml`` pour certains navigateurs +2009-08-07 -- 3.4.0 -2008-03-27 -- 2.47.0 - * fckeditor est enfin intégré pour éditer les champs de type texte riche. Si - vous ne le voyez pas apparaître, vérifiez vos `préférences utilisateurs`_. + * support de SPARQL_. Cliquez ici_ pour le tester. -2008-03-13 -- 2.46.0 - * nouvelle vues calendrier et emploi du temps - - * fonctionalité "click-et-édite" : si vous voyez apparaitre le curseur - d'édition de texte en survolant un champ, essayez de double-cliquer ! - - * recherche par facettes : une boîte de filtrage devrait apparaitre - automatiquement lorsque vous effectuez une recherche qui ramène plus d'une - entité + * et encore un pas vers le web sémantique : un nouveau type d'entité + `ExternalUri` et la relation associée `same_as`. Voir + http://www.w3.org/TR/owl-ref/#sameAs-def pour plus d'information, ainsi + que le schema_ de cette instance pour voir à quels types d'entités cela + s'applique. -2008-02-15 -- 2.44.0 - * nouveau système d'aide internationalisé. Cliquez sur le point - d'interrogation en haut à droite. Reste à enrichir le contenu de cette - documentation, mais cela devrait arriver avec le temps. + * nouveau liens "voir les états possibles" et "voir l'historique" dans le sous-menu + workflow de la boite actions + + * vous pouvez dorénavant éditer les commentaires des passages de transition + depuis l'historique, pour peu que vous ayez les droits nécessaire bien sûr + + * la date de modification d'une entité est mise à jour lorsque son état est changé - +2009-02-26 -- 3.1.0 + + * le schéma peut être exporté en OWL_ + + * nouvelle interface ajax pour la configuration du site et les `préférences utilisateurs`_ + + +