<commit_before>{#
## This file is part of Invenio.
## Copyright (C) 2012 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.
#}
{% from "_formhelpers.html" import render_filter_form with context %}
{% from "search/helpers.html" import collection_tree, portalbox_sidebar, search_also, search_form, search_form_javascript, record_brief_links with context %}
{% from "search/results.html" import render_search_results with context %}
{% extends "page.html" %}
{# set title = collection.name_ln if collection.id > 1 else None #}
{% set title = None %}

{%- set portalboxes = dict() -%}
{%- for k,l in collection.portalboxes_ln|groupby('position') -%}
  {%- do portalboxes.update({k:l}) -%}
{%- endfor -%}

{% block title %}
  {{ portalboxes.tp }}
  {{ super() }}
  {{ portalboxes.te }}
{% endblock %}
{% block header %}
  {{ super() }}
  {% js url_for('search.static', filename='js/search/typeahead.js') %}
  {% js url_for('search.static', filename='js/search/facet.js') %}
  {% js url_for('static', filename='js/bootstrap-select.js') %}
  {% js "js/jquery.hotkeys.js" %}
  {% js url_for('search.static', filename='js/search/hotkeys.js') %}
  {%- set args = request.args.copy().to_dict() -%}
  {%- set jrec = (pagination.page-2)*pagination.per_page+1 if pagination.has_prev else 1 -%}
  {%- do args.update({'jrec': jrec}) -%}
  {%- if pagination.has_prev -%}
  <link rel="prev" href="{{ url_for(request.endpoint, **args) }}"/>
  {%- endif -%}
  {%- if pagination.has_next -%}
  {%- set jrec = (pagination.page)*pagination.per_page+1 if pagination.has_next else (pagination.pages-1)*pagination.per_page+1 -%}
  {%- do args.update({'jrec': jrec}) -%}
  <link rel="next" href="{{ url_for(request.endpoint, **args) }}"/>
  {%- endif -%}
{% endblock %}


{% block body %}
{%- block extra_style -%}
<style>
.modal-backdrop {
  /* Show lighter modal window for search. */
  background-color: rgba(255,255,255,0.5);
}

#facet_list .panel-heading {
  background-color: whiteSmoke;
}

#facet_list .panel-heading a:after {
  content: ' ';
  float: right;
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  vertical-align: text-top;
  background-image: url("../img/glyphicons-halflings.png");
  background-position: 14px 14px;
  background-repeat: no-repeat;
  /* list alt */
  background-position: -264px -24px;
}

#facet_list ul.list-unstyled ul.list-unstyled {
  padding-left: 10px;
  font-size: 90%;
}

#facet_list.affix {
  top: 60px;
}

body {
  position: relative;
}

#facet_list.affix-bottom {
  position: absolute;
  top: auto;
  bottom: 170px;
}

</style>
{%- endblock extra_style -%}

{%- block search_form -%}{{ search_form(collection) }}{%- endblock search_form -%}

{%- block index -%}
{%- if not recids|length -%}
{%- block index_noresult -%}
<div class="row">
  <div class="col-md-12">
    <p>
      <strong>{{ _('Your search did not match any records. Please try again.') }}</strong>
    </p>
    {{ create_nearest_terms_box()|safe }}
  </div>
