Bug 13695: Add ISBD export option for the OPAC cart and lists
[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="isbd">ISBD</option>
57                                             <option value="iso2709">MARC</option>
58                                             [% FOREACH csv_profile IN csv_profiles %]
59                                             <option value="[% csv_profile.export_format_id |html %]">CSV - [% csv_profile.profile |html %]</option>
60                                             [% END %]
61                                         </select>
62                                         <span class="required">Required</span>
63                                     </fieldset>
64
65                                     <fieldset class="action">
66                                         <input type="hidden" name="shelfid" value="[% shelfid | html %]" />
67                                         <input type="submit" name="save" class="btn" value="Go" />
68                                         <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfid | html %]" class="cancel close" data-dismiss="modal">Cancel</a>
69                                     </fieldset>
70                                 </form>
71                                 [% IF ( modal ) %]
72                                     <script type="text/javascript">
73                                         //<![CDATA[
74                                             $(document).ready(function(){
75                                                 $("#userdownloadshelf form").on("submit",function(e){
76                                                     if( $("#dlformat").val() == "" ){
77                                                         e.preventDefault();
78                                                         alert(_("Please choose a download format"));
79                                                     } else {
80                                                         $("#modalWin").modal("hide");
81                                                     }
82                                                 });
83                                             });
84                                         //]]>
85                                     </script>
86                                 [% END %]
87                             [% END # / IF format %]
88
89                         [% ELSE %]
90
91                             <div class="alert">
92                                 <p>You do not have permission to download this list.</p>
93                             </div>
94
95                         [% END # / invalidlist %]
96
97                     </div> <!-- / #userdownloadshelf -->
98
99 [% IF ( fullpage ) %]
100                     </div> <!-- / .span10 -->
101                 </div> <!-- / .row-fluid -->
102             </div> <!-- / .container-fluid -->
103         </div> <!-- / .main -->
104     [% INCLUDE 'opac-bottom.inc' %]
105     [% BLOCK jsinclude %]
106         <script type="text/javascript">
107             //<![CDATA[
108                 $(document).ready(function(){
109                     $("#userdownloadshelf form").on("submit",function(e){
110                         if( $("#dlformat").val() == "" ){
111                             e.preventDefault();
112                             alert(_("Please choose a download format"));
113                         }
114                     });
115                 });
116             //]]>
117         </script>
118     [% END %]
119 [% END # / IF fullpage %]