Commit d883f662 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Merge branch '6-list-sort-order' into 'master'

6 list sort order

* List entries can be sort in descending order using the construct `~field`.
* Close #6.

See merge request !5
parents 6c202ee3 9a09b0fa
......@@ -88,7 +88,7 @@ additional row is created with the group value, followed by all the rows with
the same group value.
In addition, rows of a group can be sorted according to the value of the others
columns.
columns. Descending order is obtained using the construct ``~field``.
Columns
-------
......
......@@ -105,6 +105,7 @@
'Enter an integer between %(min)g and %(max)g': 'Enter an integer between %(min)g and %(max)g',
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
'enter date as %(format)s': 'enter date as %(format)s',
"Entries are sorted according to the value of these fields. It can be any field of the history table including those of the foreign tables, the individual property of the history.data dictionary, or 'year'. Descending order is obtained by using the '~field' construct.": "Les élémnents sont ordonnés selon les valeurs de ces champs. Ce sont les champs de la table historique en incluant tous les champs des tables étrangères, les clés du dictionaire history.data , ou 'year'. Un tri décroissant est obtenu en utilisant la synstaxe '~field'.",
'Error': 'Error',
'Error...': 'Erreur...',
'Event': 'Evènement',
......
......@@ -8,7 +8,7 @@ T("Configure the column of the grid displayed in the view.")
tp_conditions = \
T("Select the history records. "
"It can used any field of the history table using the SQL WHERE syntax, "
"but the foreign keys are not resolved nor the individual property of "
"but the foreign keys are not resolved nor the individual property of "
"the history.data dictionary. "
"(more information in the smart_query in the web2py documentation).")
......@@ -20,6 +20,12 @@ T("Row are grouped according to the value of that field. "
tp_features = \
T("Summary value can be computed for columns.")
tp_sorters = \
T("Entries are sorted according to the value of these fields. "
"It can be any field of the history table including those of the foreign tables, "
"the individual property of the history.data dictionary, or 'year'. "
"Descending order is obtained by using the '~field' construct.")
def_columns = \
"""[{
"xtype": "rownumberer"
......@@ -33,24 +39,24 @@ def_columns = \
def_features = \
"""[{
"ftype": "groupingsummary",
"groupHeaderTpl": "{name}",
"ftype": "groupingsummary",
"groupHeaderTpl": "{name}",
"startCollapsed": false
}, {
"ftype": "summary"
}]"""
if MIGRATE:
def_columns = None
def_features = None
db.define_table("lists",
Field("name", "string", length=255, notnull=True, unique=True),
Field("title", "string", length=255),
Field("conditions", "text", comment=tp_conditions),
Field("group_field", "string", length=255, comment=tp_fields),
Field("sorters", "list:string", comment=tp_fields),
Field("sorters", "list:string", comment=tp_sorters),
Field("columns", "text", default=def_columns, comment=tp_columns, notnull=True),
Field("features", "text", default=def_features, comment=tp_features),
Field("definition", "text"),
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment