[Koha-bugs] [Bug 23246] Record detail page jumps into the 'images' tab if no holdings

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 5 20:56:03 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23246

Maryse Simard <maryse.simard at inlibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #91155|0                           |1
        is obsolete|                            |

--- Comment #6 from Maryse Simard <maryse.simard at inlibro.com> ---
Created attachment 91362
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91362&action=edit
Bug 23246: (follow-up) Hardcoding tab position is not enough

There are many conditions that determine the tab number for 'media'.
Translated into variables that hold the tabs count on each condition, it
is clear that '3' was not good enough:
            [%- holdings      = (SeparateHoldings)   ? 2 : 1
                notes         = (MARCNOTES || notes) ? 1 : 0
                acq           = (Koha.Preference('AcquisitionDetails')) ? 1 : 0
                frbr          = (FRBRizeEditions  && XISBNS) ? 1 : 0
                local_covers  = (LocalCoverImages && (localimages ||
CAN_user_tools_upload_local_cover_images)) ? 1 : 0
                media_tab     = holdings + notes + acq + frbr + local_covers
            -%]

This patch gets rid of the hardcoded value, adds an id to the 'media'
tab (i.e. 'media_tab') and uses JS to get the right index.

To test:
- Play with the different options governing those variables
=> FAIL: 3 is not always the 'media' tab
- Apply this patch
- Repeat your tests
=> SUCCESS: It always picks the 'media' tab
- Sign off :-D

Sponsored-by: American Numismatics Society
Signed-off-by: Maryse Simard <maryse.simard at inlibro.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list