Bugzilla – Attachment 48683 Details for
Bug 14306
Show URL from MARC21 field 555$u in basket and detail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14306: Changes for basket and detail templates
PASSED-QA-Bug-14306-Changes-for-basket-and-detail-.patch (text/plain), 5.90 KB, created by
Katrin Fischer
on 2016-03-04 13:23:01 UTC
(
hide
)
Description:
[PASSED QA] Bug 14306: Changes for basket and detail templates
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-04 13:23:01 UTC
Size:
5.90 KB
patch
obsolete
>From 835c8fc34930329954f1e9640501c39333aaa97c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 27 Aug 2015 09:49:40 +0200 >Subject: [PATCH] [PASSED QA] Bug 14306: Changes for basket and detail > templates >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >A simple regex is added to the basket and detail templates to select the >URLs passed separately from MARC21 555$u by GetMarcNotes. Note that the >regex tests if a note starts with http:// or https:// and does not contain >any whitespace in order to be considered as a url. >These URLs are put in an anchor tag. > >This touches four places: >[1] opac detail, tab title notes >[2] catalogue detail, tab Descriptions >[3] opac basket, more details, notes >[4] staff basket, more details, notes > >Test plan: >[1] Edit a record. Add a 500$a, 555$a and a URL in 555$u. > Put "http://this is not a url" in the 500$a (whitespace!). >[2] Check opac-detail, tab Title Notes. Check the URL. >[3] Do the same for catalogue/detail. >[4] Add record to cart in OPAC. Open basket. Check More details. >[5] Repeat previous step in staff. > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt | 10 ++++++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 12 +++++++++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 11 +++++++++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 +++++++- > 4 files changed, 33 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >index ff9095c..a6e7c57 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >@@ -242,8 +242,14 @@ function batchDelete(){ > <th scope="row">Notes</th> > <td> > [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %] >- <p>- [% MARCNOTE.marcnote %]</p> >- [% END %]</td> >+ <p> >+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >+ - <a target="_blank" href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a> >+ [% ELSE %] >+ - [% MARCNOTE.marcnote %] >+ [% END %] >+ [% END %] >+ </td> > </tr> > [% END %] > >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 e46428a..40681f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -856,11 +856,17 @@ function verify_images() { > > [% IF ( MARCNOTES ) %] > [% FOREACH MARCNOTE IN MARCNOTES %] >- <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p> >+ <p> >+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >+ <a target="_blank" href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a> >+ [% ELSE %] >+ [% MARCNOTE.marcnote FILTER html_line_break %] >+ [% END %] >+ </p> > [% END %] >- [% ELSE %] >+[% ELSE %] > [% IF ( notes ) %] >- <p>[% notes %]</p> >+ <p>[% notes %]</p> > [% END %] > [% END %] > </div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index 94d5e0b..25661ff 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -151,8 +151,15 @@ > <th scope="row">Notes</th> > <td> > [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %] >- <p>- [% MARCNOTE.marcnote %]</p> >- [% END %]</td> >+ <p> >+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >+ - <a target="_blank" href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a> >+ [% ELSE %] >+ - [% MARCNOTE.marcnote %] >+ [% END %] >+ </p> >+ [% END %] >+ </td> > </tr> > [% END %] > >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 6c17888..6bdcc47 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -717,7 +717,13 @@ > [% IF ( MARCNOTES ) %] > <div id="marcnotes"> > [% FOREACH MARCNOTE IN MARCNOTES %] >- <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p> >+ <p> >+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] >+ <a target="_blank" href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a> >+ [% ELSE %] >+ [% MARCNOTE.marcnote FILTER html_line_break %] >+ [% END %] >+ </p> > [% END %] > </div> > [% ELSE %] >-- >1.9.1
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 14306
:
39737
|
39741
|
41237
|
41987
|
41995
|
42010
|
42011
|
42012
|
42013
|
46221
|
46251
|
46252
|
46253
|
46254
|
48681
|
48682
| 48683 |
48684