@@ -, +, @@ positions --- .../bug_12145_-_add_LockMoveUpButtons_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/cataloguing.pref | 6 +++++ .../prog/en/modules/cataloguing/addbiblio.tt | 27 ++++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_12145_-_add_LockMoveUpButtons_syspref.sql --- a/installer/data/mysql/atomicupdate/bug_12145_-_add_LockMoveUpButtons_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_12145_-_add_LockMoveUpButtons_syspref.sql @@ -0,0 +1, @@ +INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('LockMoveUpButtons', 0, NULL, "Lock and unlock the 'Move up' buttons in the MARC editor.", 'YesNo'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -246,6 +246,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('LocalHoldsPriority', '0', NULL, 'Enables the LocalHoldsPriority feature', 'YesNo'), ('LocalHoldsPriorityItemControl', 'holdingbranch', 'holdingbranch|homebranch', 'decides if the feature operates using the item''s home or holding library.', 'Choice'), ('LocalHoldsPriorityPatronControl', 'PickupLibrary', 'HomeLibrary|PickupLibrary', 'decides if the feature operates using the library set as the patron''s home library, or the library set as the pickup library for the given hold.', 'Choice'), +('LockMoveUpButtons', 0, NULL, "Lock and unlock the 'Move up' buttons in the MARC editor.", 'YesNo'), ('makePreviousSerialAvailable','0','','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','YesNo'), ('ManInvInNoissuesCharge','1',NULL,'MANUAL_INV charges block checkouts (added to noissuescharge).','YesNo'), ('MARCAuthorityControlField008','|| aca||aabn | a|a d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -2,6 +2,12 @@ Cataloging: # broken, omitted: marc Interface: - + - pref: LockMoveUpButtons + choices: + yes: Lock + no: "Don't lock" + - "the 'Move up' buttons in the MARC editor." + - - Use - pref: DefaultClassificationSource choices: class-sources --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -18,6 +18,22 @@ $("#loading").hide(); }); $(document).ready(function() { + var showButtons = true; + [% IF Koha.Preference('LockMoveUpButtons') %] + showButtons = false; + [% ELSE %] + showButtons = true; + [% END %] + toggleMoveUpButtons(showButtons); + $("#lockMoveUpButtons").click(function(){ + if ( showButtons == true ) { + showButtons = false; + } else { + showButtons = true; + } + toggleMoveUpButtons(showButtons); + }); + $('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) { $("#"+ui.panel.id+" input:eq(0)").focus(); }); @@ -226,6 +242,16 @@ function toggleMARCTagLinks(flag){ } } +function toggleMoveUpButtons(flag){ + if( flag === true ){ + $(".buttonUp").show(); + $("#lockMoveUpButtons i").removeClass('fa-check-square-o').addClass('fa-square-o'); + } else { + $(".buttonUp").hide(); + $("#lockMoveUpButtons i").addClass('fa-check-square-o').removeClass('fa-square-o'); + } +} + /** * check if mandatory subfields are written */ @@ -489,6 +515,7 @@ function Changefwk() { Show tags [% END %] +
  • Lock subfield positions
  • --