{# # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {% macro record_brief_links(record) %}{% block record_brief_links scoped %}
{%- set recID = record['recid'] -%} {%- set i = recID %} {%- set similar = "recid:%s" % recID -%} {%- if config.CFG_WEBSEARCH_USE_ALEPH_SYSNOS -%} {%- set alephsysnos = record['system_number'] -%} {%- if len(alephsysnos) > 0 -%} {%- set recID = alephsysnos[0] -%} {%- set similar = "sysno:%d" % recID -%} {%- endif -%} {%- endif -%} {% block record_brief_links_details scoped %} {{ _("Detailed record") }} - {{ _("Similar records") }} {% endblock record_brief_links_details %} {# Citations link #} {% block record_brief_links_citations scoped %} {%- if config.CFG_BIBRANK_SHOW_CITATION_LINKS -%} {%- set num_citations = record['_cited_by_count'] -%} {%- if num_citations -%} - {{ _("Cited by %(x_num)i records", x_num=num_citations) if num_citations > 1 else _("Cited by 1 record") }} {%- endif -%} {%- endif -%} {% endblock record_brief_links_citations %} {# Comments link #} {% block record_brief_links_comments scoped %} {%- if config.CFG_WEBCOMMENT_ALLOW_COMMENTS and config.CFG_WEBSEARCH_SHOW_COMMENT_COUNT -%} {%- set num_comments = record['_number_of_comments'] -%} {%- if num_comments -%} - {{ _("%(x_num)i comments", x_num=num_comments) if num_comments > 1 else _("1 comment") }} {%- endif -%} {%- endif -%} {% endblock record_brief_links_comments %} {# Reviews link #} {% block record_brief_links_reviews scoped %} {%- if config.CFG_WEBCOMMENT_ALLOW_REVIEWS and config.CFG_WEBSEARCH_SHOW_REVIEW_COUNT -%} {%- set num_reviews = record['_number_of_reviews'] -%} {%- if num_reviews -%} - {{ _("%(x_num)i reviews", x_num=num_reviews) if num_reviews > 1 else _("1 review") }} {%- endif -%} {%- endif -%} {% endblock record_brief_links_reviews %}
{% endblock record_brief_links %}{% endmacro %} {%- macro collection_tree(collections, limit=None) %} {%- set macrokwargs = kwargs %} {%- block collection_tree scoped %} {%- set idxs = [0] -%}{{ cp.portalbox.body|safe }}