Page MenuHomec4science

webdeposit_run_base.html
No OneTemporary

File Metadata

Created
Fri, Nov 22, 07:02

webdeposit_run_base.html

{#
## This file is part of Invenio.
## Copyright (C) 2013 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" %}
{% macro form_action_bar(margin="") -%}
{% include "webdeposit_run_action_bar.html" %}
{%- endmacro %}
{%- macro form_group_accordion_start(group, idx) -%}
{% include "webdeposit_run_group_start.html" %}
{%- endmacro -%}
{%- macro form_group_accordion_end(group, idx) -%}
{% include "webdeposit_run_group_end.html" %}
{%- endmacro -%}
{%- macro field_label(thisfield) -%}
{% include "webdeposit_run_field_label.html" %}
{%- endmacro -%}
{%- macro field_display(thisfield, field_class="span5", container_class="control-group") -%}
{% include "webdeposit_run_field.html" %}
{%- endmacro -%}
{%- macro field_display_subform(thisfield) -%}
{% include "webdeposit_run_field_subform.html" %}
{%- endmacro -%}
{%- block header %}
{{ super() }}
{%- block webdeposit_assets %}
{% js 'js/jquery-ui.min.js', '20-jquery-ui' %}
{% js 'js/plupload/plupload.full.js', '50-webdeposit' %}
{% js 'js/webdeposit_form.js', '50-webdeposit' %}
{% js 'js/hogan.js', '40-webdeposit-hogan' %}
{% js 'js/webdeposit_templates.js', '50-webdeposit' %}
{% js 'ckeditor/ckeditor.js', '50-ckeditor' %}
{% js 'ckeditor/invenio-ckeditor-config.js', '50-ckeditor' %}
{% css 'img/jquery-ui/themes/base/jquery.ui.theme.css', '20-jquery-ui' %}
{% css 'img/jquery-ui/themes/base/jquery.ui.datepicker.css', '20-jquery-ui' %}
{%- endblock webdeposit_assets %}
{%- endblock header %}
{%- block css %}
<style>
.ui-autocomplete-loading {
background: white url('{{ url_for('static', filename='img/loading.gif') }}') right top no-repeat;
}
span.ui-icon.ui-icon-circle-triangle-w { color: transparent; cursor: pointer; }
span.ui-icon.ui-icon-circle-triangle-e { color: transparent; cursor: pointer; }
.typeahead {
max-height: 250px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
.l{
size: 10px;
}
.required:after {
color: red;
content:" *";
}
.rmlink {
cursor: pointer;
}
.sortlink {
cursor: move;
margin-left: 10px;
}
.empty-element {
display: none;
}
.sortlink:hover {
cursor: move;
}
.remove-element {
padding-left: 10px;
}
.field-list-element {
margin-bottom: 10px;
}
.field-list-element ul.inline {
margin: 0;
}
.tag {
cursor: move;
}
</style>
{%- endblock css %}
{% block body %}
{% block form_submit_dialog %}
<div id="form-submit-dialog" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="{{id}}Label" aria-hidden="true">
<div class="modal-body">
<div align="center">Submitting <img src="/img/loading.gif" /></div>
</div>
</div>
{% endblock form_submit_dialog %}
<div class="row">
<div id="file_container" class="span8 form-feedback-warning">
<div id="flash-message"></div>
<form enctype="multipart/form-data" name="submitForm" id="submitForm" class="form-horizontal" method="post" action="{{ url_for('.run', deposition_type=deposition_type, uuid=uuid) }}">
{% block form_header scoped %}{{ form_action_bar() }}{% endblock form_header%}
{% block form_title scoped %}
<h1>{{ form._title }}</h1>
{% if form._subtitle %}
<p class="muted"><small>{{ form._subtitle|safe }}</small></p>
{% endif %}
{% endblock form_title %}
{% block form_body scoped %}
{% for group, fields in form.get_groups() %}
{% set grouploop = loop %}
{% block form_group scoped %}
{% if grouploop.first %}
<div id="webdeposit_form_accordion" class="accordion">
{% endif %}
{% block form_group_header scoped %}
{% if group %}
{{ form_group_accordion_start(group, grouploop.index) }}
{% endif %}
{% endblock %}
{% block form_group_body scoped %}
{% if group and group.meta.description %}
<p>{{ group.meta.description|urlize }}</p>
{% endif %}
{% block fieldset scoped %}
<fieldset>
{% for field in fields %}
{% block field_body scoped %}
{{ field_display(field) }}
{% endblock field_body %}
{% endfor %}
</fieldset>
{% endblock fieldset %}
{% endblock form_group_body%}
{% block form_group_footer scoped %}
{% if group %}
{{ form_group_accordion_end(group, grouploop.index) }}
{% endif %}
{% endblock form_group_footer %}
{% if grouploop.last %}</div>{% endif %}
{% endblock form_group %}
{% endfor %}
{% endblock form_body %}
{% block form_footer scoped %}{{ form_action_bar() }}{% endblock form_footer %}
</form>
</div>
{% if form._drafting %}
<div class="span4">
{% include "webdeposit_myview.html" %}
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block javascript %}
{{ super() }}
{%- block form_script_options %}
<script type="text/javascript">
var date_options = {dateFormat: 'yy-mm-dd'}
</script>
{%- endblock form_script_options %}
<script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropbox.js" id="dropboxjs" data-app-key="{{config.CFG_DROPBOX_API_KEY}}"></script>
<script type="text/javascript">
$(document).ready(function() {
{# Fix issue with typeahead.js drop-down partly cut-off due to overflow #}
$('#webdeposit_form_accordion').on('hide', function (e) {
$(e.target).css("overflow","hidden");
})
$('#webdeposit_form_accordion').on('shown', function (e) {
$(e.target).css("overflow", "visible");
})
$('#webdeposit_form_accordion .accordion-body.in.collapse').css("overflow", "visible");
});
$(document).ready(function() {
var save_url = '{{ url_for(".save", deposition_type=deposition_type, uuid=uuid, draft_id=draft.id) }}';
var save_all_url = '{{ url_for(".save", deposition_type=deposition_type, uuid=uuid, draft_id=draft.id, all='1') }}';
var complete_url = '{{ url_for(".save", deposition_type=deposition_type, uuid=uuid, draft_id=draft.id, submit='1') }}';
var autocomplete_url = '{{ url_for(".autocomplete", form_type=form.type, field_name="__FIELDNAME__") }}';
webdeposit_init_plupload(
'{{config.CFG_WEBDEPOSIT_MAX_UPLOAD_SIZE|default('10mb')}}',
'.pluploader',
save_url,
'{{ url_for('.upload_file', deposition_type=deposition_type, uuid=uuid) }}',
'{{ url_for('.delete_file', deposition_type=deposition_type, uuid=uuid) }}',
'{{ url_for('.get_file', deposition_type=deposition_type, uuid=uuid) }}',
{{ form.files|safe }},
'{{ url_for('.upload_url', deposition_type=deposition_type, uuid=uuid) }}'
);
webdeposit_init_save(save_all_url, '.form-save', '#submitForm');
webdeposit_init_submit(complete_url, '.form-submit', '#submitForm', '#form-submit-dialog');
webdeposit_init_inputs('#submitForm input, #submitForm textarea, #submitForm select', save_url);
webdeposit_init_buttons('#submitForm .form-button', save_url);
webdeposit_init_autocomplete('[data-autocomplete="1"]', save_url, autocomplete_url);
webdeposit_init_field_lists('#submitForm .dynamic-field-list', save_url, '[data-autocomplete="1"]', autocomplete_url);
webdeposit_init_ckeditor( '#submitForm textarea[data-ckeditor="1"]', save_url);
// Date picker
$(".datepicker").datepicker(date_options);
//webdeposit_check_status('{{ url_for('.status', deposition_type=deposition_type, uuid=uuid, draft_id=draft.id) }}');
});
</script>
{% endblock javascript %}

Event Timeline