{# # This file is part of Invenio. # Copyright (C) 2016 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 panel_start(title, icon="", btn_text='', btn='', btn_icon='', btn_href='', btn_class='btn-default', btn_name='', btn2='', btn_icon2='', btn_href2='', btn_class2='btn-default', btn_name2='', id="", with_body=True, panel_extra_class="panel-default") %} {%- block panel_start scoped %}
{%- block panel_heading scoped %}
{%if icon %}{% endif %} {{title}} {%- if btn and (btn_href or btn_text) -%}
{%- if btn_text %} (updated {{last_sync}}) {%- endif %} {%- if btn_href %} {% if btn_icon %} {% endif %}{{btn}} {%- else %} {%- if btn_name %} {%- endif %} {%- endif %}
{%- endif -%} {%- if btn2 and btn_href2 -%}
{%- if btn_href2 %} {% if btn_icon2 %} {% endif %}{{btn2}} {%- else %} {%- if btn_name2 %} {%- endif %} {%- endif %}
{%- endif -%}
{%- endblock %} {%- if with_body %}
{%- endif %} {%- endblock %} {%- endmacro %} {%- macro panel_end(with_body=True) %} {%- block panel_end scoped %} {%- if with_body %}
{%- endif %}
{%- endblock %} {%- endmacro %} {%- macro repo_switch(repo, repo_id, size='mini') %} {%- block repo_switch scoped %} {%- set inaccessible = (repo and repo.user_id and (repo.user_id != current_user.id)) %} {%- endblock %} {%- endmacro %}