# HG changeset patch # User Sylvain Thénault # Date 1268909868 -3600 # Node ID b1a4fe480de52c46c0e972abe4e24bdf81437f84 # Parent 0dfd86d2cd987a0a9d38c3a6b213f1ff5a28fd27# Parent 4e08eba12851eece1413d9010c980a256164b94a backport stable diff -r 0dfd86d2cd98 -r b1a4fe480de5 cwconfig.py --- a/cwconfig.py Wed Mar 17 11:37:47 2010 +0100 +++ b/cwconfig.py Thu Mar 18 11:57:48 2010 +0100 @@ -115,7 +115,7 @@ def possible_configurations(directory): """return a list of installed configurations in a directory - according to *-ctl files + according to \*-ctl files """ return [name for name in ('repository', 'twisted', 'all-in-one') if exists(join(directory, '%s.conf' % name))] @@ -918,7 +918,7 @@ """return available translation for an instance, by looking for compiled catalog - take *args to be usable as a vocabulary method + take \*args to be usable as a vocabulary method """ from glob import glob yield 'en' # ensure 'en' is yielded even if no .mo found diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/admin/ldap.rst --- a/doc/book/en/admin/ldap.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/admin/ldap.rst Thu Mar 18 11:57:48 2010 +0100 @@ -1,3 +1,5 @@ +.. _LDAP: + LDAP integration ================ diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/annexes/cubicweb-ctl.rst --- a/doc/book/en/annexes/cubicweb-ctl.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/annexes/cubicweb-ctl.rst Thu Mar 18 11:57:48 2010 +0100 @@ -104,7 +104,7 @@ * ``i18ninstance``, recompiles the messages catalogs of an instance. This is automatically done while upgrading. -See also chapter :ref:`internationalisation`. +See also chapter :ref:`internationalization`. Other commands -------------- @@ -119,4 +119,4 @@ specific Google AppEgine database, they are not available for now in cubicweb-ctl, but they are available in the instance created. -For more details, please see :ref:`gaecontents` . +For more details, please see :ref:`GoogleAppEngineSource` . diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/annexes/faq.rst --- a/doc/book/en/annexes/faq.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/annexes/faq.rst Thu Mar 18 11:57:48 2010 +0100 @@ -150,7 +150,7 @@ expression for a relation) instead of an ERQLExpression (rql expression for an entity). -You can find additional information in the section :ref:`security`. +You can find additional information in the section :ref:`securitymodel`. What is `Error while publishing rest text ...` ? diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/datamodel/define-workflows.rst --- a/doc/book/en/development/datamodel/define-workflows.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/datamodel/define-workflows.rst Thu Mar 18 11:57:48 2010 +0100 @@ -1,5 +1,7 @@ .. -*- coding: utf-8 -*- +.. _Workflow: + Define a Workflow ================= diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/datamodel/definition.rst --- a/doc/book/en/development/datamodel/definition.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/datamodel/definition.rst Thu Mar 18 11:57:48 2010 +0100 @@ -209,6 +209,8 @@ XXX note about how to add new constraint +.. _securitymodel: + The security model ~~~~~~~~~~~~~~~~~~ @@ -388,7 +390,7 @@ attr_name = attr_type(properties) where `attr_type` is one of the type listed above and `properties` is -a list of the attribute needs to statisfy (see :ref:`properties` +a list of the attribute needs to statisfy (see `Properties`_ for more details). diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/devcore/selectors.rst --- a/doc/book/en/development/devcore/selectors.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/devcore/selectors.rst Thu Mar 18 11:57:48 2010 +0100 @@ -7,7 +7,7 @@ essential part of the construction of well behaved cubes. Of course you may have to write your own set of selectors as your needs grows and -you get familiar with the framework (see :ref:CustomSelectors). +you get familiar with the framework (see :ref:`CustomSelectors`). Here is a description of generic selectors provided by CubicWeb that should suit most of your needs. @@ -86,4 +86,4 @@ .. autoclass:: cubicweb.selectors.match_transition You'll also find some other (very) specific selectors hidden in other modules -than :module:`cubicweb.selectors`. \ No newline at end of file +than :mod:`cubicweb.selectors`. diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/devweb/rtags.rst --- a/doc/book/en/development/devweb/rtags.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/devweb/rtags.rst Thu Mar 18 11:57:48 2010 +0100 @@ -9,6 +9,6 @@ The ``uicfg`` module -~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~ .. automodule:: cubicweb.web.uicfg diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/devweb/views.rst --- a/doc/book/en/development/devweb/views.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/devweb/views.rst Thu Mar 18 11:57:48 2010 +0100 @@ -211,10 +211,10 @@ **This is to be compared to interfaces and protocols in object-oriented languages. Applying a given view called 'a_view' to all the entities of a result set only requires to have for each entity of this result set, -an available view called 'a_view' which accepts the entity. +an available view called 'a_view' which accepts the entity.** -Instead of merely using type based dispatch, we do predicate dispatch -which quite more powerful** +**Instead of merely using type based dispatch, we do predicate dispatch +which is quite more powerful.** Assuming we added entries to the blog titled `MyLife`, displaying it now allows to read its description and all its entries. diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/entityclasses/interfaces.rst --- a/doc/book/en/development/entityclasses/interfaces.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/entityclasses/interfaces.rst Thu Mar 18 11:57:48 2010 +0100 @@ -53,7 +53,7 @@ Interfaces (and some implementations as mixins) defined in the library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. automodule:: cubicweb.interface +.. automodule:: cubicweb.interfaces :members: .. automodule:: cubicweb.mixins diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/development/webstdlib/primary.rst --- a/doc/book/en/development/webstdlib/primary.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/development/webstdlib/primary.rst Thu Mar 18 11:57:48 2010 +0100 @@ -1,3 +1,5 @@ +.. _primary: + The default 'primary' view (:mod:`cubicweb.web.views.primary`) --------------------------------------------------------------- diff -r 0dfd86d2cd98 -r b1a4fe480de5 doc/book/en/intro/tutorial/create-cube.rst --- a/doc/book/en/intro/tutorial/create-cube.rst Wed Mar 17 11:37:47 2010 +0100 +++ b/doc/book/en/intro/tutorial/create-cube.rst Thu Mar 18 11:57:48 2010 +0100 @@ -340,7 +340,7 @@ example HTML output. .. note:: - You can find more details about views and selectors in :ref:`ViewDefinition`. + You can find more details about views and selectors in :ref:`Views`. .. _DefineEntities: diff -r 0dfd86d2cd98 -r b1a4fe480de5 interfaces.py --- a/interfaces.py Wed Mar 17 11:37:47 2010 +0100 +++ b/interfaces.py Thu Mar 18 11:57:48 2010 +0100 @@ -76,12 +76,14 @@ """returns a dictionary describing progress/estimated cost of the version. - mandatory keys are (''estimated', 'done', 'todo') - optional keys are ('notestimated', 'notestimatedcorrected', - 'estimatedcorrected') - 'noestimated' and 'notestimatedcorrected' should default to 0 - 'estimatedcorrected' should default to 'estimated' - """ + - mandatory keys are (''estimated', 'done', 'todo') + + - optional keys are ('notestimated', 'notestimatedcorrected', + 'estimatedcorrected') + + 'noestimated' and 'notestimatedcorrected' should default to 0 + 'estimatedcorrected' should default to 'estimated' + """ def finished(self): """returns True if status is finished""" diff -r 0dfd86d2cd98 -r b1a4fe480de5 server/serverctl.py diff -r 0dfd86d2cd98 -r b1a4fe480de5 web/uicfg.py --- a/web/uicfg.py Wed Mar 17 11:37:47 2010 +0100 +++ b/web/uicfg.py Thu Mar 18 11:57:48 2010 +0100 @@ -25,7 +25,7 @@ * relations * sideboxes - .. image:: ../../images/primaryview_template.png +.. image:: ../../images/primaryview_template.png **Attributes** can only be displayed in the attributes section (default behavior). They can also be hidden. diff -r 0dfd86d2cd98 -r b1a4fe480de5 web/views/basecomponents.py --- a/web/views/basecomponents.py Wed Mar 17 11:37:47 2010 +0100 +++ b/web/views/basecomponents.py Thu Mar 18 11:57:48 2010 +0100 @@ -216,20 +216,6 @@ self.w(u'') -class PdfViewComponent(component.EntityVComponent): - __regid__ = 'pdfview' - - context = 'ctxtoolbar' - - def cell_call(self, row, col, view): - entity = self.cw_rset.get_entity(row, col) - url = entity.absolute_url(vid=view.__regid__, __template='pdf-main-template') - iconurl = self._cw.build_url('data/pdf_icon.gif') - label = self._cw._('Download page as pdf') - self.w(u'%s' % - (xml_escape(url), label, iconurl, label)) - - class MetaDataComponent(component.EntityVComponent): __regid__ = 'metadata' context = 'navbottom' diff -r 0dfd86d2cd98 -r b1a4fe480de5 web/views/basetemplates.py --- a/web/views/basetemplates.py Wed Mar 17 11:37:47 2010 +0100 +++ b/web/views/basetemplates.py Thu Mar 18 11:57:48 2010 +0100 @@ -16,7 +16,7 @@ from cubicweb.view import View, MainTemplate, NOINDEX, NOFOLLOW from cubicweb.utils import UStringIO, can_do_pdf_conversion from cubicweb.schema import display_name -from cubicweb.web import formfields as ff, formwidgets as fw +from cubicweb.web import component, formfields as ff, formwidgets as fw from cubicweb.web.views import forms # main templates ############################################################## @@ -278,6 +278,20 @@ from tempfile import NamedTemporaryFile from cubicweb.ext.xhtml2fo import ReportTransformer + + class PdfViewComponent(component.EntityVComponent): + __regid__ = 'pdfview' + + context = 'ctxtoolbar' + + def cell_call(self, row, col, view): + entity = self.cw_rset.get_entity(row, col) + url = entity.absolute_url(vid=view.__regid__, __template='pdf-main-template') + iconurl = self._cw.build_url('data/pdf_icon.gif') + label = self._cw._('Download page as pdf') + self.w(u'%s' % + (xml_escape(url), label, xml_escape(iconurl), label)) + class PdfMainTemplate(TheMainTemplate): __regid__ = 'pdf-main-template' diff -r 0dfd86d2cd98 -r b1a4fe480de5 web/views/formrenderers.py --- a/web/views/formrenderers.py Wed Mar 17 11:37:47 2010 +0100 +++ b/web/views/formrenderers.py Thu Mar 18 11:57:48 2010 +0100 @@ -259,7 +259,7 @@ +--------------+--------------+---------+ | field1 label | field2 label | | +--------------+--------------+---------+ - | field1 input | field2 input | buttons + | field1 input | field2 input | buttons | +--------------+--------------+---------+ """ __regid__ = 'htable'