diff --git a/modules/bibformat/etc/format_templates/ENACExportfullconference.bft b/modules/bibformat/etc/format_templates/ENACExportfullconference.bft
index 7ae34e79a..9124ba19e 100644
--- a/modules/bibformat/etc/format_templates/ENACExportfullconference.bft
+++ b/modules/bibformat/etc/format_templates/ENACExportfullconference.bft
@@ -1,10 +1,10 @@
Export detailed ENAC
Detailed format for article, review
diff --git a/modules/bibformat/etc/format_templates/Exportdetailedconference.bft b/modules/bibformat/etc/format_templates/Exportdetailedconference.bft
index f0b95431c..b14e8bb1a 100644
--- a/modules/bibformat/etc/format_templates/Exportdetailedconference.bft
+++ b/modules/bibformat/etc/format_templates/Exportdetailedconference.bft
@@ -1,5 +1,5 @@
Export detailed - conferences
Detailed format for conf, poster, talk
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceAU.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceAU.bft
index 70fbb95e6..709ff8420 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceAU.bft
@@ -1,5 +1,5 @@
Export detailed - conferences, links on authors
Detailed format for conf, poster, talk, with links on authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceAUENAC.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceAUENAC.bft
index 152594f1e..69149e18e 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceAUENAC.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceAUENAC.bft
@@ -1,6 +1,6 @@
Export detailed ENAC - conferences, links on authors
Detailed format for conf, poster, talk, with links on authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceENAC.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceENAC.bft
index 324860ab6..fb145989c 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceENAC.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceENAC.bft
@@ -1,6 +1,6 @@
Export detailed - conferences
Detailed format for conf, poster, talk
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTI.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTI.bft
index 280f6a94c..33bfd919d 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTI.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTI.bft
@@ -1,5 +1,5 @@
Export detailed - conferences, links on titles
Detailed format for conf, poster, talk, with links on titles
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAU.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAU.bft
index 2884f6a0c..42f9a9140 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAU.bft
@@ -1,5 +1,5 @@
Export detailed - conferences, links on titles, authors
Detailed format for conf, poster, talk, with links on titles, authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAUENAC.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAUENAC.bft
index 809be5178..c336a7cdd 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAUENAC.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIAUENAC.bft
@@ -1,6 +1,6 @@
Export detailed ENAC - conferences, links on titles, authors
Detailed format for conf, poster, talk, with links on titles, authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIENAC.bft b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIENAC.bft
index 625e90770..c4e865a06 100644
--- a/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIENAC.bft
+++ b/modules/bibformat/etc/format_templates/ExportdetailedconferenceTIENAC.bft
@@ -1,6 +1,6 @@
Export detailed ENAC- conferences, links on titles
Detailed format for conf, poster, talk, with links on titles
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/Exportfullconference.bft b/modules/bibformat/etc/format_templates/Exportfullconference.bft
index 98188e7a0..51aeebc9e 100644
--- a/modules/bibformat/etc/format_templates/Exportfullconference.bft
+++ b/modules/bibformat/etc/format_templates/Exportfullconference.bft
@@ -1,6 +1,6 @@
Export full - conferences
Full format for conf, poster, talk
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportfullconferenceAU.bft b/modules/bibformat/etc/format_templates/ExportfullconferenceAU.bft
index d247f2508..44019364e 100644
--- a/modules/bibformat/etc/format_templates/ExportfullconferenceAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportfullconferenceAU.bft
@@ -1,6 +1,6 @@
Export full - conferences, links on authors
Full format for conf, poster, talk, with links on authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportfullconferenceTI.bft b/modules/bibformat/etc/format_templates/ExportfullconferenceTI.bft
index 9a02f16b6..b5a1e1ea5 100644
--- a/modules/bibformat/etc/format_templates/ExportfullconferenceTI.bft
+++ b/modules/bibformat/etc/format_templates/ExportfullconferenceTI.bft
@@ -1,6 +1,6 @@
Export full - conferences, links on titles
Full format for conf, poster, talk, with links on titles
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/ExportfullconferenceTIAU.bft b/modules/bibformat/etc/format_templates/ExportfullconferenceTIAU.bft
index 8a610db66..7f4533e02 100644
--- a/modules/bibformat/etc/format_templates/ExportfullconferenceTIAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportfullconferenceTIAU.bft
@@ -1,6 +1,6 @@
Export full - conferences, links on titles, authors
Full format for conf, poster, talk, with links on titles, authors
-
+
\ No newline at end of file
diff --git a/modules/bibformat/etc/format_templates/Exportshortconference.bft b/modules/bibformat/etc/format_templates/Exportshortconference.bft
index af2577ad5..d7eee67a5 100644
--- a/modules/bibformat/etc/format_templates/Exportshortconference.bft
+++ b/modules/bibformat/etc/format_templates/Exportshortconference.bft
@@ -1,3 +1,3 @@
Export short - conference
Short format for conference, poster, proccedings, talk
-
\ No newline at end of file
+
diff --git a/modules/bibformat/etc/format_templates/ExportshortconferenceAU.bft b/modules/bibformat/etc/format_templates/ExportshortconferenceAU.bft
index 087e6bc9a..fbb1a0a3d 100644
--- a/modules/bibformat/etc/format_templates/ExportshortconferenceAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportshortconferenceAU.bft
@@ -1,3 +1,3 @@
Export short - conference, link on authors
Short format for conference, poster, proccedings, talk, which puts links to fulltexts on authors
-
\ No newline at end of file
+
diff --git a/modules/bibformat/etc/format_templates/ExportshortconferenceTI.bft b/modules/bibformat/etc/format_templates/ExportshortconferenceTI.bft
index 21f80551e..feca19d62 100644
--- a/modules/bibformat/etc/format_templates/ExportshortconferenceTI.bft
+++ b/modules/bibformat/etc/format_templates/ExportshortconferenceTI.bft
@@ -1,3 +1,3 @@
Export short - conference, link on titles
Short format for conference, poster, proccedings, talk, which puts links to fulltexts on titles
-
\ No newline at end of file
+
diff --git a/modules/bibformat/etc/format_templates/ExportshortconferenceTIAU.bft b/modules/bibformat/etc/format_templates/ExportshortconferenceTIAU.bft
index eab9c439e..5eb48bee6 100644
--- a/modules/bibformat/etc/format_templates/ExportshortconferenceTIAU.bft
+++ b/modules/bibformat/etc/format_templates/ExportshortconferenceTIAU.bft
@@ -1,3 +1,3 @@
Export short - conference, link on titles, authors
Short format for conference, poster, proccedings, talk, which puts links to fulltexts on titles, authors
-
\ No newline at end of file
+
diff --git a/modules/bibformat/etc/format_templates/HB_conf.bft b/modules/bibformat/etc/format_templates/HB_conf.bft
index a2a311ab5..70439c6cd 100644
--- a/modules/bibformat/etc/format_templates/HB_conf.bft
+++ b/modules/bibformat/etc/format_templates/HB_conf.bft
@@ -1,4 +1,4 @@
EPFL HTML brief - conference
Brief format for conference, poster, proccedings, talk
-
-
\ No newline at end of file
+
+
diff --git a/modules/bibformat/etc/format_templates/HD_EPFL_default.bft b/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
index cfc3d9638..ec1a0ae88 100644
--- a/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
+++ b/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
@@ -1,92 +1,92 @@
EPFL HTML detailed - default
Detailed format for article, review
FulltextFulltext
-
Related materialDocuments pertinents
+
Related materialDocuments pertinents
diff --git a/modules/bibformat/lib/elements/bfe_title.py b/modules/bibformat/lib/elements/bfe_title.py
index 839edd6b9..8365fdbf6 100644
--- a/modules/bibformat/lib/elements/bfe_title.py
+++ b/modules/bibformat/lib/elements/bfe_title.py
@@ -1,115 +1,115 @@
"""BibFormat element - Prints titles
"""
import cgi
from invenio import bibformat_utils
from invenio.bibdocfile import BibRecDocs
from invenio.config import CFG_SITE_URL
def add_link_to_fulltext(bfo, text):
"""
Creates a link to fulltext on given text.
"""
documents = BibRecDocs(bfo.recID)
# assert we have some files
if documents and len(documents.bibdocs) == 0:
return text
# check visibility
visible_list = []
for doc in documents.bibdocs:
files = doc.list_latest_files()
if len(files):
#try:
fulltext = files[0]
if fulltext.status in ['', 'PUBLIC']:
visible_list.append(fulltext)
#except IndexError:
# return
# build url
if len(visible_list) == 0:
return text
elif len(visible_list) == 1:
#only one, return a direct url to the last version
return '%s' % (visible_list[0].fullurl, text)
else:
return '%s' % (CFG_SITE_URL, bfo.recID, text)
def format_element(bfo, separator=" ", highlight='no', latex_to_html='no', link_to_fulltext='no', punctuation = ''):
"""
Prints the titles of a record.
@param separator: separator between the different titles
@param highlight: highlights the words corresponding to search query if set to 'yes'
@param latex_to_html: if 'yes', interpret as LaTeX title
@param link_to_fulltext: if 'yes', link title to fulltext if available.
@param punctuation: add this char if the title don't already end with one
"""
titles = []
title = bfo.field('245__a')
title_remainder = bfo.field('245__b')
edition_statement = bfo.field('250__a')
title_tome = bfo.field('245__n')
title_part = bfo.field('245__p')
#start with standard number if given
standard_number = bfo.field('740__a')
if len(standard_number) > 0:
standard_number += ' - '
titles.append(standard_number)
if len(title) > 0:
if title_remainder:
title += ': ' + title_remainder
if len(title_tome) > 0:
title += ", " + title_tome
if len(title_part) > 0:
title += ": " + title_part
titles.append( title )
title = bfo.field('246__a')
if len(title) > 0:
titles.append( title )
title = bfo.field('246__b')
if len(title) > 0:
titles.append( title )
title = bfo.field('246_1a')
if len(title) > 0:
titles.append( title )
titles = [cgi.escape(x) for x in titles]
if highlight == 'yes':
titles = [bibformat_utils.highlight(x, bfo.search_pattern) for x in titles]
if len(edition_statement) > 0:
out = separator.join(titles) + "; " + edition_statement
else:
out = separator.join(titles)
if latex_to_html == 'yes':
out = bibformat_utils.latex_to_html(out)
if link_to_fulltext == 'yes':
out = add_link_to_fulltext(bfo, out)
# add a , at the end if not already
if out and punctuation:
if out[-1] not in [',', '.', '!', '?', ';']:
- out.append(punctuation)
+ out += punctuation
return out
def escape_values(bfo):
"""
Called by BibFormat in order to check if output of this element
should be escaped.
"""
- return 0
\ No newline at end of file
+ return 0