koha/koha-tmpl/intranet-tmpl/prog/en/includes/ contains both a circ-menu.tt and a circ-menu.inc. circ-menu.tt contains the following comment: [%# duplicates circ-menu.inc but assumes all borrower attributes are in a borrower variable rather than in the global namespace %] circ-menu.tt is used only by the following templates: members/pay.tt members/paycollect.tt This is a blatant violation of the DRY principle, and some inconsistencies have appeared over the years: * the purchase suggestions tab doesn't show up when using the fine payment page * the logic for displaying the notices tab differs The duplication should be removed, perhaps as part of a larger project to make all of the patron and circulation pages use the same routine to grab information about the current patron.
Some additional differences have creeped into the files: -use of INCLUDE 'patron-title.inc' vs. hard-coded patron title. -IF-checking picture vs. checking has_picture. -TT filtering borrowernumber with uri vs. not filtering. Other stuff that could be improved: -Hard-coded css styles should be moved into external stylesheets. -patroncategory and patronlibrary do not separate field description from the field content, so impossible to style separately.
Good catch, thx for linking to the other bug paxed.
This bug seems to be resolved. Verifyed on current master: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt line 230: [% INCLUDE 'circ-menu.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt line 175: [% INCLUDE 'circ-menu.inc' %] git grep 'circ-menu.tt' members/boraccount.pl:#workaround for Bug 4041 to get rid of duplicated code in circ-menu.tt, use circ-menu.inc instad members/pay.pl: #workaround for Bug 4041 to get rid of duplicated code in circ-menu.tt, use circ-menu.inc instad members/paycollect.pl:#workaround for Bug 4041 to get rid of duplicated code in circ-menu.tt, use circ-menu.inc instad (...)
Hi Mark, I think you are right, but it looks like we didn't remove the file. I will submit a patch.
Created attachment 39932 [details] [review] Bug 11804: Remove unused circ-menu.tt The formerly used circ-menu.tt is no longer referenced in the templates and can be removed. To test: - Verify all tabs in the patron account still work as they should. - git grep circ-menu.tt
Created attachment 40316 [details] [review] [SIGNED-OFF] Bug 11804: Remove unused circ-menu.tt The formerly used circ-menu.tt is no longer referenced in the templates and can be removed. To test: - Verify all tabs in the patron account still work as they should. - git grep circ-menu.tt Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No problems on patron pages, no more circ-menu.tt No errors
Created attachment 40318 [details] [review] Bug 14409: Remove references to circ-menu.tt Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Created attachment 40319 [details] [review] Bug 11804: Remove unused circ-menu.tt The formerly used circ-menu.tt is no longer referenced in the templates and can be removed. To test: - Verify all tabs in the patron account still work as they should. - git grep circ-menu.tt Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No problems on patron pages, no more circ-menu.tt No errors Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Created attachment 40320 [details] [review] Bug 11804: Remove references to circ-menu.tt Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Patches pushed to master. Thanks Katrina and Jonathan!
Pushed to 3.20.x will be in 3.20.2