Description
paxed
2014-02-04 09:27:27 UTC
Created attachment 26894 [details] [review] Add syspref MarcFieldDocURL to config the MARC format documentation URL for marc edit Add a new system preference MarcFieldDocURL. Setting it to some URL will make all the MARC documentation links point to that in the MARC edit UI. Leaving the value empty will use the old defaults (http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC). There are some possible substitutions usable in the URL: - {MARC} is replaced with either "MARC21" or "UNIMARC" - {FIELD} is replaced by the MARC field number, eg. "000", "048", ... - {LANG} is replaced by the UI language, eg. "en", or "fi-FI" To test: 1) Install Koha 2) Go to Cataloguing > New record 3) Clicking on the question mark links in the MARC edit will open a window to either loc.gov or archive.ifla.org 4) Install patch 5) Redo parts 1, 2, and 3. 6) Set the value of MarcFieldDocURL to http://example.com/?field={FIELD}&marc={MARC}&lang={LANG} 7) Redo parts 1 and 2 8) Clicking on the question mark links in the MARC edit will open a window to example.com, with the proper substitutions in the URL for the field, marc flavour and language. There is another parameter asociated with MARC documentation links: If the user want to see concise or full version (please see bug #10940). So we could add to {MARC}, {FIELD} and {LANG}: - {FLAVOR} is replaced by the MARC "flavor" of the manual, either "concise" or "full" BTW, we have too much sysprefs, perhaps we need to consider something like Firefox's "about:config" to all the less used ones... or perhaps (also) wizards. Created attachment 40432 [details] [review] (rebased) Config for MARC field doc URLs Rebased from 3.15 to 3.21. other changes made. Test plans as before. Created attachment 40433 [details] [review] (rebased) Config for MARC field doc URLs Rebased from 3.15 to 3.21. no other changes made. Test plans as before. 2 small things found: 1/ sysprefs.sql should be kept ordered 2/ You can use the TT plugin to access the syspref value Created attachment 40506 [details] [review] (qa fix) sysprefs order and TT plugin access Addresses the QA comments from Jonathan Druart in comment #6. Indranil, could you please recreate the first patch and let the authorship to paxed? Created attachment 40515 [details] [review] (rebased) Config for MARC field doc URLs Rebased from 3.15 to 3.21. no other changes made. Test plans as before. http://bugs.koha-community.org/show_bug.cgi?id=11674 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Author: paxed <pasi.kallinen@pttk.fi> Created attachment 40516 [details] [review] (rebased) Config for MARC field doc URLs Rebased from 3.15 to 3.21. no other changes made. Test plans as before. http://bugs.koha-community.org/show_bug.cgi?id=11674 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Created attachment 40517 [details] [review] (qa fix) sysprefs order and TT plugin access Created attachment 40519 [details] [review] (qa followup) added missing IGNORE to INSERT added missing IGNORE to INSERT statement in updatedatabase.pl for compliance with Bug 9071 Created attachment 40541 [details] [review] (qa fix) sysprefs order and TT plugin access Addresses the QA comments from Jonathan Druart in comment #6. Created attachment 40542 [details] [review] (qa followup) added missing IGNORE to INSERT added missing IGNORE to INSERT statement in updatedatabase.pl for compliance with Bug 9071 Created attachment 40605 [details] [review] (rebased) Config for MARC field doc URLs Rebased from 3.15 to 3.21. no other changes made. Test plans as before. http://bugs.koha-community.org/show_bug.cgi?id=11674 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Created attachment 40606 [details] [review] (squashed commits) qa fix and followup 1/ the qa fix addresses the QA comments from Jonathan Druart in comment #6. 2/ qa followup added missing IGNORE to INSERT statement in updatedatabase.pl for compliance with Bug 9071 Indranil or paxed, could you please remove the addbiblio.pl change? Everything tests fine, but: marcfielddocurl => C4::Context->preference("MarcFieldDocURL"), is no longer needed, since Indranil grabs it with Koha.Preference. Created attachment 40638 [details] [review] (followup) removed C4::Context->preference removed redundant reference based on comment #17 above. Comment on attachment 40606 [details] [review] (squashed commits) qa fix and followup Review of attachment 40606 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ +144,1 @@ > var docurl = "[% marcfielddocurl.replace('"','"') %]"; Oops. This is not pulling the same data, particularly if we remove the parameter like I requested. Sorry, It doesn't work for me. Did I miss something? * I applied the 3 patches on an up-to-date master and then run updatedatabase.pl * I set up "MarcFieldDocURL" with the value : www.marc21.ca/MaJ/BIB/B{FIELD}.pdf * I went to the cataloguing module and add a new biblio,click on the ? shortcut for the 245. A new blank tab opened and that's it. I should have had this page opened : http://www.marc21.ca/MaJ/BIB/B245.pdf Created attachment 71108 [details] [review] Add a new system preference MarcFieldDocURL Add a new system preference MarcFieldDocURL. Setting it to some URL will make all the MARC documentation links point to that in the MARC edit UI. Leaving the value empty will use the old defaults (http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC). There are some possible substitutions usable in the URL: - {MARC} is replaced with either "MARC21" or "UNIMARC" - {FIELD} is replaced by the MARC field number, eg. "000", "048", ... - {LANG} is replaced by the UI language, eg. "en", or "fi-FI" To test: 1) Go to Cataloguing > New record 2) Clicking on the question mark links in the MARC edit will open a window to either loc.gov or archive.ifla.org 3) Install patch, run updatedatabase, etc 4) Redo parts 1, and 2. 5) Set the value of MarcFieldDocURL to http://example.com/?field={FIELD}&marc={MARC}&lang={LANG} 6) Redo parts 1 and 2 7) Clicking on the question mark links in the MARC edit will open a window to example.com, with the proper substitutions in the URL for the field, marc flavour and language Created attachment 73594 [details] [review] Bug 11674: Configuration for MARC field doc URLs Add a new system preference MarcFieldDocURL. Setting it to some URL will make all the MARC documentation links point to that in the MARC edit UI. Leaving the value empty will use the old defaults (http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC). There are some possible substitutions usable in the URL: - {MARC} is replaced with either "MARC21" or "UNIMARC" - {FIELD} is replaced by the MARC field number, eg. "000", "048", ... - {LANG} is replaced by the UI language, eg. "en", or "fi-FI" To test: 1) Go to Cataloguing > New record 2) Clicking on the question mark links in the MARC edit will open a window to either loc.gov or archive.ifla.org 3) Install patch, run updatedatabase, etc 4) Redo parts 1, and 2. 5) Set the value of MarcFieldDocURL to http://example.com/?field={FIELD}&marc={MARC}&lang={LANG} 6) Redo parts 1 and 2 7) Clicking on the question mark links in the MARC edit will open a window to example.com, with the proper substitutions in the URL for the field, marc flavour and language Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 74196 [details] [review] Bug 11674: Configuration for MARC field doc URLs Add a new system preference MarcFieldDocURL. Setting it to some URL will make all the MARC documentation links point to that in the MARC edit UI. Leaving the value empty will use the old defaults (http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC). There are some possible substitutions usable in the URL: - {MARC} is replaced with either "MARC21" or "UNIMARC" - {FIELD} is replaced by the MARC field number, eg. "000", "048", ... - {LANG} is replaced by the UI language, eg. "en", or "fi-FI" To test: 1) Go to Cataloguing > New record 2) Clicking on the question mark links in the MARC edit will open a window to either loc.gov or archive.ifla.org 3) Install patch, run updatedatabase, etc 4) Redo parts 1, and 2. 5) Set the value of MarcFieldDocURL to http://example.com/?field={FIELD}&marc={MARC}&lang={LANG} 6) Redo parts 1 and 2 7) Clicking on the question mark links in the MARC edit will open a window to example.com, with the proper substitutions in the URL for the field, marc flavour and language Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 18.05, thanks to everybody involved! Wonder if we should move this to Cataloguing for the release notes. Enhancement, not backported for 17.11 |