--- a/doc/book/en/A03a-concepts.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/A03a-concepts.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -12,18 +12,18 @@
`CubicWeb` framework is a server/client application framework. Those two
-parties communicates through RQL (`CubicWeb` query language implementation)
+parts communicate through RQL (`CubicWeb` query language implementation)
and ResultSet (which will be explained in :ref:`TermsVocabulary`).
The server manages all interactions with sources.
.. note::
- For real, the client and server sides are integrated in the same
- process and interact directly, without the needs for distants
- calls using Pyro. It is important to note down that those two
+ Usually, the client and server sides are integrated in the same
+ process and interact directly, without the need for distant
+ calls using Pyro. But, it is important to note that those two
sides, client/server, are disjointed and it is possible to execute
- a couple of calls in distincts processes to balance the load of
+ a couple of calls in distinct processes to balance the load of
your web site on one or more machines.
.. _TermsVocabulary:
@@ -42,8 +42,8 @@
classes based on `yams`_ library. This is the core piece
of an application. It is initially defined in the file system and is
stored in the database at the time an instance is created. `CubicWeb`
- provides a certain number of system entities included automatically as
- it is necessary for the core of `CubicWeb` and a library of
+ provides a certain number of system entities included automatically
+ (necessary for the core of `CubicWeb`) and a library of
cubes (which defined application entities) that can be explicitely
included if necessary.
@@ -57,7 +57,7 @@
a relation the `subject` and the second the `object`.
*final entity type*
- Final types corresponds to the basic types such as string of characters,
+ Final types correspond to the basic types such as string of characters,
integers... Those types have a main property which is that they can
only be used as `object` of a relation. The attributes of an entity
(non final) are entities (finals).
@@ -78,11 +78,11 @@
A data source is a container of data (SGBD, LDAP directory, `Google
App Engine`'s datastore ...) integrated in the
`CubicWeb` repository. This repository has at least one source, `system` which
- contains the schema of the application, plain-text index and others
+ contains the schema of the application, plain-text index and other
vital informations for the system.
*configuration*
- It is possible to create differents configurations for an instance:
+ It is possible to create different configurations for an instance:
- ``repository`` : repository only, accessible for clients using Pyro
- ``twisted`` : web interface only, access the repository using Pyro
@@ -91,15 +91,15 @@
*cube*
A cube is a model grouping one or multiple data types and/or views
- to provide a specific functionnality or a complete `CubicWeb` application
+ to provide a specific functionality or a complete `CubicWeb` application
potentially using other cubes. The available cubes are located in the file
- system at `/path/to/forest/cubicweb/cubes` for a Mercurial forest installation,
- for a debian packages installation they will be located in
+ system at `/path/to/forest/cubicweb/cubes` for a Mercurial forest installation.
+ For a debian packages installation they will be located in
`/usr/share/cubicweb/cubes`.
- Larger applications can be built faster by importing cubes,
- adding entities and relationships and overriding the
- views that need to display or edit informations not provided by
- cubes.
+ Larger applications can be built quite fast by importing cubes,
+ adding entities and relationships, overriding the
+ *views* that display the cubes or by editing informations not provided by
+ the cubes.
*instance*
An instance is a specific installation of one or multiple cubes. All the required
@@ -107,11 +107,11 @@
are grouped in an instance. This will refer to the cube(s) your application
is based on.
For example logilab.org and our intranet are two instances of a single
- cube jpl, developped internally.
+ cube "jpl", developped internally.
The instances are defined in the directory `/etc/cubicweb.d`.
*application*
- The term application is sometime used to talk about an instance
+ The term application is sometimes used to talk about an instance
and sometimes to talk of a cube depending on the context.
So we would like to avoid using this term and try to use *cube* and
*instance* instead.
@@ -143,9 +143,9 @@
the same identifier.
*rql*
- Relation Query Language in order to empasize the way of browsing relations.
- This query language is inspired by SQL but is highest level, its implementation
- generates SQL.
+ Relation Query Language in order to emphasize the way of browsing relations.
+ This query language is inspired by SQL but is on a higher level;
+ its implementation generates SQL.
.. _`Python Remote Object`: http://pyro.sourceforge.net/
@@ -156,9 +156,9 @@
~~~~~~~~~~~~~~~~~
The engine in `CubicWeb` is a set of classes managing a set of objects loaded
-dynamically at the startup of `CubicWeb` (*appobjects*). Those dynamics objects,
+dynamically at the startup of `CubicWeb` (*appobjects*). Those dynamic objects,
based on the schema or the library, are building the final application.
-The differents dymanic components are for example:
+The different dynamic components are for example:
* client and server side
@@ -200,11 +200,11 @@
`execute(rqlstring, args=None, eid_key=None, build_descr=True)`
:rqlstring: the RQL query to execute (unicode)
-:args: if the query contains substitutions, a dictionnary containing the values to use
+:args: if the query contains substitutions, a dictionary containing the values to use
:eid_key:
- an implementation detail of the RQL queries cache implies that if a substitution
+ an implementation detail of the RQL cache implies that if a substitution
is used to introduce an eid *susceptible to raise the ambiguities in the query
- type resolution*, then we have to specify the correponding key in the dictionnary
+ type resolution*, then we have to specify the corresponding key in the dictionary
through this argument
@@ -214,7 +214,7 @@
on the query execution success.
.. note::
- While executing updates queries (SET, INSERT, DELETE), if a query generates
+ While executing update queries (SET, INSERT, DELETE), if a query generates
an error related to security, a rollback is automatically done on the current
transaction.
@@ -223,7 +223,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A request instance is created when an HTTP request is sent to the web server.
-It contains informations such as forms parameters, user authenticated, etc.
+It contains informations such as form parameters, user authenticated, etc.
**Globally, a request represents a user query, either through HTTP or not
(we also talk about RQL queries on the server side for example).**
@@ -232,13 +232,13 @@
* `user`, instance of `cubicweb.common.utils.User` corresponding to the authenticated
user
-* `form`, dictionnary containing the values of a web form
-* `encoding`, characters encoding to use in the response
+* `form`, dictionary containing the values of a web form
+* `encoding`, character encoding to use in the response
But also:
:Session data handling:
- * `session_data()`, returns a dictionnary containing all the session data
+ * `session_data()`, returns a dictionary containing all the session data
* `get_session_data(key, default=None)`, returns a value associated to the given
key or the value `default` if the key is not defined
* `set_session_data(key, value)`, assign a value to a key
@@ -246,7 +246,7 @@
:Cookies handling:
- * `get_cookie()`, returns a dictionnary containing the value of the header
+ * `get_cookie()`, returns a dictionary containing the value of the header
HTTP 'Cookie'
* `set_cookie(cookie, key, maxage=300)`, adds a header HTTP `Set-Cookie`,
with a minimal 5 minutes length of duration by default (`maxage` = None
@@ -268,7 +268,7 @@
* `cursor()` returns a RQL cursor on the session
* `execute(*args, **kwargs)`, shortcut to ``.cursor().execute()``
* `property_value(key)`, properties management (`EProperty`)
- * dictionnary `data` to store data to share informations between components
+ * dictionary `data` to store data to share informations between components
*while a request is executed*
Please note that this class is abstract and that a concrete implementation
@@ -372,7 +372,7 @@
A cube is a model grouping one or more entity types and/or views associated
in order to provide a specific feature or even a complete application using
-others cubes.
+other cubes.
You can decide to write your own set of cubes if you wish to re-use the
entity types you develop. Lots of cubes are available from the `CubicWeb
@@ -460,7 +460,7 @@
* ``sobjects`` contains hooks and/or views notifications (server side only)
* ``views`` contains the web interface components (web interface only)
* ``test`` contains tests related to the application (not installed)
-* ``i18n`` contains messages catalogs for supported languages (server side and
+* ``i18n`` contains message catalogs for supported languages (server side and
web interface)
* ``data`` contains data files for static content (images, css, javascripts)
...(web interface only)
@@ -479,7 +479,7 @@
* the file ``__pkginfo__.py``
* the schema definition
XXX false, we may want to have cubes which are only adding a service,
- no persistent data (eg embeding for instance)
+ no persistent data (eg embedding for instance)
Standard library
--- a/doc/book/en/B0012-schema-definition.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/B0012-schema-definition.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -222,7 +222,7 @@
``````````````````````
Setting permissions is done with the attribute `permissions` of entities and
-relation types. It defines a dictionnary where the keys are the access types
+relation types. It defines a dictionary where the keys are the access types
(action), and the values are the authorized groups or expressions.
For an entity type, the possible actions are `read`, `add`, `update` and
--- a/doc/book/en/B0020-define-workflows.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/B0020-define-workflows.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -2,26 +2,19 @@
.. _Workflow:
-Workflow definition
-===================
-
-[TODO : All this is too obscure and often not very understandable...]
+An Example: Workflow definition
+===============================
General
-------
-[XXX define what a "Workflow" is: states, transitions, transition graph ]
-
-Example of a simple workflow
-----------------------------
+A workflow describes how certain entities have to evolve between
+different states. Hence we have a set of states, and a "transition graph",
+i.e. a list of possible transitions from one state to another state.
-Please see the tutorial to view an example of a simple workflow.
-
-
-[Create a simple workflow for BlogDemo, to have a moderator approve new blog
-entry to be published. This implies specifying a dedicated group of blog
-moderator as well as hiding the view of a blog entry to the user until
-it reaches the state published]
+We will define a simple workflow for a blog, with only the following
+two states: `submitted` and `published`. So first, we create a simple
+`CubicWeb` in ten minutes (see :ref:`BlogTenMinutes`).
Set-up a workflow
-----------------
--- a/doc/book/en/B0030-data-as-objects.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/B0030-data-as-objects.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -120,14 +120,14 @@
*rtags* allow to specify certain behaviors of relations relative to a given
entity type (see later). They are defined on the entity class by the attribute
-`rtags` which is a dictionnary with as keys the triplets ::
+`rtags` which is a dictionary with as keys the triplets ::
<relation type>, <target entity type>, <context position ("subject" ou "object")>
and as values a `set` or a tuple of markers defining the properties that
apply to this relation.
-It is possible to simplify this dictionnary:
+It is possible to simplify this dictionary:
* if we want to specifiy a single marker, it is not necessary to
use a tuple as value, the marker by itself (character string)
@@ -139,9 +139,9 @@
we have to use the string `*` as target entity type
-Please note that this dictionnary is *treated at the time the class is created*.
+Please note that this dictionary is *treated at the time the class is created*.
It is automatically merged with the parent class(es) (no need to copy the
-dictionnary from the parent class to modify it). Also, modifying it after the
+dictionary from the parent class to modify it). Also, modifying it after the
class is created will not have any effect...
.. include:: B0031-define-entities.en.txt
--- a/doc/book/en/B1060-templates.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/B1060-templates.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -181,7 +181,7 @@
whatever the number of entities to display
* `__method`, if the result set to render contains only one entity and this
parameter is set, it refers to a method to call on the entity by passing it
- the dictionnary of the forms parameters, before going the classic way (through
+ the dictionary of the forms parameters, before going the classic way (through
step 1 and 2 described juste above)
The MainTemplate is a bit complex as it tries to accomodate many
--- a/doc/book/en/C040-rql.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/C040-rql.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -140,6 +140,14 @@
X is Person, X name N, X first_name P
+ Note: You can not specify several types with * ... where X is FirstType or X is SecondType*.
+ To specify several types explicitely, you have to do
+
+ ::
+
+ Any X where X is in (FirstType, SecondType)
+
+
Insertion query
---------------
--- a/doc/book/en/Z013-blog-less-ten-minutes.en.txt Thu Apr 02 11:51:46 2009 -0700
+++ b/doc/book/en/Z013-blog-less-ten-minutes.en.txt Thu Apr 02 11:57:33 2009 -0700
@@ -1,5 +1,7 @@
.. -*- coding: utf-8 -*-
+.. BlogTenMinutes:
+
Have a blog ready in less than ten minutes!
-------------------------------------------
--- a/i18n/en.po Thu Apr 02 11:51:46 2009 -0700
+++ b/i18n/en.po Thu Apr 02 11:57:33 2009 -0700
@@ -1434,6 +1434,10 @@
msgid "csv export"
msgstr ""
+#, python-format
+msgid "currently attached file: %s"
+msgstr ""
+
msgid "data directory url"
msgstr ""
@@ -1546,7 +1550,8 @@
msgid "destination_state_object"
msgstr "destination of"
-msgid "detach attached file"
+#, python-format
+msgid "detach attached file %s"
msgstr ""
msgid "detailed schema view"
--- a/i18n/es.po Thu Apr 02 11:51:46 2009 -0700
+++ b/i18n/es.po Thu Apr 02 11:57:33 2009 -0700
@@ -104,6 +104,10 @@
msgstr "%d semanas"
#, python-format
+msgid "%d years"
+msgstr ""
+
+#, python-format
msgid "%s error report"
msgstr "%s reporte de errores"
@@ -1487,6 +1491,10 @@
msgid "csv export"
msgstr "exportar CSV"
+#, python-format
+msgid "currently attached file: %s"
+msgstr ""
+
msgid "data directory url"
msgstr "url del repertorio de datos"
@@ -1612,8 +1620,9 @@
msgid "destination_state_object"
msgstr "destino de"
-msgid "detach attached file"
-msgstr "soltar el archivo existente"
+#, python-format
+msgid "detach attached file %s"
+msgstr ""
msgid "detailed schema view"
msgstr "vista detallada del esquema"
@@ -2997,6 +3006,9 @@
#~ "langue par dÈfaut (regarder le rÈpertoire i18n de l'application pour voir "
#~ "les langues disponibles)"
+#~ msgid "detach attached file"
+#~ msgstr "soltar el archivo existente"
+
#~ msgid "filter"
#~ msgstr "filtrer"
--- a/i18n/fr.po Thu Apr 02 11:51:46 2009 -0700
+++ b/i18n/fr.po Thu Apr 02 11:57:33 2009 -0700
@@ -1492,6 +1492,10 @@
msgid "csv export"
msgstr "export CSV"
+#, python-format
+msgid "currently attached file: %s"
+msgstr "fichie actuellement attaché %s"
+
msgid "data directory url"
msgstr "url du répertoire de données"
@@ -1616,8 +1620,9 @@
msgid "destination_state_object"
msgstr "destination de"
-msgid "detach attached file"
-msgstr "détacher le fichier existant"
+#, python-format
+msgid "detach attached file %s"
+msgstr "détacher le fichier existant %s"
msgid "detailed schema view"
msgstr "vue détaillée du schéma"
@@ -3002,6 +3007,9 @@
#~ "langue par défaut (regarder le répertoire i18n de l'application pour voir "
#~ "les langues disponibles)"
+#~ msgid "detach attached file"
+#~ msgstr "détacher le fichier existant"
+
#~ msgid "filter"
#~ msgstr "filtrer"
--- a/server/repository.py Thu Apr 02 11:51:46 2009 -0700
+++ b/server/repository.py Thu Apr 02 11:57:33 2009 -0700
@@ -145,7 +145,7 @@
# querier helper, need to be created after sources initialization
self.querier = QuerierHelper(self, self.schema)
# should we reindex in changes?
- self.do_fti = config['delay-full-text-indexation']
+ self.do_fti = not config['delay-full-text-indexation']
# sources
self.sources = []
self.sources_by_uri = {}
--- a/web/views/actions.py Thu Apr 02 11:51:46 2009 -0700
+++ b/web/views/actions.py Thu Apr 02 11:57:33 2009 -0700
@@ -8,7 +8,7 @@
from cubicweb.common.selectors import (searchstate_accept, match_user_group, yes,
one_line_rset, two_lines_rset, one_etype_rset,
- authenticated_user,
+ authenticated_user, none_rset,
match_search_state, chainfirst, chainall)
from cubicweb.web.action import Action, EntityAction, LinkToEntityAction
@@ -82,7 +82,6 @@
class ModifyAction(EntityAction):
category = 'mainactions'
__selectors__ = (one_line_rset, searchstate_accept)
- #__selectors__ = searchstate_accept,
schema_action = 'update'
order = 10
@@ -314,3 +313,14 @@
login = self.rset.get_entity(self.row or 0, self.col or 0).login
return self.build_url('euser/%s'%login, vid='epropertiesform')
+# schema view action
+
+class DownloadOWLSchemaAction(Action):
+ category = 'mainactions'
+ id = 'download_as_owl'
+ title = _('download schema as owl')
+ __selectors__ = none_rset,
+
+ def url(self):
+ return self.build_url('view', vid='owl')
+
--- a/web/views/boxes.py Thu Apr 02 11:51:46 2009 -0700
+++ b/web/views/boxes.py Thu Apr 02 11:57:33 2009 -0700
@@ -13,23 +13,21 @@
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
+from __future__ import with_statement
__docformat__ = "restructuredtext en"
from logilab.mtconverter import html_escape
-
from cubicweb.common.selectors import any_rset, appobject_selectable
from cubicweb.web.htmlwidgets import BoxWidget, BoxMenu, BoxHtml, RawBoxItem
from cubicweb.web.box import BoxTemplate, ExtResourcesBoxTemplate
_ = unicode
-
-
+
class EditBox(BoxTemplate):
"""
box with all actions impacting the entity displayed: edit, copy, delete
change state, add related entities
"""
- __selectors__ = (any_rset,) + BoxTemplate.__selectors__
id = 'edit_box'
title = _('actions')
order = 2
@@ -77,7 +75,7 @@
self.add_submenu(box, other_menu)
if not box.is_empty():
box.render(self.w)
-
+
def add_submenu(self, box, submenu, label_prefix=None):
if len(submenu.items) == 1:
boxlink = submenu.items[0]
@@ -205,7 +203,7 @@
class StartupViewsBox(BoxTemplate):
"""display a box containing links to all startup views"""
id = 'startup_views_box'
- visible = False # disabled by default
+ visible = False# disabled by default
title = _('startup views')
order = 70
--- a/web/widgets.py Thu Apr 02 11:51:46 2009 -0700
+++ b/web/widgets.py Thu Apr 02 11:57:33 2009 -0700
@@ -486,11 +486,15 @@
wdgs.append(ewdg.edit_render(entity, includehelp=True))
wdgs.append(u'<br/>')
wdgs.append(u'</div>')
- if entity.has_eid() and not self.required(entity):
- # trick to be able to delete an uploaded file
- wdgs.append(u'<br/>')
- wdgs.append(checkbox(eid_param('__%s_detach' % self.rname, entity.eid), False))
- wdgs.append(req._('detach attached file'))
+ if entity.has_eid():
+ if not self.required(entity):
+ # trick to be able to delete an uploaded file
+ wdgs.append(u'<br/>')
+ wdgs.append(checkbox(eid_param('__%s_detach' % self.rname, entity.eid), False))
+ wdgs.append(req._('detach attached file %s' % entity.dc_title()))
+ else:
+ wdgs.append(u'<br/>')
+ wdgs.append(req._('currently attached file: %s' % entity.dc_title()))
return '\n'.join(wdgs)
def _edit_render(self, entity):