Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
Owen Leonard 869dc05acc
Bug 34849: Use template wrapper for breadcrumbs: OPAC part 1
This patch updates several OPAC templates so that they
use a new WRAPPER for displaying breadcrumbs.

The patch contains a minor CSS update, so you will have to rebuild the
OPAC CSS for testings.

Apply the patch and log in to the OPAC. Test each of the following pages
and their variations. Breadcrumbs should look correct, and each link
should be correct:

- User summary
- Charges
- Personal details
  - Submit changes
- Consents (with PrivacyPolicyConsent enabled)
- Tags
- Change password
  - Submit password change
- Search history
  - Test when logged in and when not logged in
- Checkout history
- Privacy
- Holds history
- Recalls history
- Messaging (with  EnhancedMessagingPreferences
  and EnhancedMessagingPreferencesOPAC enabled).
- Lists
  - View private list
  - View public list
  - Edit list
  - Share list
    - Submit invitation
  - Create list
  - View list contents
- Routing lists (with RoutingSerials enabled)
- Ask for a discharge (with useDischarge enabled)
- ILL requests
- Curbside pickups
- Error page: Navigate to a non-existent page

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-18 10:25:58 -03:00

209 lines
14 KiB
Text

[% USE raw %]
[% USE Koha %]
[% USE AdditionalContents %]
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Your privacy management &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-privacy' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Your privacy management</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
<div class="container-fluid">
<div class="row">
<div class="col col-lg-2 order-2 order-lg-1">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="col-md-12 col-lg-10 order-1">
<div id="userprivacy" class="maincontent">
<h1>Your privacy management</h1>
[% IF delete_all_requested || delete_checkouts_requested || delete_holds_requested %]
[% IF delete_all_requested || delete_checkouts_requested %]
[% IF deleted_checkouts %]
<div class="alert alert-success">Your checkout history has been deleted.</div>
[% ELSIF error_deleting_checkouts_history %]
<div class="alert alert-warning">The deletion of your checkout history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your library of this error</div>
[% ELSIF no_checkouts_to_delete %]
<div class="alert alert-warning">No checkout history to delete</div>
[% END %]
[% END %]
[% IF delete_all_requested || delete_holds_requested %]
[% IF deleted_holds %]
<div class="alert alert-success">Your hold history has been deleted.</div>
[% ELSIF error_deleting_holds_history %]
<div class="alert alert-warning">The deletion of your hold history failed. Please help to fix the system by informing your library of this error</div>
[% ELSIF no_holds_to_delete %]
<div class="alert alert-warning">No hold history to delete</div>
[% END %]
[% END %]
[% END %]
[% IF ( privacy_updated ) %]
<div class="alert alert-success">Your privacy rules have been updated.</div>
[% END %]
[% IF ( Ask_data ) %]
<p>We take great care in protecting your privacy. On this screen, you can define how long we keep your checkout and hold history.</p>
<p>Your options are: <p>
<ul id="opac-privacy-options-list">
<li class="privacy0">Forever: keep my history without limit. This is the option for users who want to keep track of what they are reading or placed a hold on.</li>
<li class="privacy1">Default: keep my history according to local laws. This is the default option : the library will keep your history for the duration permitted by local laws.</li>
<li class="privacy2">Never: Delete my history immediately. This will delete all record of the item that was checked-out upon check-in, and hold history upon fulfillment or cancellation.</li>
</ul>
<p id="note1">Please note that information on any book still checked-out must be kept by the library no matter which privacy option you choose.</p>
<p id="note2">Please also note that the library staff can't update these values for you: it's your privacy!</p>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
<legend class="sr-only">Privacy rule</legend>
<input type="hidden" name="op" value="update_privacy" />
<fieldset>
<label for="privacy">Please choose your privacy rule:</label>
<div class="form-group row">
<div class="col-6">
<select class="form-control" name="privacy" id="privacy">
[% IF ( privacy0 ) %]
<option value="0" selected="selected" class="privacy0">Forever</option>
[% ELSE %]
<option value="0" class="privacy0">Forever</option>
[% END %]
[% IF ( privacy1 ) %]
<option value="1" selected="selected" class="privacy1">Default</option>
[% ELSE %]
<option value="1" class="privacy1">Default</option>
[% END %]
[% IF ( privacy2 ) %]
<option value="2" selected="selected" class="privacy2">Never</option>
[% ELSE %]
<option value="2" class="privacy2">Never</option>
[% END %]
</select>
</div> <!-- /.col-6 -->
</div> <!-- /.form-group.row -->
[% IF has_guarantor_flag && (Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
[% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
<div class="form-group row">
<div class="col-6">
<label for="privacy_guarantor_checkouts">Allow your guarantor to view your current checkouts?</label>
<select class="form-control" name="privacy_guarantor_checkouts">
[% IF borrower.privacy_guarantor_checkouts %]
<option value="0">No</option>
<option value="1" selected>Yes</option>
[% ELSE %]
<option value="0" selected>No</option>
<option value="1">Yes</option>
[% END %]
</select>
</div> <!-- /.col-6 -->
</div> <!-- /.form-group.row -->
[% END # /IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %]
[% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %]
<div class="form-group row">
<div class="col-6">
<label for="privacy_guarantor_fines">Allow your guarantor to view your current charges?</label>
<select class="form-control" name="privacy_guarantor_fines">
[% IF borrower.privacy_guarantor_fines %]
<option value="0">No</option>
<option value="1" selected>Yes</option>
[% ELSE %]
<option value="0" selected>No</option>
<option value="1">Yes</option>
[% END %]
</select>
</div> <!-- /.col-6 -->
</div> <!-- /.form-group.row -->
[% END %]
<span class="hint">
Guaranteed by
[% FOREACH gr IN borrower.guarantor_relationships %]
[% SET g = gr.guarantor %]
[% g.firstname | html %] [% g.surname | html %]
[%- IF ! loop.last %], [% END %]
[% END %]
</span>
[% END # /IF has_guarantor_flag.. %]
<fieldset class="action">
<button type="Submit" class="btn btn-primary">Save</button>
</fieldset>
</fieldset>
</form> <!-- /#opac-privacy-update-form -->
<hr />
<h2>Immediate deletion</h2>
<p>You can delete all your checkout and hold history immediately by clicking here. <strong>BE CAREFUL</strong>. Once you've confirmed the deletion, no one can retrieve the list!</p>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-checkouts">
<input type="hidden" name="op" value="delete_record" />
<input type="hidden" name="checkouts" value="1" />
</form>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-holds">
<input type="hidden" name="op" value="delete_record" />
<input type="hidden" name="holds" value="1" />
</form>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-all">
<input type="hidden" name="op" value="delete_record" />
<input type="hidden" name="all" value="1" />
</form>
<table class="table table-bordered table-condensed table-striped">
<tr>
<td colspan=7>Immediately delete my checkout history. This action cannot be undone.</td>
<td colspan=1>
<fieldset class="action">
<input type="submit" value="Delete checkout history" form="opac-privacy-delete-checkouts" class="btn btn-danger btn-block privacy-confirm-delete" />
</fieldset>
</td>
</tr>
<tr>
<td colspan=7>Immediately delete my hold history. This action cannot be undone.</td>
<td colspan=1>
<fieldset class="action">
<input type="submit" value="Delete hold history" form="opac-privacy-delete-holds" class="btn btn-danger btn-block privacy-confirm-delete" />
</fieldset>
</td>
</tr>
<tr>
<td colspan=7>Immediately delete my checkout history & my hold history. This action cannot be undone.</td>
<td colspan=1>
<fieldset class="action">
<input type="submit" value="Delete checkout and hold history" form="opac-privacy-delete-all" class="btn btn-danger btn-block privacy-confirm-delete" />
</fieldset>
</td>
</tr>
</table>
[% IF Koha.Preference('StoreLastBorrower') %]
<p id="store-last-borrower-msg">Please note, the last person to return an item is tracked for the management of items returned damaged.</p>
[% END %]
[% END # / IF Ask_data %]
</div> <!-- / .userprivacy -->
</div> <!-- / .col-lg-10 -->
</div> <!-- / .row -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% Asset.js('js/privacy.js') | $raw %]
[% END %]