</div>
{%- endblock index_noresult -%}
{% else %}
{%- block index_results -%}
<div class="row">
  {%- block facets %}
  <div class="col-md-3 col-lg-2 visible-md visible-lg">
    <div class="facet" id="facet_list"></div>
  </div>
  {%- endblock facets %}
  {%- block index_right -%}
  <div class="col-md-9 col-lg-10">
    {%- block facets_filter %}
    <div class="row visible-md visible-lg">
      <div class="col-md-10">
        <div class="well" id="facet_filter" style="clear:both; display: none;">
          <input type="hidden" value="{{ request.args.get('p', '') }}" name="p" />
        </div>
      </div>
    </div>
    {%- endblock facets_filter %}
    {%- block results %}
    <div class="row"><commit_msg>formatter: templates modularisation<commit_after>{#
## This file is part of Invenio.
## Copyright (C) 2012 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.
#}
{% from "_formhelpers.html" import render_filter_form with context %}
{% from "search/helpers.html" import collection_tree, portalbox_sidebar, search_also, search_form, search_form_javascript, record_brief_links with context %}
{% from "search/results.html" import render_search_results with context %}
{% extends "page.html" %}
{# set title = collection.name_ln if collection.id > 1 else None #}
{% set title = None %}

{%- set portalboxes = dict() -%}
{%- for k,l in collection.portalboxes_ln|groupby('position') -%}
  {%- do portalboxes.update({k:l}) -%}
{%- endfor -%}

{% block global_css %}
  {{ super() }}
  {%- css url_for('static', filename='css/formatter/templates_brief.css'), '20-search' -%}
{% endblock %}

{% block title %}
  {{ portalboxes.tp }}
  {{ super() }}
  {{ portalboxes.te }}
{% endblock %}
{% block header %}
  {{ super() }}
  {% js url_for('search.static', filename='js/search/typeahead.js') %}
  {% js url_for('search.static', filename='js/search/facet.js') %}
  {% js url_for('static', filename='js/bootstrap-select.js') %}
  {% js "js/jquery.hotkeys.js" %}
  {% js url_for('search.static', filename='js/search/hotkeys.js') %}
  {%- set args = request.args.copy().to_dict() -%}
  {%- set jrec = (pagination.page-2)*pagination.per_page+1 if pagination.has_prev else 1 -%}
  {%- do args.update({'jrec': jrec}) -%}
  {%- if pagination.has_prev -%}
  <link rel="prev" href="{{ url_for(request.endpoint, **args) }}"/>
  {%- endif -%}
  {%- if pagination.has_next -%}
  {%- set jrec = (pagination.page)*pagination.per_page+1 if pagination.has_next else (pagination.pages-1)*pagination.per_page+1 -%}
  {%- do args.update({'jrec': jrec}) -%}
  <link rel="next" href="{{ url_for(request.endpoint, **args) }}"/>
  {%- endif -%}
{% endblock %}


{% block body %}
{%- block extra_style -%}
<style>
.modal-backdrop {
  /* Show lighter modal window for search. */
  background-color: rgba(255,255,255,0.5);
}

#facet_list .panel-heading {
  background-color: whiteSmoke;
}

#facet_list .panel-heading a:after {
  content: ' ';
  float: right;
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  vertical-align: text-top;
  background-image: url("../img/glyphicons-halflings.png");
  background-position: 14px 14px;
  background-repeat: no-repeat;
  /* list alt */
  background-position: -264px -24px;
}

#facet_list ul.list-unstyled ul.list-unstyled {
  padding-left: 10px;
  font-size: 90%;
}

#facet_list.affix {
  top: 60px;
}

body {
  position: relative;
}

#facet_list.affix-bottom {
  position: absolute;
  top: auto;
  bottom: 170px;
}

</style>
{%- endblock extra_style -%}

{%- block search_form -%}{{ search_form(collection) }}{%- endblock search_form -%}

{%- block index -%}
{%- if not recids|length -%}
{%- block index_noresult -%}

<div class="row">
  <div class="col-md-12">
    <p>
      <strong>{{ _('Your search did not match any records. Please try again.') }}</strong>
    </p>
    {{ create_nearest_terms_box()|safe }}
  </div>
</div>
{%- endblock index_noresult -%}
{% else %}
{%- block index_results -%}
<div class="row">
  {%- block facets %}
  <div class="col-md-3 col-lg-2 visible-md visible-lg">
    <div class="facet" id="facet_list"></div>
  </div>
  {%- endblock facets %}
  {%- block index_right -%}
  <div class="col-md-9 col-lg-10">
    {%- block facets_filter %}
    <div class="row visible-md visible-lg">
      <div class="col-md-10">
        <div class="well" id="facet_filter" style="clear:both; display: none;">
          <input type="hidden" value="{{ request.args.get('p', '') }}" name="p" />
        </div>
      </div>
    </div>
    {%- endblock facets_filter %}
    {%- block results %}
    <div class="row">
{'fraction_non_alphanumeric': 0.17974483459410637, 'fraction_numerical': 0.01603251665349441, 'mean_word_length': 3.7598065556152607, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3608814', 'n_tokens_mistral': 3304, 'n_tokens_neox': 3048, 'n_words': 779}