Bug 16507

Summary: Show play media tab first
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: OPACAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, claire_gravely, frederic, jonathan.druart+koha, katrin.fischer, kyle
Version: master   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 23246    
Attachments: opac view
Bug 16507: Show play media tab first if record has no holdings
Bug 16507: Show play media tab first if record has no holdings
[SIGNED-OFF] Bug 16507: Show play media tab first if record has no holdings
Bug 16507: Show play media tab first if record has no holdings
Bug 16507: Show play media tab first if record has no holdings
Bug 16507: Show play media tab first if record has no holdings

Description Nicole C. Engard 2016-05-12 13:38:44 UTC
Created attachment 51457 [details]
opac view

It might be nice if there are no holdings and there is a play media tab to show that tab first. For example I'm cataloging streaming media so I don't need items, but the video can be viewed right in the OPAC so why not show that tab first?
Comment 1 Aleisha Amohia 2016-05-12 23:44:15 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-05-18 12:42:10 UTC
This works great in the staff client, but what about the OPAC?
Comment 3 Aleisha Amohia 2016-05-24 02:21:22 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2016-05-25 11:55:32 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-05-25 19:26:37 UTC
It seems weird to me to change the order of the tabs depending on the existence of items. Would not it better to select the tab by default?
Comment 6 Kyle M Hall 2016-06-24 18:33:12 UTC
(In reply to Jonathan Druart from comment #5)
> It seems weird to me to change the order of the tabs depending on the
> existence of items. Would not it better to select the tab by default?

I agree with Jonathan, I don't think it's good for ui elements to jump around. It's better for consistency if the tab remains where it always has been but is now the selected tab when the page loads.
Comment 7 Aleisha Amohia 2016-06-30 00:14:08 UTC Comment hidden (obsolete)
Comment 8 Claire Gravely 2016-07-21 08:38:21 UTC
I got the following software error after creating a record:

Can't locate WWW/YouTube/Download.pm in @INC (you may need to install the WWW::YouTube::Download module) (@INC contains: /home/claire/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /home/claire/koha/C4/HTML5Media.pm line 103.
Comment 9 Claire Gravely 2016-07-21 09:37:23 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2016-07-25 15:52:34 UTC
Created attachment 53696 [details] [review]
Bug 16507: Show play media tab first if record has no holdings

To test:
1) Go to Admin -> Global sysprefs
2) Turn on HTML5MediaEnabled and HTML5MediaYouTube
3) Go to Cataloging and create a new record
4) Catalogue a YouTube link in 856$u and save record. Do not add any items (click Normal tab)
5) Confirm that Play media tab is the selected tab by default
6) View record on OPAC and confirm Play media tab is selected by default
7) Go back to staff client, add an item then go back to Normal tab
8) Confirm that Holdings tab is now selected by default
9) Confirm Holdings tab is selected by default on OPAC

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Kyle M Hall 2016-09-09 13:09:56 UTC
Pushed to master for 16.11, thanks Aleisha!
Comment 12 Frédéric Demians 2016-09-13 06:59:07 UTC
Pushed in 16.05. Will be in 16.05.04.