Bug 33136: Added class "page-section" to the result page table of serial record search
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / result.tt
index 2f46119..d46bd08 100644 (file)
@@ -1,64 +1,84 @@
+[% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Serials &rsaquo; Search Results</title>
+<title>Search results &rsaquo; Serials &rsaquo; Koha</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" language="javascript">
-//<![CDATA[
-function GetIt(bibno,title)
-{
-    title = title.replace(/\?/,"\?");
-    title = title.replace(/"/,"\"");
-    title = title.replace(/'/,"\'");
-    opener.document.f.biblionumber.value = bibno;
-    opener.document.f.title.value = title;
-    window.close();
-}
-//]]>
-</script>
 </head>
-<body>
 
-<div id="doc" class="yui-t7">
-   <div id="bd">
-       
+<body id="ser_result" class="ser">
+
+<div class="main container-fluid">
 
 [% IF ( total ) %]
-<h1>Search results from [% from %] to [% to %] of [% total %]</h1>
+<h1>Search results from [% from | html %] to [% to | html %] of [% total | html %]</h1>
+<div class="page-section">
 <table>
     <tr>
        <th>Title</th>
        <th>Author</th>
        <th>Publisher</th>
        <th>Publication year</th>
+       <th>ISSN</th>
           <th>&nbsp;</th>
     </tr>
     [% FOREACH resultsloo IN resultsloop %]
         <tr>
-            <td>[% resultsloo.title |html %] [% resultsloo.subtitle |html %]
+            <td class="title">
+                [% INCLUDE 'biblio-title.inc' biblio=resultsloo %]
+            </td>
+            <td>
+                [% resultsloo.author | html %]
             </td>
             <td>
-                [% resultsloo.author |html %]
+                [% resultsloo.publishercode | html %]
             </td>
             <td>
-                [% resultsloo.publishercode |html %]
+                [% resultsloo.publicationyear | html %]
             </td>
             <td>
-                [% resultsloo.publicationyear |html %]
+                [% resultsloo.issn | html %]
             </td>
-                       <td><a href="#" onclick="GetIt('[% resultsloo.biblionumber %]','[% resultsloo.title |url %]');" title="Choose this record">Choose</a></td>
+            <td><a class="btn btn-default btn-xs select_title" data-biblionumber="[% resultsloo.biblionumber | html %]" href="#" title="Choose this record">Choose</a></td>
         </tr>
     [% END %]
     </table>
+</div>
 [% ELSE %]
-<h2>No results found for <b>[% query %]</b></h2>
-[% END %]
-[% IF ( displayprev ) %]
-<a href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&amp;type=intranet&amp;startfrom=[% startfromprev |url %]&amp;q=[% query |url %]">&lt;&lt;</a>
-[% END %]
-[% IF ( displaynext ) %]
-<a href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&amp;type=intranet&amp;startfrom=[% startfromnext |url %]&amp;q=[% query |url %]">&gt;&gt;</a>
+
+    <div class="dialog message">
+        <p>No results found for <strong>[% query | html %]</strong></p>
+    </div>
+
 [% END %]
-<p><a href="subscription-bib-search.pl">Search for another record</a></p>
-<fieldset class="action"><a class="button close" href="#">Close</a></fieldset>
+
+<div class="pages">
+    [% IF ( displayprev ) %]
+        <a class="nav" href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&amp;type=intranet&amp;startfrom=[% startfromprev |url %]&amp;q=[% query |url %]">&lt;&lt; Previous</a>
+    [% END %]
+    [% IF ( displaynext ) %]
+        <a class="nav" href="/cgi-bin/koha/serials/subscription-bib-search.pl?op=do_search&amp;type=intranet&amp;startfrom=[% startfromnext |url %]&amp;q=[% query |url %]">Next  &gt;&gt;</a>
+    [% END %]
 </div>
 
-[% INCLUDE 'intranet-bottom.inc' %]
+<p><a href="subscription-bib-search.pl">Search for another record</a></p>
+
+<div id="closewindow"><a class="btn btn-default btn-default close" href="#">Close</a></div>
+
+[% MACRO jsinclude BLOCK %]
+    <script>
+        $(document).ready(function(){
+            $(".select_title").on("click",function(e){
+                e.preventDefault();
+                var biblionumber = $(this).data("biblionumber");
+                GetIt( biblionumber, $(this) );
+            });
+        });
+        function GetIt(bibno,title) {
+            title = title.parents('tr').find('.title').text();
+            opener.document.f.biblionumber.value = bibno;
+            opener.document.f.title.value = title;
+            window.close();
+        }
+    </script>
+[% END %]
+
+[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]