Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65484211
hp_approval_widget.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jun 4, 03:01
Size
6 KB
Mime Type
text/html
Expires
Thu, Jun 6, 03:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18080009
Attached To
R3600 invenio-infoscience
hp_approval_widget.html
View Options
{% extends "workflows/hp_layout.html" %}
{% import 'workflows/hp_utils.html' as utils %}
{%- block header %}
{{ super() }}
{%- block widget_assets %}
{% js url_for('static', filename='js/prism.js'), '40-workflows' %}
{% css url_for('static', filename='css/prism.css') %}
{% js url_for('holdingpen.static', filename='js/workflows/hp_details.js'), '50-workflows' %}
{% js url_for('holdingpen.static', filename='js/workflows/widgets/approval.js'), '50-workflows' %}
{% js url_for('holdingpen.static', filename='js/workflows/hp_datapreview.js'), '50-workflows' %}
{%- endblock widget_assets %}
{%- endblock header %}
{% block hpbody %}
<div
class
"
row-fluid
"
>
<div
class=
"span3"
><a
href=
"{{url_for('holdingpen.maintable')}}"
><i
class=
"icon-hand-left"
></i>
Back to Main Table
</a></div>
<div
class=
"span7"
><h1>
Approval Widget
</h1></div>
</div>
<div
class=
"container-fluid"
>
<div
id=
"goodbye-msg"
class=
"span12 text-center"
>
</div>
{% for i in range(obj_number) %}
{% set bwobject = bwobject_list[i] %}
{% set bwparent = bwparent_list[i] %}
{% set data_preview = data_preview_list[i] %}
{% set workflow = w_metadata_list[i] %}
{% set workflow_func = workflow_func_list[i] %}
{% set info = info_list[i] %}
{% set log = logtext_list[i] %}
<div
id=
"row_fluid{{i}}"
class=
"row-fluid"
>
<div
class=
"span9"
>
<div
class=
"btn-group"
name=
"object_preview_btn"
data-toggle=
"buttons-radio"
>
<button
class=
"btn btn-mini btn-primary active"
name=
"hd"
onclick=
"setDataPreview('hd')"
>
HTML
</button>
<button
class=
"btn btn-mini btn-primary"
name=
"marcxml"
onclick=
"setDataPreview('xm')"
>
MARCXML
</button>
<button
class=
"btn btn-mini btn-primary"
name=
"xm"
onclick=
"setDataPreview('tm')"
>
MARC
</button>
</div>
<div
class=
"btn-group pull"
name=
"data_version"
data-toggle=
"buttons-radio"
>
<button
class=
"btn btn-mini active"
name=
"initial"
onclick=
"setbwoid({{bwparent.id}})"
>
Initial
</button>
{% if bwobject.version == 1 %}
<button
class=
"btn btn-mini"
name=
"error"
onclick=
"setbwoid({{bwobject.id}})"
>
Error
</button>
{% else %}
<button
class=
"btn btn-mini disabled"
name=
"error"
>
Error
</button>
{% endif %}
{% if bwobject.version == 2 %}
<button
class=
"btn btn-mini"
name=
"final"
onclick=
"setbwoid({{bwobject.id}})"
>
Final
</button>
{% else %}
<button
class=
"btn btn-mini disabled"
name=
"final"
>
Final
</button>
{% endif %}
</div>
<div
id=
"object_preview_container{{bwobject.id}}"
class=
"object_preview_container"
>
{{ data_preview|safe }}
</div>
</div>
<div
class=
"span3"
>
<div
class=
"details_link"
>
<a
href=
"/admin/holdingpen/details?bwobject_id={{bwobject.id}}"
><button
class=
"btn btn-primary"
type=
"button"
><i
class=
"icon-eye-open icon-white"
></i>
Record Details
</button></a>
</div>
<div
class=
"well"
>
<div
class=
"muted"
><b>
Workflow Definition:
</b></div>
<b>
{{workflow.name}}
</b>
{{ utils.function_display(workflow_func, bwobject.get_extra_data()['last_task_name'], bwobject.version) }}
</div>
<div
class=
"well"
>
<div
class=
"muted"
><b>
Error Message:
</b></div>
{% if bwobject.get_extra_data()['error_msg'] != "" %}
{{ info['last task name'] }} {{ bwobject.get_extra_data()['error_msg'] }}
<div
class=
"text-right"
>
<h6
id=
"show-more"
class=
"text-right"
><a
href=
"#moreinfoModal"
role=
"button"
data-toggle=
"modal"
class=
"float-right"
>
Show More
</a>
</h6>
</div>
{% else %}
There were no errors.
{% endif %}
<div
id=
"moreinfoModal"
class=
"modal hide fade"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h3
id=
"myModalLabel"
>
Error Log
</h3>
</div>
<div
class=
"modal-body"
>
{% for logobj in logtext_list %}
{{logobj}}
{% endfor %}
</div>
<div
class=
"modal-footer"
>
<button
class=
"btn"
data-dismiss=
"modal"
aria-hidden=
"true"
>
Close
</button>
</div>
</div>
</div>
<div
class=
"well"
>
<div
class=
"muted"
><b>
Record Metadata:
</b></div></br>
<table
class=
"table table-striped"
>
<tbody>
{% for key, value in info.iteritems() %}
<b>
{{ key }}
</b>
= {{ value }}
<hr>
{% endfor %}
{% if bwobject.version == 1 %}
<span
class=
"badge badge-success"
>
Final
</span>
{% elif bwobject.version == 2 %}
<span
class=
"badge badge-warning"
>
Halted
</span>
{% else %}
<span
class=
"badge badge-info"
>
Initial
</span>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
<div
id=
"decision-btns{{i}}"
class=
"row-fluid decision-btns"
>
<form
id=
"form{{i}}"
class=
"theform"
method=
"POST"
name=
"{{ url_for('holdingpen.resolve_widget', bwobject_id=bwobject.id, widget='approval_widget') }}"
>
{% for field in widget %}
{{ field }}
{% endfor %}
</form>
</div>
<hr
id=
"hr{{i}}"
>
{% endfor %}
</div>
{% endblock %}
Event Timeline
Log In to Comment