Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
cd206686
Commit
cd206686
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
fix ordering of the sorting options in compounds list
Former-commit-id: 38b80a9cfdb558330ebf6dd07cab8850184b989c
parent
b67e508f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/views.py
+2
-1
2 additions, 1 deletion
ippisite/ippidb/views.py
with
2 additions
and
1 deletion
ippisite/ippidb/views.py
+
2
−
1
View file @
cd206686
import
json
import
json
import
math
import
math
from
collections
import
OrderedDict
from
django.db.models
import
Max
,
Min
,
Count
from
django.db.models
import
Max
,
Min
,
Count
from
django.shortcuts
import
render
from
django.shortcuts
import
render
...
@@ -201,7 +202,7 @@ def compound_list(request):
...
@@ -201,7 +202,7 @@ def compound_list(request):
display
=
'
v
'
display
=
'
v
'
context
[
'
display
'
]
=
display
context
[
'
display
'
]
=
display
compound_fields
=
{
f
.
name
:
f
.
verbose_name
for
f
in
Compound
.
_meta
.
get_fields
()
if
not
(
f
.
is_relation
)}
compound_fields
=
{
f
.
name
:
f
.
verbose_name
for
f
in
Compound
.
_meta
.
get_fields
()
if
not
(
f
.
is_relation
)}
sort_by_options
=
{}
sort_by_options
=
OrderedDict
()
for
sort_by_option_id
in
sort_by_option_ids
:
for
sort_by_option_id
in
sort_by_option_ids
:
if
sort_by_option_id
==
'
pubs
'
:
if
sort_by_option_id
==
'
pubs
'
:
name
=
'
Number of publications
'
name
=
'
Number of publications
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment