Bug 15288: Error pages: Code duplication removal and better translatability
authorMarc Véron <veron@veron.ch>
Wed, 2 Dec 2015 08:49:02 +0000 (09:49 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 05:57:34 +0000 (05:57 +0000)
commitf25f0aa254a11b12493466e6c733d90df0df11a5
treea47cbd537054cc4cbb2466cdcd510f761b5d475c
parent132ef99cf0a69668b318b38d4090152ff2880ca2
 Bug 15288: Error pages: Code duplication removal and better translatability

This patch changes the 400, 401, 402, 403, 404, 500 error pages to be handled
by only one template for staff and only one template for OPAC.

Additionally it removes a translatability issues due to sentence splitings by html tags.

To test:
- Apply patch
- Trigger 404 error for staff and for OPAC by calling a page that does not exist
- Try to trigger other error pages and/or carefully review code changes
  in the *.pl files
- Review koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt and
  koha-tmpl/intranet-tmpl/prog/en/modules/errorpage.tt

(Amended to fix a typo)
(Amended for comment #6)
(Amended to cover OPAC error pages as well)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
21 files changed:
errors/400.pl
errors/401.pl
errors/402.pl
errors/403.pl
errors/404.pl
errors/500.pl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/400.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/401.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/402.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/403.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/405.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/500.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt [moved from koha-tmpl/intranet-tmpl/prog/en/modules/errors/404.tt with 77% similarity]
koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/404.tt [deleted file]
koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt [new file with mode: 0644]
opac/errors/400.pl
opac/errors/401.pl
opac/errors/402.pl
opac/errors/403.pl
opac/errors/404.pl
opac/errors/500.pl