Bug 27610: Changed pages of OPAC to have a <h1>
[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
50                         [% UNLESS ( invalidlist ) %]
51
52                             <h1>Download list <em>[% shelf.shelfname | html %]</em></h1>
53                             [% IF ( format ) %]
54                                 <div class="alert alert-info">
55                                     <p>Your download should begin automatically.</p>
56                                 </div>
57                             [% ELSE %]
58                                 <form method="post" action="/cgi-bin/koha/opac-downloadshelf.pl">
59                                     <fieldset>
60                                         <select name="format" id="dlformat" required="required">
61                                             <option value="">-- Choose format --</option>
62                                             <option value="ris">RIS (Zotero, EndNote, others)</option>
63                                             <option value="bibtex">BibTeX</option>
64                                             <option value="isbd">ISBD</option>
65                                             <option value="iso2709">MARC</option>
66                                             [% FOREACH csv_profile IN csv_profiles %]
67                                             <option value="[% csv_profile.export_format_id | html %]">CSV - [% csv_profile.profile | html %]</option>
68                                             [% END %]
69                                         </select>
70                                         <span class="required">Required</span>
71                                     </fieldset>
72
73                                     <fieldset class="action">
74                                         <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
75                                         <input type="submit" name="save" class="btn btn-primary" value="Go" />
76                                         <a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel close" data-dismiss="modal">Cancel</a>
77                                     </fieldset>
78                                 </form>
79                                 [% IF ( modal ) %]
80                                     <script>
81                                         $(document).ready(function(){
82                                             $("#userdownloadshelf form").on("submit",function(e){
83                                                 if( $("#dlformat").val() == "" ){
84                                                     e.preventDefault();
85                                                     alert(_("Please choose a download format"));
86                                                 } else {
87                                                     $("#modalWin").modal("hide");
88                                                 }
89                                             });
90                                         });
91                                     </script>
92                                 [% END %]
93                             [% END # / IF format %]
94
95                         [% ELSE %]
96                             <h1>Download list unsuccessful</h1>
97                             <div class="alert alert-warning">
98                                 <p>You do not have permission to download this list.</p>
99                             </div>
100
101                         [% END # / invalidlist %]
102
103                     </div> <!-- / #userdownloadshelf -->
104
105 [% IF ( fullpage ) %]
106                 </div> <!-- / .col-10 -->
107             </div> <!-- / .row -->
108         </div> <!-- / .container-fluid -->
109     </div> <!-- / .main -->
110     [% INCLUDE 'opac-bottom.inc' %]
111     [% BLOCK jsinclude %]
112         <script>
113             $(document).ready(function(){
114                 $("#userdownloadshelf form").on("submit",function(e){
115                     if( $("#dlformat").val() == "" ){
116                         e.preventDefault();
117                         alert(_("Please choose a download format"));
118                     }
119                 });
120             });
121         </script>
122     [% END %]
123 [% END # / IF fullpage %]