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