Page MenuHomec4science

record.html
No OneTemporary

File Metadata

Created
Wed, Jan 1, 12:19

record.html

{#
## 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.
#}
{% extends "page.html" %}
{#
{% set title = title %}
#}
{% block title %}
{% endblock title %}
{% block body %}
{% block record_tabs %}
<ul id="record-links" class="nav nav-tabs">
{%- for tab in tabs|sort(attribute='order') -%}
{%- if tab.visible -%}
<li class="{{ 'active' if tab.key == request.endpoint }} {{ 'disabled' if not tab.enabled }}">
<a href="{{ url_for(tab.key, recid=recid) if tab.enabled else '#' }}">
{{ tab.label }}
</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
<script>
$(function () {
var reloadTab = function(path) {
$('#record_content').load(path);
$('#record-links li.active').removeClass('active');
$('#record-links a[href="'+path+'"]').parent().addClass('active');
};
$('#record-links li.disabled a').on('click', function(event) {
event.preventDefault();
event.stopImmediatePropagation();
return false;
});
$('#record-links li:not(.disabled) a').on('click', function(event) {
var path = $(event.target).attr('href');
event.preventDefault();
event.stopImmediatePropagation();
if (typeof(window.history.pushState) == 'function') {
window.history.pushState({path:path}, document.title, path);
} else {
window.location.hash = '#!' + path;
}
reloadTab(path);
});
var init_href = $('#record-links li.active a').attr('href'),
init_loc = null, last_loc = window.location;
window.onpopstate = function(event) {
if (event.state && event.state.path) {
reloadTab(event.state.path);
} else if (event.target.location == init_loc) {
if (last_loc != init_loc) {
reloadTab(init_href);
}
} else {
init_loc = window.location;
}
last_loc = window.location;
}
});
</script>
{% endblock %}
<div id="record_content">
{% block record_content %}
<!-- record content -->
{% endblock %}
</div>
<div style="clear: both;"></div>
{% endblock %}

Event Timeline