Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63745795
bfe_contact_authors.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 22, 05:39
Size
740 B
Mime Type
text/x-python
Expires
Fri, May 24, 05:39 (2 d)
Engine
blob
Format
Raw Data
Handle
17813455
Attached To
R3600 invenio-infoscience
bfe_contact_authors.py
View Options
# -*- coding: utf-8 -*-
"""BibFormat element - Prints link to EPFL authors"""
from
invenio.messages
import
gettext_set_language
def
format
(
bfo
,
):
"""
Prints the contact informations.
Translate using given knowledge base.
TODO USE Knowledge base!!
"""
authors
=
bfo
.
fields
(
"700__"
,
escape
=
3
)
out
=
[]
for
author
in
authors
:
name
=
author
.
get
(
'a'
)
sciper
=
author
.
get
(
'g'
)
if
sciper
:
out
.
append
(
'<a href="http://people.epfl.ch/
%s
">
%s
</a>'
%
(
sciper
,
name
))
return
''
.
join
([
'<li>
%s
</li>'
%
elem
for
elem
in
out
])
def
escape_values
(
bfo
):
"""
Called by BibFormat in order to check if output of this element
should be escaped.
"""
return
0
Event Timeline
Log In to Comment