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.
document: holdings should be grouped by libraries
The layout of the book type no longer shows the holdings structure. The buttons have been aligned on the vertical after the data. * closes rero#1399 Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
- Loading branch information
1 parent
94e396a
commit 0ffb45b
Showing
9 changed files
with
256 additions
and
41 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> {{ _('Login (to see request options)') }} | ||
</a> | ||
{%- 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
83 changes: 83 additions & 0 deletions
83
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,83 @@ | ||
{# -*- 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> | ||
|
||
{%- if collections|length > 0 %} | ||
<dt class="col-lg-2 col-sm-3">{{ _('Call number') }}</dt> | ||
<dd class="col-lg-10 col-sm-9">{{ item | format_record_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 %} |
71 changes: 71 additions & 0 deletions
71
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,71 @@ | ||
{# -*- 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 render above and be clickabke --> | ||
{%- 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> | ||
<!-- TODO: Style the dropdown header --> | ||
<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 %} |
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
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
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
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