Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
b9eaf595
Commit
b9eaf595
authored
Oct 22, 2012
by
LE GAC Renaud
Browse files
Use the field argument represent.
parent
29334438
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
languages/fr-fr.py
languages/fr-fr.py
+2
-0
models/db.py
models/db.py
+5
-3
views/list/people.html
views/list/people.html
+5
-12
No files found.
languages/fr-fr.py
View file @
b9eaf595
...
...
@@ -10,6 +10,7 @@
'careers'
:
'carrières'
,
'categories'
:
'catégories'
,
'Category'
:
'Catégorie'
,
'Catégorie'
:
'Catégorie'
,
'CDD'
:
'CDD'
,
'Cdd'
:
'Cdd'
,
'Cdd Flag'
:
'Cdd Flag'
,
...
...
@@ -69,6 +70,7 @@
'Max Records'
:
'Max Records'
,
'Model'
:
'Modèle'
,
'Name'
:
'Nom'
,
'Niveau'
:
'Niveau'
,
'Note'
:
'Note'
,
'Notified'
:
'Notifié'
,
'Organization'
:
'Organisation'
,
...
...
models/db.py
View file @
b9eaf595
...
...
@@ -62,8 +62,8 @@ db.define_table("agencies",
migrate
=
"agencies.table"
)
db
.
define_table
(
"categories"
,
Field
(
"code"
,
"string"
,
notnull
=
True
),
Field
(
"usual"
,
"string"
),
Field
(
"code"
,
"string"
,
notnull
=
True
,
label
=
T
(
"Level"
)
),
Field
(
"usual"
,
"string"
,
label
=
T
(
"Category"
)
),
Field
(
"definition"
,
"text"
),
migrate
=
"categories.table"
)
...
...
@@ -149,7 +149,9 @@ db.define_table("history",
Field
(
"id_projects"
,
db
.
projects
,
default
=
undef_id
,
label
=
'Project'
),
Field
(
"id_categories"
,
db
.
categories
,
default
=
undef_id
,
label
=
'Category'
),
Field
(
"id_agencies"
,
db
.
agencies
,
default
=
undef_id
,
label
=
'Agency'
),
Field
(
"cdd_flag"
,
"boolean"
,
default
=
False
,
label
=
"CDD"
),
Field
(
"cdd_flag"
,
"boolean"
,
default
=
False
,
label
=
"CDD"
,
represent
=
lambda
flag
,
row
:
(
CENTER
(
'x'
)
if
flag
else
''
)),
Field
(
"start_date"
,
"date"
,
default
=
today
,
notnull
=
True
),
Field
(
"end_date"
,
"date"
),
Field
(
"percentage"
,
"integer"
,
default
=
100
),
...
...
views/list/people.html
View file @
b9eaf595
...
...
@@ -3,13 +3,6 @@
<br>
{{
# column with a better display of the CDD flag
cdd = {'label': 'CDD',
'class': '',
'content': lambda row, rc: (CENTER('x') if row.history.cdd_flag else ''),
'selected': False,
'width': ''}
# column with the period coverage
time_coverage = {'label': T('Coverage'),
'class': '',
...
...
@@ -28,11 +21,11 @@
table = SQLTABLE(rows,
columns=['categories.usual',
'people.last_name',
'categories.code'
]
,
headers={'categories.usual': T('Category'),
'
people.last_name': T('Name'),
'categories.code': T('Level')}
,
extracolumns=[
cdd,
time_coverage, age],
'categories.code',
'history.cdd_flag',
'
history.percentage'],
headers='labels'
,
extracolumns=[time_coverage, age],
renderstyle=True)
response.write(CENTER(table))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment