Bug 7253: followup : manage toolbar for fastcataloging
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Fri, 11 Jan 2013 11:16:29 +0000 (12:16 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 12 Feb 2013 15:00:37 +0000 (10:00 -0500)
During fast cataloging, hide some toolbar menus of biblio edition page :
- Save and view record
- Z3950 Search
- Framework change
Also display "(fast cataloging)" in biblio and item editon.

Signed-off-by: koha.aixmarseille <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Tested:
- adding a fast add with duplicate and without
- adding a new record, checked toolbar showed up correctly
- editing existing record, checked toolbar showed up correctly
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

index a5ae0c6..415c65f 100644 (file)
@@ -276,7 +276,12 @@ function Changefwk(FwkList) {
         <div id="yui-main">
         <div class="yui-g">
 
-<h1>[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])</h1>[% ELSE %]Add MARC record</h1>[% END %]
+<h1>
+[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])
+[% ELSE %]Add MARC record [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]
+[% END %]
+</h1>
+
 [% IF marcflavour != 'NORMARC' %]
 <div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div>
 [% END %]
@@ -354,6 +359,15 @@ function Changefwk(FwkList) {
 
        function yuiToolbar() {
 [% IF ( CAN_user_editcatalogue_edit_items ) %]
+    [% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
+        new YAHOO.widget.Button({
+            id: "addbiblio",
+            type: "button",
+            label: _("Save"),
+            container: "savebutton",
+            onclick: {fn:function(){redirect("items");}}
+        });
+    [% ELSE %]
         var savesplitmenu = new YAHOO.widget.Button({
             type: "split",
             label: _("Save"),
@@ -362,8 +376,8 @@ function Changefwk(FwkList) {
             menu: savemenu,
             container: "savebutton"
          });
-
-        savesplitmenu.on("click", onOption); 
+        savesplitmenu.on("click", onOption);
+    [% END %]
 [% ELSE %]
         new YAHOO.widget.Button({
             id: "addbiblio",
@@ -387,6 +401,7 @@ function Changefwk(FwkList) {
 
                <ul class="toolbar">
                        <li id="savebutton"><input id="addbiblio" type="submit" value="Save" /></li>
+            [% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
                        <li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
                        <li id="changeframework"><label for="Frameworks">Change framework: </label>
                        <select name="frameworkcode" id="Frameworks" onchange="Changefwk(this);">
@@ -401,13 +416,15 @@ function Changefwk(FwkList) {
                                  </option>                          
                                                [% END %]
                        </select> 
-<input type="hidden" name="op" value="addbiblio" /></li>
+            </li>
+            [% END %]
                </ul>
 </div>
 
 [% IF ( popup ) %]
         <input type="hidden" name="mode" value="popup" />
 [% END %]
+        <input type="hidden" name="op" value="addbiblio" />
         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
         <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
         <input type="hidden" name="breedingid" value="[% breedingid %]" />
@@ -571,13 +588,13 @@ function Changefwk(FwkList) {
 
 </div><!-- tabs -->
 
-[%# Fields for fast cataloguing %]
+[%# Fields for fast cataloging %]
 <input type="hidden" name="barcode" value="[% barcode %]" />
 <input type="hidden" name="branch" value="[% branch %]" />
 <input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
 <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
 <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
-[%# End of fields for fast cataloguing %]
+[%# End of fields for fast cataloging %]
 
 </form>
 
index 3e25344..f01c682 100644 (file)
@@ -162,7 +162,7 @@ $(document).ready(function() {
     [% END %]
     <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
     [% IF ( opisadd ) %]
-        <h2 id="additema">Add item</h2>
+        <h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2>
     [% ELSE %]
         <h2 id="edititem">Edit Item #[% itemnumber %][% IF ( barcode ) %] / Barcode [% barcode %][% END %]</h2>
     [% END %]
@@ -215,12 +215,12 @@ $(document).ready(function() {
     <input type="submit" value="Save changes" onclick="return Check(this.form)" />
     [% END %]</fieldset>
     
-    [%# Fields for fast cataloguing %]
+    [%# Fields for fast cataloging %]
     <input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
     <input type="hidden" name="barcode" value="[% barcode %]" />
     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
-    [%# End fields for fast cataloguing %]
+    [%# End fields for fast cataloging %]
 
 
     </form>