Summary: | <span> in title of patron card creator template needs to be removed | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Victor Grousset/tuxayo <victor> |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, david, fridolin.somers, lucas, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31069 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This removes <span> tags incorrectly displaying in browser page titles for some pages in the staff interface (Tools > Patron card creator > Layouts; Tools > Label creator > Manage > Label batches; Administration > Budgets administration > select a budget > Plan by ...).
|
Version(s) released in: |
22.11.00, 22.05.01
|
Circulation function: | |||
Bug Depends on: | 29602 | ||
Bug Blocks: | |||
Attachments: |
Bug 30629: fix <span> in title of some pages
Bug 30629: fix <span> in title of some pages Bug 30629: fix <span> in title of some pages Bug 30629: fix <span> in title of some pages |
Description
Katrin Fischer
2022-04-27 15:18:25 UTC
Maybe keep the span in PROCESS and remove them in <title> creation. I've tryed but could not use filters on a PROCESS. It would be nice to have at least the *possibility* of using a construction like "[% t('Layouts') | html %]" as proposed in Bug 26932. This would prevent a lot of ugly cases like this were we add useless <span>s. Bug 26932 looks like a typo, it's unrelated. Searching for <title> that processes a BLOCK with [% PROCESS %] shows that the following pages are affected: modules/admin/aqplan.tt block defined in budget_planning.inc patroncards/manage.tt block defined in same template labels/label-manage.tt block defined in same template Maybe we could have a TT filter that removes all HTML tags. Looks like it does not exist in current lib : http://template-toolkit.org/docs/manual/Filters.html Created attachment 134989 [details] [review] Bug 30629: fix <span> in title of some pages == Test plan == 1. Go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout 2. See that the page title in your browser window title is wrong because it contains <span> 3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch 4. See that the page title in your browser window title is wrong because it contains <span> 5. Go to http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl 6. Administration => Budgets => Click on a budget => planning => plan by months 7. See that the page title in your browser window title is wrong because it contains <span> 8. Refresh the pages and see that the titles are correct 9. Sign off :) Created attachment 134990 [details] [review] Bug 30629: fix <span> in title of some pages == Test plan == 1. Go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout 2. See that the page title in your browser window title is wrong because it contains <span> 3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch 4. See that the page title in your browser window title is wrong because it contains <span> 5. Go to http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl 6. Administration => Budgets => Click on a budget => planning => plan by months 7. See that the page title in your browser window title is wrong because it contains <span> 8. Refresh the pages and see that the titles are correct 9. Sign off :) (In reply to Fridolin Somers from comment #5) > Maybe we could have a TT filter that removes all HTML tags. Looks like it would be a workaround on top of the other workaround which is our use of <span> to guide the translation string extractor. t() works though. Testing note: translatability has been checked. And it's a string change so mind the string freeze. Because even if the strings are the same. They are moved from the staff .po to the messages .po and there is no existing occurrence of at least one of the strings. Created attachment 135001 [details] [review] Bug 30629: fix <span> in title of some pages == Test plan == 1. Go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout 2. See that the page title in your browser window title is wrong because it contains <span> 3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch 4. See that the page title in your browser window title is wrong because it contains <span> 5. Go to http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl 6. Administration => Budgets => Click on a budget => planning => plan by months 7. See that the page title in your browser window title is wrong because it contains <span> 8. Refresh the pages and see that the titles are correct 9. Sign off :) Signed-off-by: David Nind <david@davidnind.com> Created attachment 135096 [details] [review] Bug 30629: fix <span> in title of some pages == Test plan == 1. Go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout 2. See that the page title in your browser window title is wrong because it contains <span> 3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch 4. See that the page title in your browser window title is wrong because it contains <span> 5. Go to http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl 6. Administration => Budgets => Click on a budget => planning => plan by months 7. See that the page title in your browser window title is wrong because it contains <span> 8. Refresh the pages and see that the titles are correct 9. Sign off :) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 22.11. Nice work everyone, thanks! Pushed to 22.05.x for 22.05.01 that one depends on 29602, not sure it is relevant for 21.11.x. |