Bug 30489 - Convert MARC and authority subfield edit tabs to Bootstrap
Summary: Convert MARC and authority subfield edit tabs to Bootstrap
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 29226
  Show dependency treegraph
 
Reported: 2022-04-07 14:20 UTC by Owen Leonard
Modified: 2022-05-13 15:55 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30489: Convert MARC and authority subfield edit tabs to Bootstrap (72.94 KB, patch)
2022-04-14 11:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30489: Convert MARC and authority subfield edit tabs to Bootstrap (73.00 KB, patch)
2022-04-20 16:15 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-04-07 14:20:59 UTC
Continuing the process of phasing out jQueryUI, this patch will replace jQueryUI tabs in two places:

- admin/auth_subfields_structure.tt
- admin/marc_subfields_structure

The difficulty with the templates is that in many cases Koha wants to use "@" as the tab text. jQueryUI didn't have any problem with this, but Bootstrap doesn't like it.

One idea I had was to handle that specific case and create a variable specifically for the tab's anchor text:

        if( $row_data{tagsubfield} eq "@" ){
            $row_data{subfieldanchor} = "AT";
        } else {
            $row_data{subfieldanchor} = $row_data{tagsubfield};
        }

Seems unfortunate to have to check for that one case, so maybe someone else has a better idea.
Comment 1 Owen Leonard 2022-04-14 11:46:58 UTC
Created attachment 133304 [details] [review]
Bug 30489: Convert MARC and authority subfield edit tabs to Bootstrap

This patch updates the MARC and authority subfield edit interface to
replace jQueryUI tabs with Bootstrap. The code for handling
drag-to-reorder tabs is updated to accommodate the new markup.

To test, apply the patch and restart_all.

- Go to Administration -> MARC bibliographic framework -> Default
  framework and choose "MARC structure" from the Actions menu.
- In the row for 000 LEADER, click Actions -> View subfields.
- Click "Edit." On the edit page the tabs should look correct and work
  correctly.
- Return to the list of tags and click "View subfields" for the 245 tag.
- Click one of the "Edit" buttons for any but the first subfield, e.g.
  "a".
- On the "Tag 245 Subfield constraints" page the "a" tab should be
  pre-selected.
- Click any of the subfield tabs and drag it to re-order it in the
  sequence of tags.
- It should stay in the correct slot when you release it.
- Save and confirm that the new sequence of subfields has been saved.

Perform all the same tests under Administration -> Authority types.
Comment 2 Martin Renvoize 2022-04-20 16:15:09 UTC
Created attachment 133490 [details] [review]
Bug 30489: Convert MARC and authority subfield edit tabs to Bootstrap

This patch updates the MARC and authority subfield edit interface to
replace jQueryUI tabs with Bootstrap. The code for handling
drag-to-reorder tabs is updated to accommodate the new markup.

To test, apply the patch and restart_all.

- Go to Administration -> MARC bibliographic framework -> Default
  framework and choose "MARC structure" from the Actions menu.
- In the row for 000 LEADER, click Actions -> View subfields.
- Click "Edit." On the edit page the tabs should look correct and work
  correctly.
- Return to the list of tags and click "View subfields" for the 245 tag.
- Click one of the "Edit" buttons for any but the first subfield, e.g.
  "a".
- On the "Tag 245 Subfield constraints" page the "a" tab should be
  pre-selected.
- Click any of the subfield tabs and drag it to re-order it in the
  sequence of tags.
- It should stay in the correct slot when you release it.
- Save and confirm that the new sequence of subfields has been saved.

Perform all the same tests under Administration -> Authority types.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2022-04-20 16:15:50 UTC
Looking great and working great.. nice one..

Going straight for PQA here too.. Scripts are happy and no regressions found.

PQA
Comment 4 Fridolin Somers 2022-05-02 21:25:09 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