| Lines 41-47
          $(document).ready(function() {
      
      
        Link Here | 
        
          | 41 |   })); | 41 |   })); | 
        
          | 42 |  | 42 |  | 
        
          | 43 |   $("#mainformsubmit").click(function(){ | 43 |   $("#mainformsubmit").click(function(){ | 
          
            
              | 44 |     return submitBackgroundJob(document.getElementById("process")); | 44 |     if ( $("#marc_modification_template_id").val() > 0 ) { | 
            
              |  |  | 45 |       return submitBackgroundJob(document.getElementById("process")); | 
            
              | 46 |     } | 
            
              | 47 |     alert(_("Please select a modification template.")); | 
            
              | 48 |     return false; | 
            
              | 49 |   }); | 
            
              | 50 |  | 
            
              | 51 |   $("#marc_modification_template_id").change(function(){ | 
            
              | 52 |     var url = "/cgi-bin/koha/svc/records/preview?" | 
            
              | 53 |     var mmtid = $(this).val(); | 
            
              | 54 |     $("a.preview").each(function(){ | 
            
              | 55 |       $(this).attr("href", url + "record_type=" + $(this).attr("data-record_type") + "&record_id=" + $(this).attr("data-record_id") + "&mmtid=" + mmtid); | 
            
              | 56 |     }); | 
            
              | 57 |   }); | 
            
              | 58 |  | 
            
              | 59 |   $("a.preview").click(function(){ | 
            
              | 60 |     // Equivalent to rel="gb_page_center[600,500]" | 
            
              | 61 |     return GB_showCenter(_("Preview MARC"), this.href , 600, 500); | 
        
          | 45 |   }); | 62 |   }); | 
        
          | 46 |  | 63 |  | 
        
          | 47 | }); | 64 | }); | 
  
    | Lines 138-149
          $(document).ready(function() {
      
      
        Link Here | 
        
          | 138 |     </form> | 155 |     </form> | 
        
          | 139 |   [% ELSIF view == 'list' %] | 156 |   [% ELSIF view == 'list' %] | 
        
          | 140 |     [% IF records %] | 157 |     [% IF records %] | 
          
            
              | 141 |       [% IF recordtype == 'biblio' %] | 158 |       <form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post" id="process"> | 
            
              | 142 |         <div id="toolbar"> | 159 |         <label for="marc_modification_template_id" class="required">Modify record using the following template: </label> | 
            
              | 143 |           <a id="selectall" href="#">Select All</a> | 160 |         <select name="marc_modification_template_id" id="marc_modification_template_id" required="required"> | 
            
              | 144 |           | <a id="clearall" href="#">Clear All</a> | 161 |           <option value="">Select a template</option> | 
            
              | 145 |         </div> | 162 |           [% FOREACH mmt IN MarcModificationTemplatesLoop %] | 
            
              | 146 |         <form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post" id="process"> | 163 |             [% IF mmt.selected %] | 
            
              |  |  | 164 |               <option value="[% mmt.template_id %]" selected="selected">[% mmt.name %]</option> | 
            
              | 165 |             [% ELSE %] | 
            
              | 166 |               <option value="[% mmt.template_id %]">[% mmt.name %]</option> | 
            
              | 167 |             [% END %] | 
            
              | 168 |           [% END %] | 
            
              | 169 |         </select> | 
            
              | 170 |         [% IF recordtype == 'biblio' %] | 
            
              | 171 |           <div id="toolbar"> | 
            
              | 172 |             <a id="selectall" href="#">Select All</a> | 
            
              | 173 |             | <a id="clearall" href="#">Clear All</a> | 
            
              | 174 |           </div> | 
        
          | 147 |           <table id="biblios" class="records"> | 175 |           <table id="biblios" class="records"> | 
        
          | 148 |             <thead> | 176 |             <thead> | 
        
          | 149 |               <tr> | 177 |               <tr> | 
  
    | Lines 159-177
          $(document).ready(function() {
      
      
        Link Here | 
        
          | 159 |                   <td><input type="checkbox" name="record_id" value="[% biblio.biblionumber %]" data-items="[% biblio.itemnumbers.size %]" data-issues="[% biblio.issues_count %]" data-reserves="[% biblio.reserves.size %]" /></td> | 187 |                   <td><input type="checkbox" name="record_id" value="[% biblio.biblionumber %]" data-items="[% biblio.itemnumbers.size %]" data-issues="[% biblio.issues_count %]" data-reserves="[% biblio.reserves.size %]" /></td> | 
        
          | 160 |                   <td>[% biblio.biblionumber %]</td> | 188 |                   <td>[% biblio.biblionumber %]</td> | 
        
          | 161 |                   <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></td> | 189 |                   <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></td> | 
          
            
              | 162 |                   <td><a href="/cgi-bin/koha/svc/records/preview?record_type=biblio&record_id=[% biblio.biblionumber %]&mmtid=[% mmtid %]" title="MARC preview" rel="gb_page_center[600,500]">Preview MARC</a> | 190 |                   <td><a href="/cgi-bin/koha/svc/records/preview?record_type=biblio&record_id=[% biblio.biblionumber %]&mmtid=[% mmtid %]" class="preview" data-record_type="biblio" data-record_id="[% biblio.biblionumber %]" data-mmtid="[% mmtid %]" title="Preview MARC" >Preview MARC</a> | 
            
              | 163 |  |  |  | 
        
          | 164 |                 </tr> | 191 |                 </tr> | 
        
          | 165 |               [% END %] | 192 |               [% END %] | 
        
          | 166 |             </tbody> | 193 |             </tbody> | 
        
          | 167 |           </table> | 194 |           </table> | 
        
          | 168 |           <div class="note">Reminder: this action will modify all selected biblios!</div> | 195 |           <div class="note">Reminder: this action will modify all selected biblios!</div> | 
          
            
              | 169 |       [% ELSE %] | 196 |         [% ELSE %] | 
            
              | 170 |         <div id="toolbar"> | 197 |           <div id="toolbar"> | 
            
              | 171 |           <a id="selectall" href="#">Select All</a> | 198 |             <a id="selectall" href="#">Select All</a> | 
            
              | 172 |           | <a id="clearall" href="#">Clear All</a> | 199 |             | <a id="clearall" href="#">Clear All</a> | 
            
              | 173 |         </div> | 200 |           </div> | 
            
              | 174 |         <form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post" id="process"> |  |  | 
        
          | 175 |           <table id="authorities" class="records"> | 201 |           <table id="authorities" class="records"> | 
        
          | 176 |             <thead> | 202 |             <thead> | 
        
          | 177 |               <tr> | 203 |               <tr> | 
  
    | Lines 187-206
          $(document).ready(function() {
      
      
        Link Here | 
        
          | 187 |                   <td><input type="checkbox" name="record_id" value="[% authority.authid %]" data-usage="[% authority.count_usage %]" /></td> | 213 |                   <td><input type="checkbox" name="record_id" value="[% authority.authid %]" data-usage="[% authority.count_usage %]" /></td> | 
        
          | 188 |                   <td><a href="/cgi-bin/koha/authorities/detail.pl?authid=[% authority.authid %]">[% authority.authid %]</a></td> | 214 |                   <td><a href="/cgi-bin/koha/authorities/detail.pl?authid=[% authority.authid %]">[% authority.authid %]</a></td> | 
        
          | 189 |                   <td>[% PROCESS authresult summary=authority.summary %]</td> | 215 |                   <td>[% PROCESS authresult summary=authority.summary %]</td> | 
          
            
              | 190 |                   <td><a href="/cgi-bin/koha/svc/records/preview?record_type=authority&record_id=[% authority.authid %]&mmtid=[% mmtid %]" title="MARC preview" rel="gb_page_center[600,500]">Preview MARC</a> | 216 |                   <td><a href="/cgi-bin/koha/svc/records/preview?record_type=authority&record_id=[% authority.authid %]&mmtid=[% mmtid %]" class="preview" data-record_type="authority" data-record_id="[% authority.authid %]" data-mmtid="[% mmtid %]" title="Preview MARC" rel="gb_page_center[600,500]">Preview MARC</a> | 
        
          | 191 |                 </tr> | 217 |                 </tr> | 
        
          | 192 |               [% END %] | 218 |               [% END %] | 
        
          | 193 |             </tbody> | 219 |             </tbody> | 
        
          | 194 |           </table> | 220 |           </table> | 
        
          | 195 |           <div class="note">Reminder: this action will modify all selected authorities!</div> | 221 |           <div class="note">Reminder: this action will modify all selected authorities!</div> | 
          
            
              | 196 |       [% END %] | 222 |         [% END %] | 
        
          | 197 |         <fieldset class="action"> | 223 |         <fieldset class="action"> | 
        
          | 198 |           <input type="hidden" name="op" value="modify" /> | 224 |           <input type="hidden" name="op" value="modify" /> | 
        
          | 199 |           <input type="hidden" name="recordtype" value="[% recordtype %]" /> | 225 |           <input type="hidden" name="recordtype" value="[% recordtype %]" /> | 
        
          | 200 |           <input type="button" id="mainformsubmit" value="Modify selected records" class="button" /> | 226 |           <input type="button" id="mainformsubmit" value="Modify selected records" class="button" /> | 
        
          | 201 |           <input type="hidden" name="runinbackground" id="runinbackground" value="" /> | 227 |           <input type="hidden" name="runinbackground" id="runinbackground" value="" /> | 
        
          | 202 |           <input type="hidden" name="completedJobID" id="completedJobID" value="" /> | 228 |           <input type="hidden" name="completedJobID" id="completedJobID" value="" /> | 
            
              | 203 |           <input type="hidden" name="marc_modification_template_id" value="[% mmtid %]" /> |  |  | 
        
          | 204 |           <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a> | 229 |           <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a> | 
        
          | 205 |         </fieldset> | 230 |         </fieldset> | 
        
          | 206 |         <div id="jobpanel"> | 231 |         <div id="jobpanel"> |