diff --git a/invenio/templates/format_templates/Default_HTML_brief.tpl b/invenio/templates/format_templates/Default_HTML_brief.tpl new file mode 100644 index 0000000000..8ddf8ed257 --- /dev/null +++ b/invenio/templates/format_templates/Default_HTML_brief.tpl @@ -0,0 +1,142 @@ +{% macro render_record_footer(number_of_displayed_authors) %} +
+ {% if record.get('number_of_authors', 0) > 0 %} + by + {% set authors = record.get('authors[:].full_name', []) %} + {% set sep = joiner("; ") %} + {% for full_name in authors[0:number_of_displayed_authors] %} {{ sep() }} + + {{ full_name }} + + {% endfor %} + {% if record.get('number_of_authors', 0) > number_of_displayed_authors %} + {{ sep() }} + + {{ _(' et al') }} + + {% endif %} + + | + {% endif %} + {{ record['creation_date']|invenio_format_date() }} + {# Citations link #} + {%- if config.CFG_BIBRANK_SHOW_CITATION_LINKS -%} + {%- set num_citations = record['_cited_by_count'] -%} + {%- if num_citations -%} + | + + + {{ _("%i citations") % num_citations if num_citations > 1 else _("1 citation") }} + + {%- endif -%} + {%- endif -%} + + {# Comments link #} + {%- if config.CFG_WEBCOMMENT_ALLOW_COMMENTS and config.CFG_WEBSEARCH_SHOW_COMMENT_COUNT -%} + {%- set num_comments = record['_number_of_comments'] -%} + {%- if num_comments -%} + | + + + {{ _("%i comments") % num_comments if num_comments > 1 else _("1 comment") }} + + {%- endif -%} + {%- endif -%} + + {# Reviews link #} + {%- if config.CFG_WEBCOMMENT_ALLOW_REVIEWS and config.CFG_WEBSEARCH_SHOW_REVIEW_COUNT -%} + {%- set num_reviews = record['_number_of_reviews'] -%} + {%- if num_reviews -%} + | + + + {{ _("%i reviews") % num_reviews if num_reviews > 1 else _("1 review") }} + + {%- endif -%} + {%- endif -%} + + | {{ _("Similar records") }} + + {% if record['keywords']|length %} | + {% for keyword in record['keywords'] %} + + + {{ keyword['term'] }} + + + {% endfor %} + {% endif %} + + {# WebTags #} + {{ tfn_webtag_record_tags(record['recid'], current_user.get_id())|prefix('|') }} +
+ {% if record.get('number_of_authors', 0) > number_of_displayed_authors %} + {% set sep = joiner("; ") %} + + {% endif %} +{% endmacro %} + +{% macro render_fulltext_snippets() %} + {{ tfn_get_fulltext_snippets(record['recid'], request.args['p'], current_user) | wrap(prefix='', suffix='
') }} +{% endmacro %} + +{% macro record_info() %} + {{ bfe_primary_report_number(bfo, prefix=' ') }} + {{ bfe_additional_report_numbers(bfo, prefix=' ', + separator=' ') }} + + {{ bfe_publi_info(bfo, prefix='| ') }} + {{ bfe_doi(bfo, prefix='| ') }} + {# ' %(doi)s'|format(doi=record['doi']) if record.get('doi') #} + +{% endmacro %} + +{% block record_brief %} ++ {{ record.get('abstract.summary', '')|sentences(3) }} +
+ ++ {{ record_info() }} +
+