Bug 29609: Centralized code to build the link to a biblio detail page
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-edit.tt
index 0423a41..20c2448 100644 (file)
@@ -2,7 +2,7 @@
 [% USE Asset %]
 [% USE AuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Serials &rsaquo; Serial edition [% bibliotitle | html %]</title>
+<title>Serial edition [% bibliotitle | html %] &rsaquo; Serials &rsaquo; Koha</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% Asset.js("js/cataloging.js") | $raw %]
 [% INCLUDE 'calendar.inc' %]
@@ -62,8 +62,6 @@ $(document).ready(function() {
         }
         return true;
     });
-
-    $(".datepicker").datepicker();
 });
 //]]>
 </script>
@@ -83,7 +81,21 @@ $(document).ready(function() {
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'serials-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Serial edition <i>[% bibliotitle | html %] [% IF ( callnumber ) %]([% callnumber | html %])[% END %]</i></div>
+<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+    <ol>
+        <li>
+            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+        </li>
+        <li>
+            <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
+        </li>
+        <li>
+            <a href="#" aria-current="page">
+                Serial edition <em>[% bibliotitle | html %] [% IF ( callnumber ) %]([% callnumber | html %])[% END %]</em>
+            </a>
+        </li>
+    </ol>
+</nav>
 
 <div class="main container-fluid">
     <div class="row">
@@ -92,10 +104,10 @@ $(document).ready(function() {
 
     [% INCLUDE 'modals/serials_multi_receiving.inc' %]
 
-<h1>Serial edition <i>[% bibliotitle | html %]</i>
+<h1>Serial edition <em>[% bibliotitle | html %]</em>
     [% IF location %] ([% AuthorisedValues.GetByCode('LOC', location) | html %])[% END %]
     [% IF ( callnumber ) %] callnumber: [% callnumber | html %][% END %]</h1>
-[% IF internalnotes %]<p>Nonpublic note: [% internalnotes | html %]</p>[% END %]
+[% IF internalnotes %]<p>Nonpublic note: [% internalnotes | html | html_line_break %]</p>[% END %]
 <form method="post" name="f" class="noEnterSubmit" action="serials-edit.pl" id="serials_edit">
 
 [% IF ( Errors ) %]
@@ -129,23 +141,23 @@ $(document).ready(function() {
             Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" value="[% serialslis.serialseq | html %]" size="20" maxlength="100" />
         </td>
         <td>
-            <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="datepicker" />
+            <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" />
         </td>
         <td>
             <input type="text" name="publisheddatetext" value="[% serialslis.publisheddatetext | html %]" size="10" maxlength="100" />
         </td>
         <td>
-            <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="datepicker" />
+            <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="flatpickr" />
         </td>
         <td>
             [% IF ( serialslis.editdisable ) %]
               <input type="hidden" name="status" id="status[% serialslis.serialid | html %]" value="[% serialslis.serstatus | html %]">
-              <select name="status" size="1"  disabled="disabled">
+              <select name="status" disabled="disabled">
             [% ELSE %]
               [% IF ( serialslis.serialsadditems ) %]
-              <select name="status" size="1" id="status[% serialslis.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+[% serialslis.subscriptionid | html %][% serialslis.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]','[% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% serialslis.arriveddate | html %]')} else { HideItems('items'+[% serialslis.subscriptionid | html %]+[% serialslis.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" >
+              <select name="status" id="status[% serialslis.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+[% serialslis.subscriptionid | html %][% serialslis.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]','[% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% serialslis.arriveddate | html %]')} else { HideItems('items'+[% serialslis.subscriptionid | html %]+[% serialslis.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" >
                [% ELSE %]
-              <select name="status" size="1" id="status[% serialslis.serialid | html %]" onchange="if (this.value==2 || this.value==7){changeDate(this, '[% serialslis.arriveddate | html %]')} else {changeDate(this, '[% serialslis.planneddate | html %]')}" >
+              <select name="status" id="status[% serialslis.serialid | html %]" onchange="if (this.value==2 || this.value==7){changeDate(this, '[% serialslis.arriveddate | html %]')} else {changeDate(this, '[% serialslis.planneddate | html %]')}" >
                [% END %] 
             [% END %]
             [% IF ( serialslis.status1 ) %]
@@ -234,7 +246,7 @@ $(document).ready(function() {
                     <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
                 [% END %]
                 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
-                  <select name="field_value" size="1">
+                  <select name="field_value" class="select2 input_marceditor">
                   [% FOREACH value IN iteminformatio.marc_value.values %]
                     [% IF ( value == iteminformatio.marc_value.default ) %]
                       <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
@@ -252,14 +264,20 @@ $(document).ready(function() {
                 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
                 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
                 [% IF ( iteminformatio.repeatable ) %]
-                    <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;">
+                    <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
                         <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
                     </a>
                 [% END %]
                 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
             </div></li>
+
         [% END %]</ol></div><!-- /iteminformation -->
-        
+
+        <hr>
+        <div class="subfield_line">
+            <label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" size="2"> <span class="hint">The barcode you enter will be incremented for each additional item.</p>
+        </div>
+
         <input type="hidden" name="moditem" value="" /> 
         <input type="hidden" name="tag" value="[% item.itemtagfield | html %]" />
         <input type="hidden" name="subfield" value="[% item.itemtagsubfield | html %]" />
@@ -286,16 +304,16 @@ $(document).ready(function() {
             Supplemental issue <input type="text" name="serialseq" id="serialseq[% newserialloo.serialid | html %]" value="" size="20" maxlength="100" onchange="if (this.value!=''){unHideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]', '[% newserialloo.serialid | html %]')} else {HideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]')}" />
         </td>
         <td>
-            <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15"  class="datepicker" />
+            <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15"  class="flatpickr" />
         </td>
         <td>
             <input type="text" name="publisheddatetext" value="[% newserialloo.publisheddatetext | html %]" size="10" maxlength="100" />
         </td>
         <td>
-            <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="datepicker" />
+            <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="flatpickr" />
         </td>
         <td>
-            <select name="status" size="1" id="addstatus[% newserialloo.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','[% newserialloo.serialid | html %]'); changeDate(this, '[% newserialloo.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% newserialloo.arriveddate | html %]')} else { HideItems('items'+'[% newserialloo.subscriptionid | html %]'+[% newserialloo.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" >
+            <select name="status" id="addstatus[% newserialloo.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','[% newserialloo.serialid | html %]'); changeDate(this, '[% newserialloo.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% newserialloo.arriveddate | html %]')} else { HideItems('items'+'[% newserialloo.subscriptionid | html %]'+[% newserialloo.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" >
 
                     <option value="">----</option>
                   [% IF ( newserialloo.status1 ) %]
@@ -380,7 +398,7 @@ $(document).ready(function() {
                     <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
                 [% END %]
                 [% IF ( iteminformatio.marc_value.type == 'select' ) %]
-                  <select name="field_value" size="1">
+                  <select name="field_value">
                   [% FOREACH value IN iteminformatio.marc_value.values %]
                     [% IF ( value == iteminformatio.marc_value.default ) %]
                       <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
@@ -398,14 +416,19 @@ $(document).ready(function() {
                 <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
                 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
                 [% IF ( iteminformatio.repeatable ) %]
-                    <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;">
+                    <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
                         <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
                     </a>
                 [% END %]
                 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
         </div>
        </li>[% END %]</ol>
-        
+
+        <hr>
+        <div class="subfield_line">
+            <label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" size="2"> <span class="hint">The barcode you enter will be incremented for each additional item.</p>
+        </div>
+
         <input type="hidden" name="moditem" value="" /> 
         <input type="hidden" name="tag" value="[% newserialloo.itemtagfield | html %]" />
         <input type="hidden" name="subfield" value="[% newserialloo.itemtagsubfield | html %]" />
@@ -424,9 +447,9 @@ $(document).ready(function() {
 
 </table>
     <fieldset class="action">
-        <div class="btn-group"><input type="submit" value="Save" class="btn btn-default btn-sm"  accesskey="w" /></div>
+        <div class="btn-group"><input type="submit" value="Save" class="btn btn-default"  accesskey="w" /></div>
         [% UNLESS ( serialsadditems ) %]&nbsp;&nbsp;
-            <div class="btn-group"><a href="#multi_receiving" role="button" class="btn btn-default btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Multi receiving</a></div>
+            <div class="btn-group"><a href="#multi_receiving" role="button" class="btn btn-default" data-toggle="modal"><i class="fa fa-plus"></i> Multi receiving</a></div>
         [% END %]
 
     </fieldset>
@@ -448,7 +471,7 @@ $(document).ready(function() {
                             [% END %]
                         [% END %]
                     [% END %]
-                    <li><a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% biblionumber | uri %]" title="go to [% bibliotitle | html %]">Show biblio</a></li></ul>
+                    <li><a href="[% PROCESS biblio_a_href biblionumber => biblionumber %]" title="go to [% bibliotitle | html %]">Show biblio</a></li></ul>
             </aside>
         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
      </div> <!-- /.row -->