Bug 10261

Summary: Link to patron files missing from circ-menu.tt
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
URL: cgi-bin/koha/members/pay.pl?borrowernumber=96
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 10261 - Link to patron files missing from circ-menu.tt
Bug 10261 [Revised] Link to patron files missing from circ-menu.tt
[SIGNED-OFF]Bug 10261 [Revised] Link to patron files missing from circ-menu.tt
Bug 10261 [Revised] Link to patron files missing from circ-menu.tt

Description Nicole C. Engard 2013-05-16 17:29:13 UTC
If you're on the pay fines tab you don't see the following tabs on the left as you should:

Files 
Routing List 
Statistics
Comment 1 Owen Leonard 2013-05-17 16:10:50 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-05-17 16:44:51 UTC
See Bug 9917 for the solution to the problem with the routing lists link. I can't reproduce the problem with the statistics link in master or 3.10.x.
Comment 3 Nicole C. Engard 2013-05-18 19:03:35 UTC
The link is there now but the link doesn't include the borrowernumber so it doesn't open right: /cgi-bin/koha/members/files.pl?borrowernumber=
Comment 4 Owen Leonard 2013-05-20 12:38:24 UTC Comment hidden (obsolete)
Comment 5 Nicole C. Engard 2013-05-20 13:59:35 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-05-22 11:02:38 UTC
QA comment:

I never understand why 2 includes files are present. What is the way to keep just one of them?

The patch fixes the described issue.

Marked as Passed QA.
Comment 7 Jonathan Druart 2013-05-22 11:02:50 UTC
Created attachment 18306 [details] [review]
Bug 10261 [Revised] Link to patron files missing from circ-menu.tt

The link to patron files doesn't appear on some pages. That's because
the link was added to circ-menu.inc but not circ-menu.tt. Each is used
by different patron-related pages. This patch adds the missing link.

To test, enable the EnableBorrowerFiles system preference and view
members/pay.pl or members.paycollect.pl. The "Files" tab should appear
in the left-hand sidebar menu. Other patron pages should show the same.

Edit: Corrected scope of template variables which shouldn't have been
copied directly from circ-menu.inc without changing scope.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
all tests pass
Comment 8 Galen Charlton 2013-05-22 14:43:51 UTC
(In reply to comment #6)
> QA comment:
> 
> I never understand why 2 includes files are present. What is the way to keep
> just one of them?

I would agree that moving towards DRY (don't repeat yourself) would nice.

Regardless, I've pushed this to master.  Thanks, Owen!
Comment 9 Owen Leonard 2013-05-22 14:57:19 UTC
(In reply to comment #6)
> I never understand why 2 includes files are present. What is the way to keep
> just one of them?

From the original commit of that file: "Adds a version of the include circ-menu.inc as circ-menu.tt this has the same functionality as the old include but does not require all the borrowers attributes to be passed as global scoped variables."

http://git.koha-community.org/gitweb/?p=koha.git;a=commitdiff;h=507c7f422485aaf7ae601b0a84bacdbaedac061c

Perhaps there is a better way to handle the scope issue?
Comment 10 Tomás Cohen Arazi 2013-06-06 01:33:09 UTC
This patch has been pushed to 3.12.x, will be in 3.12.1.