Skip to content

Commit

Permalink
#213: relative paths for images
Browse files Browse the repository at this point in the history
  • Loading branch information
emanueldima committed Apr 7, 2014
1 parent 449b609 commit fec9a7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion invenio/lib/bibformat_elements/bfe_fulltext.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi
style = 'class="'+style+'"'

if show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-12x16.gif" alt="%s"/>' % _("Download fulltext")
else:
file_icon = ''

Expand Down
12 changes: 6 additions & 6 deletions invenio/lib/bibformat_elements/bfe_fulltext_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi
if len(main_urls.keys()) == 1 and len(main_urls.items()[0][1]) == 1 and \
(not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 0 and \
show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-34x48.gif" alt="%s" /><br />' % _("Download fulltext")

elif show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-12x16.gif" alt="%s"/>' % _("Download fulltext")
else:
file_icon = ''

Expand Down Expand Up @@ -110,10 +110,10 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi
if len(main_urls.keys()) == 0 and \
len(cern_urls) == 1 and len(others_urls) == 0 and \
show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-34x48.gif" alt="%s" /><br />' % _("Download fulltext")

elif show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-12x16.gif" alt="%s"/>' % _("Download fulltext")
else:
file_icon = ''

Expand All @@ -130,9 +130,9 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi
if len(main_urls.keys()) == 0 and \
(not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 1 and \
show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-34x48.gif" alt="%s" /><br />' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-34x48.gif" alt="%s" /><br />' % _("Download fulltext")
elif show_icons.lower() == 'yes':
file_icon = '<img style="border:none" src="%s/img/file-icon-text-12x16.gif" alt="%s"/>' % (CFG_SITE_URL, _("Download fulltext"))
file_icon = '<img style="border:none" src="/img/file-icon-text-12x16.gif" alt="%s"/>' % _("Download fulltext")
else:
file_icon = ''
external_link = len(others_urls) == 1 and _('external link') or _('external links')
Expand Down

0 comments on commit fec9a7c

Please sign in to comment.