forked from rero/rero-ils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documents: group holdings by libraries
The layout of the book type no longer shows the holdings structure. The buttons have been aligned vertically below the data. * Fixes parent $ref title on local fields schema. * Closes rero#1399. Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
- Loading branch information
1 parent
5a331a7
commit 8ef9251
Showing
12 changed files
with
311 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
rero_ils/modules/documents/templates/rero_ils/_anonymous_button.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
RERO ILS | ||
Copyright (C) 2020 RERO | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
|
||
This program 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 Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#} | ||
{%- if current_user.is_anonymous %} | ||
<a | ||
class="btn btn-primary btn-sm" | ||
href="{{ url_for_security('login') + " | ||
?next=" + request.path }}" | ||
> | ||
<i class="fa fa-sign-in"></i> {{ _('Log in (to see request options)') }} | ||
</a> | ||
{%- endif %} |
60 changes: 60 additions & 0 deletions
60
rero_ils/modules/documents/templates/rero_ils/_document_online.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
RERO ILS | ||
Copyright (C) 2019 RERO | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
|
||
This program 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 Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#} | ||
{% if accesses|length > 0 %} | ||
<div class="card mb-2"> | ||
<!-- Card header --> | ||
<div id="online_access" class="card-header p-2"> | ||
<div class="row"> | ||
<div class="col-1"> | ||
<a class="collapse-link" data-toggle="collapse" href="#collapse-access" aria-expanded="false"> | ||
<i class="fa fa-caret-down fa-lg"></i> | ||
</a> | ||
</div> | ||
<div class="col-10"> | ||
{{ _("Online") }} | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Card body --> | ||
<div id="collapse-access" class="collapse show" role="tabpanel"> | ||
<div class="card-body p-2"> | ||
{% for access in accesses %} | ||
<div class="row my-2"> | ||
<div class="col-12"> | ||
<div class="row"> | ||
<div class="col-sm-1"> | ||
| ||
</div> | ||
<div class="col-sm-2"> | ||
{{ access.type }} | ||
</div> | ||
<div class="col-sm-9"> | ||
<a class="rero-ils-external-link" href={{ access.url }}>{{ access.content }}</a> | ||
{% if access.public_note %} | ||
({{ access.public_note }}) | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
rero_ils/modules/documents/templates/rero_ils/_documents_get_book.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
RERO ILS | ||
Copyright (C) 2020 RERO | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
|
||
This program 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 Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#} | ||
<!-- Holdings --> | ||
{%- if holdings %} | ||
|
||
<!-- User login --> | ||
{% include 'rero_ils/_anonymous_button.html' %} | ||
|
||
<div class="container"> | ||
{%- for holding in holdings %} | ||
{% set items = holding.get_items | sort(attribute='enumerationAndChronology', reverse=True) %} | ||
{%- for item in items %} | ||
<div id="{{ item.barcode }}-detail" class="row item-row mt-2"> | ||
<dt class="col-lg-2 col-sm-3">{{ _('Location') }}</dt> | ||
<dd class="col-lg-10 col-sm-9"> | ||
{{ holding|holding_location }} | ||
</dd> | ||
|
||
{%- set call_number = item | format_record_call_number -%} | ||
{%- if call_number %} | ||
<dt class="col-lg-2 col-sm-3">{{ _('Call number') }}</dt> | ||
<dd class="col-lg-10 col-sm-9">{{ call_number }}</dd> | ||
{%- endif %} | ||
|
||
{%- if item.get('enumerationAndChronology') %} | ||
<dt class="col-lg-2 col-sm-3">{{ _('Unit') }}</dt> | ||
<dd class="col-lg-10 col-sm-9"> | ||
{{ item.get('enumerationAndChronology') }} | ||
</dd> | ||
{%- endif %} | ||
|
||
<dt class="col-lg-2 col-sm-3">{{ _('Barcode') }}</dt> | ||
<dd class="col-lg-10 col-sm-9">{{ item.barcode }}</dd> | ||
|
||
{%- set public_notes = item|get_public_notes %} | ||
{%- for note in public_notes %} | ||
<dt class="col-lg-2 col-sm-3">{{ _(note.get('type')) }}</dt> | ||
<dd class="col-lg-10 col-sm-9">{{ note.get('content') | nl2br | safe }}</dd> | ||
{%- endfor %} | ||
{%- set collections = item.pid|in_collection %} | ||
{%- if collections|length > 0 %} | ||
<dt class="col-lg-2 col-sm-3">{{ _('Temporary location') }}</dt> | ||
<dd class="col-lg-10 col-sm-9"> | ||
{%- for collection in collections %} | ||
{%- if collection.published %} | ||
<a | ||
href="{{ url_for('invenio_records_ui.coll', viewcode=viewcode, pid_value=collection.pid) }}" | ||
> | ||
{{ collection.title }}{{ '' if loop.last else '; ' }} | ||
</a> | ||
{%- endif %} | ||
{%- endfor %} | ||
</dd> | ||
{%- endif %} | ||
|
||
<dt class="col-lg-2 col-sm-3">{{ _('Status') }}</dt> | ||
<dd class="col-lg-10 col-sm-9"> | ||
<i | ||
class="fa fa-circle text-{{ 'success' if item.available else 'danger' }}" | ||
></i> | ||
{{ item|item_availability_text }} | ||
</dd> | ||
|
||
{% include('rero_ils/_request_button.html') %} | ||
</div> | ||
{%- endfor %} | ||
{%- endfor %} | ||
</div> | ||
{%- endif %} |
70 changes: 70 additions & 0 deletions
70
rero_ils/modules/documents/templates/rero_ils/_request_button.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
RERO ILS | ||
Copyright (C) 2020 RERO | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
|
||
This program 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 Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
#} | ||
<!-- action button : Should be at the end to be rendered above and be clickable --> | ||
{%- if item|item_and_patron_in_same_organisation %} | ||
{%- set can_request, reasons = item|can_request %} | ||
{%- set locations = item|item_library_pickup_locations %} | ||
{%- if can_request and locations %} | ||
<dd class="{% if class %}{{ class }} {% endif %}col-lg-12 col-sm-12 mt-2"> | ||
<a | ||
href="#" | ||
type="button" | ||
class="btn btn-primary btn-mini" | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false" | ||
id="{{ item.barcode }}-dropdownMenu" | ||
> | ||
{{ _('Request') }} | ||
<i class="fa fa-caret-down fa-fw"></i> | ||
</a> | ||
<div | ||
class="dropdown-menu dropdown-menu-left" | ||
aria-labelledby="dropdownMenu" | ||
> | ||
<h6 class="dropdown-header">{{ _('Select a Pickup Location') }}</h6> | ||
<div class="dropdown-divider"></div> | ||
{% for location in locations %} | ||
<a | ||
class="dropdown-item" | ||
id="{{ location.code }}" | ||
href="{{ url_for('item.patron_request', viewcode=viewcode, item_pid=item.pid, pickup_location_pid=location.pid)}}" | ||
> | ||
{{ location.pickup_name }} | ||
</a> | ||
{% endfor %} | ||
</div> | ||
</dd> | ||
{%- elif reasons %} | ||
<dd class="col-lg-12 col-sm-12 mt-2"> | ||
<span | ||
class="d-inline-block" | ||
tabindex="0" | ||
data-toggle="tooltip" | ||
data-html="true" | ||
title="{{ reasons | join('<br/>') }}" | ||
> | ||
<button type="submit" class="btn btn-primary btn-mini" disabled> | ||
{{ _('Request') }} | ||
<i class="fa fa-caret-down fa-fw"></i> | ||
</button> | ||
</span> | ||
</dd> | ||
{%- endif %} | ||
{%- endif %} |
Oops, something went wrong.