Bug 27742: Page titles have unique info first
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-downloadshelf.tt
1 [% USE Koha %]
2 [% IF ( fullpage ) %]
3     [% INCLUDE 'doc-head-open.inc' %]
4     <title>Download list [% shelf.shelfname | html %] &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>[% INCLUDE 'doc-head-close.inc' %]
5     [% BLOCK cssinclude %][% END %]
6     </head>
7     [% INCLUDE 'bodytag.inc' bodyid='opac-downloadlist' %]
8         [% INCLUDE 'masthead.inc' %]
9         <div class="main">
10             <nav aria-label="breadcrumb">
11                 <ul class="breadcrumb">
12                     <li class="breadcrumb-item">
13                         <a href="/cgi-bin/koha/opac-main.pl">Home</a>
14                     </li>
15                     [% IF ( logged_in_user ) %]
16                         <li class="breadcrumb-item"><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a></li>
17                     [% END %]
18                     <li class="breadcrumb-item">
19                         [% IF shelf.category == 1 %]
20                             <a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1">Your lists</a>
21                         [% ELSE %]
22                             <a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=2">Public lists</a>
23                         [% END %]
24                     </li>
25                     <li class="breadcrumb-item active" aria-current="page">
26                         Download list <em>[% shelf.shelfname | html %]</em>
27                     </li>
28                 </ul>
29             </nav>
30
31             <div class="container-fluid">
32                 <div class="row">
33                     [% IF ( OpacNav||loggedinusername ) %]
34                         <div class="col-lg-2">
35                             <div id="navigation">
36                                 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
37                             </div>
38                         </div>
39                     [% END %]
40
41                     [% IF ( OpacNav||loggedinusername ) %]
42                         <div class="col-10 order-first order-md-first order-lg-2">
43                     [% ELSE %]
44                         <div class="col order-first order-md-first order-lg-2">
45                     [% END %]
46 [% END # / IF fullpage %]
47
48                     <div id="userdownloadshelf" class="maincontent">
49                         [% UNLESS ( invalidlist ) %]
50
51                             [% IF ( format ) %]
52                                 <div class="alert alert-info">
53                                     <p>Your download should begin automatically.</p>
54                                 </div>
55                             [% ELSE %]
56                                 <h1>Download list <em>[% shelf.shelfname | html %]</em></h1>
57                                 <form method="post" action="/cgi-bin/koha/opac-downloadshelf.pl">
58                                     <fieldset>
59                                         <select name="format" id="dlformat" required="required">
60                                             <option value="">-- Choose format --</option>
61                                             <option value="ris">RIS (Zotero, EndNote, others)</option>
62                                             <option value="bibtex">BibTeX</option>
63                                             <option value="isbd">ISBD</option>
64                                             <option value="iso2709">MARC</option>
65                                             [% FOREACH csv_profile IN csv_profiles %]
66                                             <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
67                                             [% END %]
68                                         </select>
69                                         <span class="required">Required</span>
70                                     </fieldset>
71
72                                     <fieldset class="action">
73                                         <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
74                                         <input type="submit" name="save" class="btn btn-primary" value="Go" />
75                                         <a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel close" data-dismiss="modal">Cancel</a>
76                                     </fieldset>
77                                 </form>
78                                 [% IF ( modal ) %]
79                                     <script>
80                                         $(document).ready(function(){
81                                             $("#userdownloadshelf form").on("submit",function(e){
82                                                 if( $("#dlformat").val() == "" ){
83                                                     e.preventDefault();
84                                                     alert(_("Please choose a download format"));
85                                                 } else {
86                                                     $("#modalWin").modal("hide");
87                                                 }
88                                             });
89                                         });
90                                     </script>
91                                 [% END %]
92                             [% END # / IF format %]
93
94                         [% ELSE %]
95
96                             <div class="alert alert-warning">
97                                 <p>You do not have permission to download this list.</p>
98                             </div>
99
100                         [% END # / invalidlist %]
101
102                     </div> <!-- / #userdownloadshelf -->
103
104 [% IF ( fullpage ) %]
105                 </div> <!-- / .col-10 -->
106             </div> <!-- / .row -->
107         </div> <!-- / .container-fluid -->
108     </div> <!-- / .main -->
109     [% INCLUDE 'opac-bottom.inc' %]
110     [% BLOCK jsinclude %]
111         <script>
112             $(document).ready(function(){
113                 $("#userdownloadshelf form").on("submit",function(e){
114                     if( $("#dlformat").val() == "" ){
115                         e.preventDefault();
116                         alert(_("Please choose a download format"));
117                     }
118                 });
119             });
120         </script>
121     [% END %]
122 [% END # / IF fullpage %]