Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65744489
bfe_series_intext.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, Jun 5, 22:31
Size
803 B
Mime Type
text/x-python
Expires
Fri, Jun 7, 22:31 (2 d)
Engine
blob
Format
Raw Data
Handle
18120599
Attached To
R3600 invenio-infoscience
bfe_series_intext.py
View Options
# -*- coding: utf-8 -*-
"""BibFormat element - Prints series"""
def
format
(
bfo
,
css_class
=
'infoscience_serie'
):
""" Prints the series field of a record. """
allseries
=
bfo
.
fields
(
'440__'
)
if
len
(
allseries
)
>
0
:
series
=
allseries
[
0
]
name
=
series
.
get
(
'a'
)
volume
=
series
.
get
(
'v'
)
if
name
and
name
.
strip
():
out
=
[]
out
.
append
(
name
.
strip
())
if
volume
:
out
.
append
(
volume
.
strip
())
if
css_class
:
return
'<span class="
%s
">
%s
</span>'
%
(
css_class
,
' '
.
join
(
out
))
else
:
return
' '
.
join
(
out
)
return
''
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