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
limbra
limbra
Commits
8a1a0db1
Commit
8a1a0db1
authored
Jun 16, 2014
by
LE GAC Renaud
Browse files
Polish the check & compare view.
parent
6fbd8e96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
controllers/wizards.py
controllers/wizards.py
+4
-2
languages/fr-fr.py
languages/fr-fr.py
+2
-1
modules/check_tools.py
modules/check_tools.py
+4
-2
views/wizards/compare_publications.html
views/wizards/compare_publications.html
+3
-3
No files found.
controllers/wizards.py
View file @
8a1a0db1
...
...
@@ -81,7 +81,7 @@ def compare_publications():
The arguments of the URL are id1 and id2.
"""
data
=
[]
data
,
idrow
=
[]
,
[]
if
'id1'
not
in
request
.
vars
or
'id2'
not
in
request
.
vars
:
return
INLINE_ALERT
%
(
T
(
'Error'
),
T
(
'Specify id1 and id2 in the URL'
))
...
...
@@ -119,7 +119,9 @@ def compare_publications():
data
.
append
([
T
(
field
.
label
),
value1
,
value2
])
# add the ids as the first data
data
.
insert
(
0
,
idrow
)
# the protection covers the case in which id1=id2
if
idrow
:
data
.
insert
(
0
,
idrow
)
# delegate the rendering to the view
return
dict
(
data
=
data
,
title
=
row1
.
title
)
...
...
languages/fr-fr.py
View file @
8a1a0db1
...
...
@@ -100,7 +100,7 @@
'Colonnes'
:
'Colonnes'
,
'Columns'
:
'Colonnes'
,
'COM'
:
'COM'
,
'Compare publications'
:
'Compare
d
es publications'
,
'Compare publications
%s and %s
'
:
'Compare
l
es publications
%s et %s
'
,
'Comparison took %s seconds'
:
'La comparaison à durée %s secondes'
,
'Conditions'
:
'Conditions'
,
'Conference'
:
'Conférence'
,
...
...
@@ -167,6 +167,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'
:
'entrez un entier entre %(min)g et %(max)g'
,
'enter an integer greater than or equal to %(min)g'
:
'entrez un entier plus grand ou égual à %(min)g'
,
'Entries with duplicate origin'
:
'Enregistrements avec la même origine'
,
'Entries with duplicate origin [%s]'
:
'Enregistrements avec la même origine [%s]'
,
'Error'
:
'Erreur'
,
'Error !!!'
:
'Erreur !!!'
,
...
...
modules/check_tools.py
View file @
8a1a0db1
...
...
@@ -90,7 +90,7 @@ def check_publication(row):
# duplicate by origin
ids
=
duplicate_origin
(
row
.
publications
)
if
len
(
ids
)
>
1
:
if
len
(
ids
):
idset
=
idset
.
union
(
ids
)
text
=
T
(
"Entries with duplicate origin"
)
li
.
append
(
text
)
...
...
@@ -304,8 +304,10 @@ def duplicate_origin(publication):
return
ids
# look for publication with the same origin field
query
=
db
.
publications
.
origin
==
publication
[
'origin'
]
query
=
db
.
publications
.
id
!=
publication
[
'id'
]
query
=
((
query
)
&
(
db
.
publications
.
origin
==
publication
[
'origin'
]))
set
=
db
(
query
)
if
set
.
count
():
for
row
in
set
.
select
():
ids
.
append
(
str
(
row
.
id
))
...
...
views/wizards/compare_publications.html
View file @
8a1a0db1
...
...
@@ -83,7 +83,7 @@
store
:
Ext
.
create
(
'
Ext.data.ArrayStore
'
,
cfgStore
),
columns
:
[
{
xtype
:
'
rownumberer
'
},
{
text
:
trField
,
dataIndex
:
'
field
'
,
flex
:
1
},
{
text
:
trField
.
concat
(
'
(*)
'
)
,
dataIndex
:
'
field
'
,
flex
:
1
},
{
text
:
trReference
,
dataIndex
:
'
value1
'
,
flex
:
1.5
},
{
text
:
trDuplicate
,
dataIndex
:
'
value2
'
,
flex
:
1.5
}
],
...
...
@@ -105,13 +105,13 @@
<body>
<p
style=
"font-size: 12px; font-variant: small-caps; margin-left: 10px; margin-bottom: 3ex; margin-top: 2ex;"
>
{{=T("Compare publications
"
)}}
{{=T("Compare publications
%s and %s") % (request.vars.id1, request.vars.id2
)}}
</p>
<div
id=
"grid-{{=divgrid}}"
style=
"padding: 10px 0px 0px 40px"
></div>
<p
style=
"font-size: 8px; margin-top: 0px; margin-left: 40px; margin-bottom: 30px;"
>
{{=T("Fields with identical value are not listed.")}}
(*)
{{=T("Fields with identical value are not listed.")}}
</p>
...
...
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