Bug 19946: (follow-up) Add fixed footer to authorities Z39.50 popup
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_search.tt
index 20b1f82..ee05d96 100644 (file)
@@ -2,35 +2,21 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Z39.50/SRU search results</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
 <style type="text/css">
-.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
-.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
-.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
-tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }
 #dataPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
 </style>
-      [% IF ( opsearch ) %]
-   <style type="text/css">
-          #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
-   </style>
 </head>
 
-<body id="cat_z3950_search" class="cat">
+    <body id="cat_z3950_search" class="cat">
+    <div class="container-fluid">
 
-<div id="custom-doc" class="yui-t7">
-[% ELSE %]
-</head>
-<body id="cat_z3950_search" class="cat" style="padding:.5em;">
-<div>
-[% END %]
-      <div id="bd">
          [% IF ( opsearch ) %]
 <h2>Z39.50/SRU search</h2>
     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
+        <div class="row">
+            <div class="col-xs-6">
     <input type="hidden" name="op" id="op" value="do_search" />
-       <div class="yui-g">
-    <div class="yui-u first">
            <fieldset class="rows"> 
         <ol>
         <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
@@ -48,7 +34,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
     <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
     <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
     </div>
-    <div class="yui-g">
+    <div class="col-xs-6">
       <h2>Search targets</h2>
       <div id="z3950_search_targets">
         <span class="z3950checks"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span>
@@ -63,25 +49,32 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 
         </p>
     [% END %]
-      </div>
+            </div>
+        </div>
     </div>
-    <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
+    <nav class="navbar navbar-default navbar-fixed-bottom">
+        <div class="container-fluid">
+            <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
+        </div>
+    </nav>
     </form>
 
 
 [% ELSE %]
+    <div class="row">
+        <div class="col-xs-12">
     <h2>Results</h2>
     <p>You searched for:
-        [% IF ( title ) %]<em>Title: </em><span class=term>[% title | html %]</span> [% END %]
-        [% IF ( author ) %]<em>Author: </em><span class=term>[% author | html %]</span> [% END %]
-        [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn | html %]</span> [% END %]
-        [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn | html %]</span> [% END %]
-        [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall | html %]</span> [% END %]
-        [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject | html %]</span> [% END %]
-        [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber | html %]</span> [% END %]
-        [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey | html %]</span> [%END %]
-        [% IF ( srchany ) %]<em>Raw (any): </em><span class=term>[% srchany | html %]</span> [% END %]
-        [% IF ( stdid ) %]<em>Standard ID: </em><span class=term>[% stdid | html %]</span> [% END %]
+        [% IF ( title ) %]<em>Title: </em><span class="term">[% title | html %]</span> [% END %]
+        [% IF ( author ) %]<em>Author: </em><span class="term">[% author | html %]</span> [% END %]
+        [% IF ( isbn ) %]<em>ISBN: </em><span class="term">[% isbn | html %]</span> [% END %]
+        [% IF ( issn ) %]<em>ISSN: </em><span class="term">[% issn | html %]</span> [% END %]
+        [% IF ( lccall ) %]<em>LC call number: </em><span class="term">[% lccall | html %]</span> [% END %]
+        [% IF ( subject ) %]<em>Subject heading: </em><span class="term">[% subject | html %]</span> [% END %]
+        [% IF ( controlnumber ) %]<em>Control no: </em><span class="term">[% controlnumber | html %]</span> [% END %]
+        [% IF ( dewey ) %]<em>Dewey: </em><span class="term">[% dewey | html %]</span> [%END %]
+        [% IF ( srchany ) %]<em>Raw (any): </em><span class="term">[% srchany | html %]</span> [% END %]
+        [% IF ( stdid ) %]<em>Standard ID: </em><span class="term">[% stdid | html %]</span> [% END %]
     </p>
     [% IF ( errconn ) %]
             <div class="dialog alert">
@@ -107,24 +100,32 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
         <th>Edition</th>
         <th>ISBN</th>
         <th>LCCN</th>
-        <th>MARC</th>
-        <th>Card</th>
-               <th>&nbsp;</th>
+        <th>Actions</th>
     </tr></thead>
     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
         [% IF ( breeding_loo.breedingid ) %]
 
            <tr id="row[% breeding_loo.breedingid %]">
-            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
+            <td>[% breeding_loo.server %]</td>
             <td>[% breeding_loo.title |html %]</td>
             <td>[% breeding_loo.author %]</td>
             <td>[% breeding_loo.date %]</td>
             <td>[% breeding_loo.edition %]</td>
             <td>[% breeding_loo.isbn %]</td>
             <td>[% breeding_loo.lccn %]</td>
-            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
-            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
-            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a></td>
+
+            <td>
+                <div class="dropdown">
+                    <a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid %]" role="button" data-toggle="dropdown" href="#">
+                      Actions <b class="caret"></b>
+                    </a>
+                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid %]">
+                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li>
+                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li>
+                        <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]"><i class="fa fa-download"></i> Import</a></li>
+                    </ul>
+                </div>
+            </td>
         </tr>
         [% END %]
     [% END %]</tbody>
@@ -181,17 +182,28 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 
 [% END %]
 
-       </div>
+</div>
 </div>
 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
 
 [% MACRO jsinclude BLOCK %]
-    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
+    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
+    <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
     [% INCLUDE 'datatables.inc' %]
     <script type="text/javascript">
         $(document).ready(function(){
 
+            $(".dropdown").on("hidden.bs.dropdown", function(){
+                // Reset menu styles so that a click on the
+                // original dropdown button toggle works correctly
+                $(".dropdown").css("position","absolute");
+                $(".dropdown-menu").css({
+                    "top" : "100%",
+                    "left" : "auto",
+                    "right" : 0
+                });
+            });
+
             $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
                 "sDom": 't',
                 "aoColumnDefs": [
@@ -201,26 +213,36 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
                 "aaSorting": [[ 1, "asc" ]],
                 "bPaginate": false
             }));
-                /* Inline edit/delete links */
-                $("td").click(function(event){
-                    var $tgt = $(event.target);
-                    var row = $(this).parent();
-                    $(".linktools").hide();
-                    $("tr").removeClass("selected");
-                    row.addClass("selected");
-                    if($tgt.is("a")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
-                        //Don't show inline links for cells containing links of their own.
-                    } else {
-                        var position = $(this).offset();
-                        var top = position.top+5;
-                        var left = position.left+5;
-                        $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
-                    }
-                });
 
+            /* Display actions menu anywhere the table is clicked */
+            $("td").click(function(event){
+                var tgt = $(event.target);
+                var row = $(this).parent();
+                var rowid = row.attr("id");
+                $("tr").removeClass("highlighted-row");
+                row.addClass("highlighted-row");
+                $(".dropdown").removeClass("open");
+                if(tgt.is("a")||tgt.is(":nth-child(8)")){
+                    // Don't show inline links for cells containing links of their own.
+                } else {
+                    event.stopPropagation();
+                    var dropdown = $(".dropdown", row);
+                    dropdown.addClass("open");
+                    var position = $(this).offset();
+                    var top = position.top + 5;
+                    var left = position.left + 5;
+                    dropdown.css("position","unset");
+                    $(".dropdown-menu", row).css({
+                        "top" : top,
+                        "left" : left,
+                        "right" : "unset"
+                    });
+
+               }
+            });
         });
     </script>
     [% INCLUDE 'z3950_search.inc' %]
 [% END %]
 
-[% INCLUDE 'popup-bottom.inc' %]
+[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
\ No newline at end of file