Skip to content

Commit

Permalink
fixed #213
Browse files Browse the repository at this point in the history
  • Loading branch information
emanueldima committed Apr 7, 2014
1 parent 4125e47 commit e03431e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion deployment/deploy_overlay-rh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ -f /opt/invenio/lib/python/invenio/bibfield_functions/is_type_isbn_issn_uni
fi

# add invenio-specific overlay
cp -vf invenio/templates/* /opt/invenio/etc/templates/
cp -vrf invenio/templates/* /opt/invenio/etc/templates/
cp -vrf invenio/lib/* /opt/invenio/lib/python/invenio/
cp -vrf invenio/etc/* /opt/invenio/etc/
cp -vrf invenio/var/* /opt/invenio/var/
Expand Down
10 changes: 4 additions & 6 deletions 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 All @@ -87,11 +87,11 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi

additional_str = ''
if additionals:
additional_str = ' <small>(<a '+style+' href="'+CFG_SITE_URL+'/%s/' % CFG_SITE_RECORD + str(bfo.recID)+'/files/">%s</a>)</small>' % _("additional files")
additional_str = ' <small>(<a '+style+' href="/%s/' % CFG_SITE_RECORD + str(bfo.recID)+'/files/">%s</a>)</small>' % _("additional files")

versions_str = ''
#if old_versions:
#versions_str = ' <small>(<a '+style+' href="'+CFG_SITE_URL+'/CFG_SITE_RECORD/'+str(bfo.recID)+'/files/">%s</a>)</small>' % _("older versions")
#versions_str = ' <small>(<a '+style+' href="/CFG_SITE_RECORD/'+str(bfo.recID)+'/files/">%s</a>)</small>' % _("older versions")

if main_urls:
out = []
Expand Down Expand Up @@ -177,8 +177,6 @@ def format_element(bfo, style, separator='; ', show_icons='no', focus_on_main_fi
out += separator.join(url_list)

if others_urls:
external_link = len(others_urls) == 1 and _('external link') or _('external links')
out += '<strong>%s</strong>: ' % external_link.capitalize()
url_list = []
for url, descr in others_urls:
url_list.append('<a '+style+' href="'+escape(url)+'">'+ \
Expand Down Expand Up @@ -275,7 +273,7 @@ def get_files(bfo, distinguish_main_and_additional_files=True, include_subformat
## This format should be hidden.
continue

descr = _("Fulltext")
descr = filename
if complete_url.has_key('y'):
descr = complete_url['y']
if descr == 'Fulltext':
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
4 changes: 3 additions & 1 deletion invenio/templates/format_templates/Default_HTML_brief.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@

{% block record_brief %}
<div class="htmlbrief">
{{ bfe_fulltext(bfo, show_icons="yes", prefix='<ul class="nav nav-pills pull-right" style="margin-top: -10px;"><li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" rel="tooltip" title="Download" href="#"><i class="icon-download-alt"></i><span class="caret"></span></a>', suffix='</li></ul>', focus_on_main_file="yes") }}
{{ bfe_fulltext(bfo, show_icons="yes",
prefix='<ul class="nav nav-pills pull-right" style="margin-top: -10px;"><li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" rel="tooltip" title="Download" href="#"><i class="icon-download-alt"></i><span class="caret"></span></a><ul class="dropdown-menu pull-right"><li>',
suffix='</li></ul></li></ul>', focus_on_main_file="yes", separator="</li><li>") }}
{% block record_header %}
<h4 class="media-heading">
<a href="{{ url_for('record.metadata', recid=record['recid']) }}">
Expand Down

0 comments on commit e03431e

Please sign in to comment.