Bugzilla – Attachment 24152 Details for
Bug 11473
View log template has malformed conditionals, and logging info incorrect/inconsistent/unexpected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11473 - Fix log viewer template conditions
Bug-11473---Fix-log-viewer-template-conditions.patch (text/plain), 6.75 KB, created by
Jonathan Druart
on 2014-01-10 15:47:34 UTC
(
hide
)
Description:
Bug 11473 - Fix log viewer template conditions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-10 15:47:34 UTC
Size:
6.75 KB
patch
obsolete
>From 7bfdb57e97c368cdffc6a80d97653e6046d1ba32 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 6 Jan 2014 14:32:31 +1100 >Subject: [PATCH] Bug 11473 - Fix log viewer template conditions > >This patch adds the 'loopro' key to the 'module' value, so that >conditions are actually triggered in the template logic. > >(Note: loopro.CIRCULATION is valid, but I changed it for the sake >of consistency across the different conditions.) > >This patch also adds substr checks to the 'info' column when >using the cataloguing module. This will check for 'item' and 'biblio', >so that the appropriate label qualifer can be shown in the log viewer. >If either term is absent, the unqualified number will be shown instead >(this will be the majority of action logs at this point). > >_TEST PLAN_ > >Before applying: > >1) Access log viewer from Tools (or wherever really) >2) Look up logs for circulation, patrons, cataloguing, serial, >authorities, etc. >3) Note that the "Object" will always just be a number without qualification. > >After applying the patch: > >1) Look at those same logs >2) Note that the object number for borrowers will usually be prefaced >by 'member' (notwithstanding FINES which aren't taken into account in >this template yet); new bibs and new items should say 'Item X' or >'Biblio X'. Serials should have a link. Authorities should have a link >and an 'auth' preface. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> > >Works as advertised > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index a1d6e89..ccd7cb6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -127,7 +127,7 @@ > <tr> > <td>[% loopro.timestamp %]</td> > <td> >- [% IF ( module == 'CIRCULATION' ) %] >+ [% IF ( loopro.module == 'CIRCULATION' ) %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a> > [% ELSE %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a> >@@ -136,27 +136,29 @@ > <td>[% loopro.module %]</td> > <td>[% loopro.action %]</td> > <td> >- [% IF ( module == 'MEMBERS' ) %] >+ [% IF ( loopro.module == 'MEMBERS' ) %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a> > [% ELSE %] >- [% IF ( module == 'CIRCULATION' ) %] >+ [% IF ( loopro.module == 'CIRCULATION' ) %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> > [% IF ( loopro.object ) %] > member [% loopro.object %] > [% END %] > </a> > [% ELSE %] >- [% IF ( module == 'CATALOGUING' ) %] >- [% IF ( info == 'item' ) %] >+ [% IF ( loopro.module == 'CATALOGUING' ) %] >+ [% IF ( loopro.info.substr(0, 4) == 'item' ) %] > <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a> >- [% ELSE %] >+ [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %] > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a> >+ [% ELSE %] >+ [% loopro.object %] > [% END %] > [% ELSE %] >- [% IF ( module == 'SERIAL' ) %] >+ [% IF ( loopro.module == 'SERIAL' ) %] > <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a> > [% ELSE %] >- [% IF ( module == 'AUTHORITIES' ) %] >+ [% IF ( loopro.module == 'AUTHORITIES' ) %] > <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a> > [% ELSE %] > [% loopro.object %] >@@ -167,7 +169,7 @@ > [% END %] > </td> > <td> >- [% IF ( loopro.CIRCULATION ) %] >+ [% IF ( loopro.module == 'CIRCULATION' ) %] > <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.info %]" title="Display detail for this item">Item [% loopro.barcode |html %]</a> > [% ELSE %] > [% loopro.info |html %] >-- >1.7.10.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 11473
:
23915
|
23916
|
23917
|
23918
|
23922
|
23923
|
23924
|
23925
| 24152 |
24153
|
24154
|
24155