Bugzilla – Attachment 51766 Details for
Bug 16507
Show play media tab first
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16507: Show play media tab first if record has no holdings
SIGNED-OFF-Bug-16507-Show-play-media-tab-first-if-.patch (text/plain), 4.54 KB, created by
Owen Leonard
on 2016-05-25 11:55:32 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16507: Show play media tab first if record has no holdings
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-05-25 11:55:32 UTC
Size:
4.54 KB
patch
obsolete
>From 49817e5f831beae93f2f1a4ad9022d5f02e48c44 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Thu, 12 May 2016 23:40:56 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 16507: Show play media tab first if record > has no holdings >Content-Type: text/plain; charset="utf-8" > >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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 3 ++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 9 +++++++-- > opac/opac-detail.pl | 2 ++ > 3 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index fee31d8..faf30e6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -549,6 +549,7 @@ function verify_images() { > <div id="bibliodetails" class="toptabs"> > > <ul> >+[% IF ( count == 0 ) %][% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %][% END %] > [% IF (SeparateHoldings) %] > <li><a href="#holdings">[% LoginBranchname %] holdings</a></li> > <li><a href="#otherholdings">Other holdings</a></li> >@@ -560,7 +561,7 @@ function verify_images() { > [% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %] > [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %] > [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="#images">Images</a></li>[% END %][% END %] >-[% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %] >+[% IF ( count > 0 ) %][% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %][% END %] > </ul> > > [% items_table_block_iter = 0 %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index fe72d01..78e2323 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -529,6 +529,9 @@ > <div id="bibliodescriptions" class="toptabs"> > > <ul> >+ [% IF ( defaulttab == 'media' && HTML5MediaEnabled && HTML5MediaSets ) %] >+ <li id="tab_html5media" class="ui-tabs-active"><a href="#html5media">Play media</a></li> >+ [% END %] > [% IF ( defaulttab == 'holdings' ) %] > <li id="tab_holdings" class="ui-tabs-active"> > [% ELSE %] >@@ -603,8 +606,10 @@ > <li id="tab_images"><a href="#images">Images</a></li> > [% END %] > >- [% IF ( HTML5MediaEnabled && HTML5MediaSets ) %] >- <li id="tab_html5media"><a href="#html5media">Play media</a></li> >+ [% IF ( itemloop.size > 0 ) %] >+ [% IF ( HTML5MediaEnabled && HTML5MediaSets ) %] >+ <li id="tab_html5media"><a href="#html5media">Play media</a></li> >+ [% END %] > [% END %] > > [% IF ( IDreamBooksReviews ) %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 98afe3e..20f1b0d 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -1123,6 +1123,8 @@ my $defaulttab = > ? 'serialcollection' : > $opac_serial_default eq 'holdings' && scalar (@itemloop) > 0 > ? 'holdings' : >+ scalar (@itemloop) == 0 >+ ? 'media' : > $subscriptionsnumber > ? 'subscriptions' : > @serialcollections > 0 >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16507
:
51457
|
51460
|
51733
|
51766
|
52948
|
53555
|
53696