Description
Tomás Cohen Arazi (tcohen)
2018-10-28 11:41:10 UTC
I'll try to provide a fix tomorrow. Just a note for anyone beating me due to timezones: if we changed the template filter to (say) 'url' to fix this, we might be just hiding the fact that we shouldn't build the links in the .pl script. It should be done in the templates, using the 'uri' filter for the query parameters. Created attachment 81405 [details] [review] Bug 21704: Edit framework subfield link is broken (TT filter) This patch removes URL building from the controller (admin/marctagstructure.pl) and does it on the templates, using the right 'uri' filter for the query parameters. It also removes: - No longer used attributes that are passed to the template - Duplicated code in the templates To test: - Go to Home > Administration > MARC bibliographic framework - On any of the listed frameworks, pick the 'MARC structure' action in the dropdown - On any subfield, hover on the actions dropdown => FAIL: The URLs are wrongly formed - Click on the links => FAIL: You get errors because of the bad URL - Apply this patch - Reload the 'MARC structure' page - On any subfield, hover on the actions dropdown => SUCCESS: LInks look correct - Click on any of them => SUCCESS: They work! - Use the 'Display only used tags/subfields' checkbox => SUCCESS: No behaviour change! - Sign off :-D Created attachment 81407 [details] [review] Bug 21704: (follow-up) Remove unused 'frameworkcode' template param This patch removes the 'frameworkcode' template parameter. Now the 'framework' object is passed, and everytime the frameworkcode is needed on the template, framework.frameworkcode is called. To test: - Apply this patch - Run: $ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt => SUCCESS: There's no use of 'frameworkcode' in the template - Sign off :-D Created attachment 81428 [details] [review] Bug 21704: Edit framework subfield link is broken (TT filter) This patch removes URL building from the controller (admin/marctagstructure.pl) and does it on the templates, using the right 'uri' filter for the query parameters. It also removes: - No longer used attributes that are passed to the template - Duplicated code in the templates To test: - Go to Home > Administration > MARC bibliographic framework - On any of the listed frameworks, pick the 'MARC structure' action in the dropdown - On any subfield, hover on the actions dropdown => FAIL: The URLs are wrongly formed - Click on the links => FAIL: You get errors because of the bad URL - Apply this patch - Reload the 'MARC structure' page - On any subfield, hover on the actions dropdown => SUCCESS: LInks look correct - Click on any of them => SUCCESS: They work! - Use the 'Display only used tags/subfields' checkbox => SUCCESS: No behaviour change! - Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 81429 [details] [review] Bug 21704: (follow-up) Remove unused 'frameworkcode' template param This patch removes the 'frameworkcode' template parameter. Now the 'framework' object is passed, and everytime the frameworkcode is needed on the template, framework.frameworkcode is called. To test: - Apply this patch - Run: $ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt => SUCCESS: There's no use of 'frameworkcode' in the template - Sign off :-D Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> We need another patch for authority frameworks: bug 21706 Created attachment 81432 [details] [review] Bug 21704: Edit framework subfield link is broken (TT filter) This patch removes URL building from the controller (admin/marctagstructure.pl) and does it on the templates, using the right 'uri' filter for the query parameters. It also removes: - No longer used attributes that are passed to the template - Duplicated code in the templates To test: - Go to Home > Administration > MARC bibliographic framework - On any of the listed frameworks, pick the 'MARC structure' action in the dropdown - On any subfield, hover on the actions dropdown => FAIL: The URLs are wrongly formed - Click on the links => FAIL: You get errors because of the bad URL - Apply this patch - Reload the 'MARC structure' page - On any subfield, hover on the actions dropdown => SUCCESS: LInks look correct - Click on any of them => SUCCESS: They work! - Use the 'Display only used tags/subfields' checkbox => SUCCESS: No behaviour change! - Sign off :-D Sponsored-by: Theke Solutions Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 81433 [details] [review] Bug 21704: (follow-up) Remove unused 'frameworkcode' template param This patch removes the 'frameworkcode' template parameter. Now the 'framework' object is passed, and everytime the frameworkcode is needed on the template, framework.frameworkcode is called. To test: - Apply this patch - Run: $ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt => SUCCESS: There's no use of 'frameworkcode' in the template - Sign off :-D Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 81434 [details] [review] Bug 21704: (QA follow-up) Fix evil tabs Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Awesome work all! Pushed to master for 18.11 Caused by bug 13618 not in 18.05.x series. |