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