Bug 12150 - Use more javascript string formatting in intranet for translated strings.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / virtualshelves-toolbar.inc
1 <script type="text/javascript">
2 //<![CDATA[
3
4 [% IF ( viewshelf ) %]
5
6     function sendList(){
7         open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
8      }
9
10      $(document).ready(function() {
11         $("#sendlist").click(function(){
12             sendList();
13             return false;
14         });
15         $("#printlist").click(function(){
16             print();
17             return false;
18         });
19         $("#deleteshelf").click(function(e){
20             if(confirmDelete(_("Are you sure you want to delete this list?"))){
21                 return true;
22             } else {
23                 e.preventDefault();
24             }
25         });
26      });
27
28 [% END %]
29
30 //]]>
31 </script>
32
33 <div id="toolbar" class="btn-toolbar">
34     <div class="btn-group"><a id="newshelf" class="btn btn-small" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1"><i class="icon-plus"></i> New list</a></div>
35
36     [% IF ( viewshelf ) %]
37         [% IF ( manageshelf ) %]
38         <div class="btn-group">
39             <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button>
40                 <ul class="dropdown-menu">
41                     <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?shelfnumber=[% shelfnumber %]&amp;op=modif&amp;display=viewshelf">Edit list</a></li>
42                     [% IF ( showprivateshelves ) %]
43                         <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves&amp;shelves=1&amp;DEL-[% shelfnumber %]=1">Delete list</a></li>
44                     [% ELSE %]
45                         <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&amp;DEL-[% shelfnumber %]=1">Delete list</a></li>
46                     [% END %]
47                 </ul>
48         </div>
49         [% END %]
50
51         <div class="btn-group">
52             <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-download"></i> Download list <span class="caret"></span></button>
53                 <ul class="dropdown-menu">
54                     <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&amp;shelfid=[% shelfnumber %]">iso2709</a></li>
55                     <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&amp;shelfid=[% shelfnumber %]">RIS</a></li>
56                     <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&amp;shelfid=[% shelfnumber %]">BibTex</a></li>
57                     [% FOREACH csv_profile IN csv_profiles %]
58                         <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&amp;shelfid=[% shelfnumber %]">CSV - [% csv_profile.profile %]</a></li>
59                     [% END %]
60                 </ul>
61         </div>
62         <div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div>
63         <div class="btn-group"><a class="btn btn-small" id="printlist" href="#"><i class="icon-print"></i> Print list</a></div>
64     [% END %]
65 </div>