Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,85 +5,29 @@
under the terms of the MIT License; see LICENSE file for more details.
#}

{% extends admin_base_template %}

{% from "invenio_requests/macros/request_header.html" import inclusion_request_header %}

{% set title = invenio_request.title %}
{% set base_template = admin_base_template %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thought for reusing templates - just a little warning, you might be in trouble though to provide all the context needed for the parent template to work, especially when making changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion, to be tested if it wasn't done yet: all the request views

{% extends "invenio_requests/details/index.html" %}

{# remove duplicated page title #}
{% block page_title %}{% endblock page_title %}

{% block admin_page_content %}
{% set title = _("Request ") %}
{{ super() }}
{%- block request_body %}
<div class="ui container request-detail-page">
{%- block request_header %}
{% set back_button_url = url_for("administration.requests") %}
{{
inclusion_request_header(
back_button_url=back_button_url,
back_button_text=_("Back to requests"),
request=invenio_request,
accepted=request_is_accepted
)
}}

<div class="twelve wide column mt-10">
<p><strong>{{ _("Reason:") }}</strong> {{ invenio_request["payload"]["reason_label"] }}</p>
<p><strong>{{ _("Justification:") }}</strong> {{ invenio_request["payload"]["comment"] }}</p>
</div>

<div class="ui divider"></div>
{%- endblock request_header %}

{%- block request_timeline %}
<div id="request-detail"
data-record='{{ invenio_request | tojson }}'
data-default-query-config='{{ dict(size=config["REQUESTS_TIMELINE_PAGE_SIZE"]) | tojson }}'
data-user-avatar='{{ user_avatar | tojson }}'
data-permissions='{{ permissions | tojson }}'
data-config='{{ dict(allowGroupReviewers=config["USERS_RESOURCES_GROUPS_ENABLED"], enableReviewers=config["REQUESTS_REVIEWERS_ENABLED"], maxReviewers=config["REQUESTS_REVIEWERS_MAX_NUMBER"]) | tojson }}'
>{# react app root #}
<div class="ui grid">
<div class="stretched row">
<div class="thirteen wide column">
<div class="ui">
<div class="ui fluid placeholder">
<div class="image header">
<div class="line"></div>
<div class="line"></div>
</div>
<div class="paragraph">
{% for i in range(6) %}
<div class="line"></div>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="three wide column">
{% for i in range(6) %}
<div class="ui fluid placeholder">
<div class="image header">
<div class="line"></div>
<div class="line"></div>
</div>
</div>
<div class="ui divider"></div>
{% endfor %}
</div>
</div>
</div>
</div>
{%- endblock request_timeline %}
{% from "invenio_requests/macros/request_header.html" import inclusion_request_header %}

{%- block request_header %}
{% set back_button_url = url_for("administration.requests") %}
{{
inclusion_request_header(
back_button_url=back_button_url,
back_button_text=_("Back to requests"),
request=invenio_request,
accepted=request_is_accepted
)
}}

<div class="twelve wide column mt-10">
<p><strong>{{ _("Reason:") }}</strong> {{ invenio_request["payload"]["reason_label"] }}</p>
<p><strong>{{ _("Justification:") }}</strong> {{ invenio_request["payload"]["comment"] }}</p>
</div>
{% endblock request_body %}
{% endblock admin_page_content %}

{% block javascript %}
{{ super() }}
{% include config.THEME_JAVASCRIPT_TEMPLATE %}
{{ webpack['invenio-requests-base.js'] }}
{% endblock %}
<div class="ui divider"></div>
{%- endblock request_header %}
Loading