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