backport stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 18 Mar 2010 11:57:48 +0100
changeset 4938 b1a4fe480de5
parent 4934 0dfd86d2cd98 (current diff)
parent 4937 4e08eba12851 (diff)
child 4940 3143a1258d62
backport stable
cwconfig.py
server/serverctl.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
--- 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
 ================
 
--- 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` .
--- 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 ...` ?
--- 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
 =================
 
--- 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).
 
 
--- 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`.
--- 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
 
--- 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.
--- 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
--- 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`)
 ---------------------------------------------------------------
 
--- 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:
--- 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"""
--- 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.
--- 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'</div>')
 
 
-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'<a href="%s" title="%s" class="toolbarButton"><img src="%s" alt="%s"/></a>' %
-               (xml_escape(url), label, iconurl, label))
-
-
 class MetaDataComponent(component.EntityVComponent):
     __regid__ = 'metadata'
     context = 'navbottom'
--- 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'<a href="%s" title="%s" class="toolbarButton"><img src="%s" alt="%s"/></a>' %
+                   (xml_escape(url), label, xml_escape(iconurl), label))
+
     class PdfMainTemplate(TheMainTemplate):
         __regid__ = 'pdf-main-template'
 
--- 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'