Line 0
Link Here
|
|
|
1 |
[% USE Koha %] |
2 |
[% USE Branches %] |
3 |
[% USE AuthorisedValues %] |
4 |
[% USE AdditionalContents %] |
5 |
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] |
6 |
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
8 |
<title>Your alert subscriptions › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% BLOCK cssinclude %][% END %] |
11 |
</head> |
12 |
[% INCLUDE 'bodytag.inc' bodyid='opac-alert-subscriptions' %] |
13 |
[% INCLUDE 'masthead.inc' %] |
14 |
|
15 |
<div class="main"> |
16 |
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs"> |
17 |
<ol class="breadcrumb"> |
18 |
<li class="breadcrumb-item"> |
19 |
<a href="/cgi-bin/koha/opac-main.pl">Home</a> |
20 |
</li> |
21 |
<li class="breadcrumb-item"> |
22 |
<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> |
23 |
</li> |
24 |
<li class="breadcrumb-item active"> |
25 |
<a href="#" aria-current="page">Your alert subscriptions</a> |
26 |
</li> |
27 |
</ol> |
28 |
</nav> <!-- /#breadcrumbs --> |
29 |
|
30 |
<div class="container-fluid"> |
31 |
<div class="row"> |
32 |
<div class="col col-lg-2 order-2 order-lg-1"> |
33 |
<div id="navigation"> |
34 |
[% INCLUDE 'navigation.inc' IsPatronPage=1 %] |
35 |
</div> |
36 |
</div> |
37 |
<div class="col-md-12 col-lg-10 order-1"> |
38 |
|
39 |
<div id="alert-subscriptions" class="maincontent"> |
40 |
<h1>Alert subscriptions</h1> |
41 |
|
42 |
[% IF patron.alert_subscriptions.count %] |
43 |
<table id="subscriptions" class="table table-bordered table-striped"> |
44 |
<thead> |
45 |
<tr> |
46 |
<th>ISSN</th> |
47 |
<th>Title</th> |
48 |
<th>Library</th> |
49 |
<th>Location</th> |
50 |
<th>Call number</th> |
51 |
<th>Actions</th> |
52 |
</tr> |
53 |
</thead> |
54 |
<tbody> |
55 |
[% FOREACH sub IN patron.alert_subscriptions %] |
56 |
<tr> |
57 |
<td> |
58 |
[% IF sub.biblio.biblioitem.issn %][% sub.biblio.biblioitem.issn | html %][% END %] |
59 |
</td> |
60 |
<td> |
61 |
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% sub.biblionumber | uri %]">[% sub.biblio.title | html %] [% sub.biblio.subtitle | html %]</a> |
62 |
</td> |
63 |
<td> |
64 |
[% IF ( sub.branchcode ) %][% Branches.GetName( sub.branchcode ) | html %][% END %] |
65 |
</td> |
66 |
<td> |
67 |
[% IF ( sub.location ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => sub.location ) | html %][% END %] |
68 |
</td> |
69 |
<td> |
70 |
[% IF ( sub.callnumber ) %][% sub.callnumber | html %][% END %] |
71 |
</td> |
72 |
<td class="actions"> |
73 |
<form action="/cgi-bin/koha/opac-alert-subscribe.pl" method="post" class="unsubscribe" data-title="[% sub.biblio.title | html %] [% sub.biblio.subtitle | html %]" data-patron="[% INCLUDE 'patron-title.inc' no_html=1 patron=logged_in_user%]"> |
74 |
<input type="hidden" name="subscriptionid" value="[% sub.subscriptionid | html %]"> |
75 |
<input type="hidden" name="referer" value="[% referer | html %]"> |
76 |
<input type="hidden" name="biblionumber" value="[% sub.biblionumber | html %]"> |
77 |
<input type="hidden" name="op" value="cancel_confirmed"> |
78 |
<button type="submit" class="btn btn-link btn-sm" name="submit"><i class="fa fa-times" aria-hidden="true"></i> Unsubscribe from email alerts</button> |
79 |
</form> |
80 |
</td> |
81 |
</tr> |
82 |
[% END %] |
83 |
</tbody> |
84 |
</table> |
85 |
[% ELSE %] |
86 |
<div class="dialog message"> |
87 |
<p>You have not subscribed to email alerts for any subscriptions.</p> |
88 |
</div> |
89 |
[% END %] |
90 |
</div> <!-- /#alert-subscriptions --> |
91 |
|
92 |
</div> <!-- / .col-lg-10 --> |
93 |
</div> <!-- / .row --> |
94 |
</div> <!-- / .container-fluid --> |
95 |
</div> <!-- / .main --> |
96 |
|
97 |
[% INCLUDE 'opac-bottom.inc' %] |
98 |
[% BLOCK jsinclude %] |
99 |
[% INCLUDE 'datatables.inc' %] |
100 |
<script> |
101 |
$(document).ready(function(){ |
102 |
$("#subscriptions").dataTable($.extend(true, {}, dataTablesDefaults, { |
103 |
})); |
104 |
$(".unsubscribe").submit(function(){ |
105 |
var patron = $(this).data('patron'); |
106 |
var title = $(this).data('title'); |
107 |
return confirmDelete(__("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); |
108 |
}); |
109 |
}); |
110 |
</script> |
111 |
[% END %] |