Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66341741
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
Sun, Jun 9, 22:43
Size
813 B
Mime Type
text/x-python
Expires
Tue, Jun 11, 22:43 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18207587
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__'
,
escape
=
2
)
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