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?
Created attachment 51460 [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 shows first 6) Add an item then go back to Normal tab 7) Confirm that Holdings tab now shows first and Play media tab is last Sponsored-by: Catalyst IT
This works great in the staff client, but what about the OPAC?
Created attachment 51733 [details] [review] Bug 16507: Show play media tab first if record has no holdings EDIT: Same fix for OPAC side 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 shows first 6) Go to OPAC side and look at same record 7) Confirm that Play media tab shows first 8) Go back to staff side, add an item then go back to Normal tab 9) Confirm that Holdings tab now shows first and Play media tab is last 10) Go to OPAC side, confirm that Holdings tab now shows first and Play media tab is last Sponsored-by: Catalyst IT
Created attachment 51766 [details] [review] [SIGNED-OFF] Bug 16507: Show play media tab first if record has no holdings EDIT: Same fix for OPAC side 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 shows first 6) Go to OPAC side and look at same record 7) Confirm that Play media tab shows first 8) Go back to staff side, add an item then go back to Normal tab 9) Confirm that Holdings tab now shows first and Play media tab is last 10) Go to OPAC side, confirm that Holdings tab now shows first and Play media tab is last Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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?
(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.
Created attachment 52948 [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
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.
Created attachment 53555 [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>
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>
Pushed to master for 16.11, thanks Aleisha!
Pushed in 16.05. Will be in 16.05.04.