Bugzilla – Attachment 41624 Details for
Bug 14517
Private lists browsing broken in translated staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14517: List shelves list is broken for translated interfaces
PASSED-QA-Bug-14517-List-shelves-list-is-broken-fo.patch (text/plain), 4.55 KB, created by
Kyle M Hall (khall)
on 2015-08-18 16:01:48 UTC
(
hide
)
Description:
[PASSED QA] Bug 14517: List shelves list is broken for translated interfaces
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-08-18 16:01:48 UTC
Size:
4.55 KB
patch
obsolete
>From daf62991c843b0b803684d4235bebe7acce8e5be Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Jul 2015 16:26:36 +0100 >Subject: [PATCH] [PASSED QA] Bug 14517: List shelves list is broken for translated interfaces > >The translation script adds quotes ("") around translated string (Edit >for instance). >Which breaks the json structure. > >Example: >"dt_action": "<a style=\"cursor:pointer\"><form action='shelves.pl' >method='get'><input class="editshelf" value="Editar" type="submit" >/></form></a>" > >Test plan: >1/ On the staff interface create a private list >2/ Go to More > Lists ('Your lists' tab) >3/ Translate the templates to any language like: > $ cd misc/translator/ > $ perl translate install es-ES >4/ Enable the translated templates on the sysprefs >5/ Switch to the translated language >6/ Go to the lists page (Mas > Listas in es-ES) >The list should be displayed correctly. > >Note: There is a limitation. If a translated string contains a simple >quote ('), it will also break the json. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../virtualshelves/tables/shelves_results.tt | 35 ++++++++++++++++--- > 1 files changed, 29 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >index 01ceb8a..646b3b4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt >@@ -1,4 +1,5 @@ > [% USE KohaDates %] >+[% USE To %] > { > "sEcho": [% sEcho %], > "iTotalRecords": [% iTotalRecords %], >@@ -28,9 +29,31 @@ > } > > [% BLOCK action_form -%] >- [%- IF can_manage_shelf OR can_delete_shelf-%] >-[% IF can_manage_shelf %]<form action='shelves.pl' method='get'><input type='hidden' name='shelfnumber' value='[% shelfnumber %]' /><input type='hidden' name='op' value='modif' /><input type='submit' class='editshelf' value='Edit' /></form>[% END %][% IF can_manage_shelf OR can_delete_shelf %]<form action='shelves.pl' method='post'><input type='hidden' name='shelfoff' value='[% shelfoff %]' /><input type='hidden' name='shelves' value='1' /><input type='hidden' name='DEL-[% shelfnumber %]' value='1' /><input type='hidden' name='CONFIRM-[% shelfnumber %]' value='1' />[% IF type == 1 %]<input type='hidden' name='display' value='privateshelves' />[% ELSE %]<input type='hidden' name='display' value='publicshelves' />[% END %]<input type='submit' class='deleteshelf' onclick='return confirmDelete(MSG_CONFIRM_DELETE_LIST)' value='Delete' /></form>[% END %] >- [%- ELSE -%] >- None >- [%- END -%] >-[%- END %] >+[%~ SET action_block = '' ~%] >+[%~ IF can_manage_shelf OR can_delete_shelf ~%] >+ [%~ IF can_manage_shelf ~%] >+ [%~ action_block = '<form action="shelves.pl" method="get">' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="op" value="modif" />' ~%] >+ [%~ action_block = action_block _ '<input type="submit" class="editshelf" value="Edit" />' ~%] >+ [%~ action_block = action_block _ '</form>' ~%] >+ [%~ END ~%] >+ [%~ IF can_manage_shelf OR can_delete_shelf ~%] >+ [%~ action_block = action_block _ '<form action="shelves.pl" method="post">' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="shelfoff" value="' _ shelfoff _ '" />' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="shelves" value="1" />' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="DEL-' _ shelfnumber _ '" value="1" />' ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="CONFIRM-' _ shelfnumber _ '" value="1" />' ~%] >+ [%~ IF type == 1 ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="display" value="privateshelves" />' ~%] >+ [%~ ELSE ~%] >+ [%~ action_block = action_block _ '<input type="hidden" name="display" value="publicshelves" />' ~%] >+ [%~ END ~%] >+ [%~ action_block = action_block _ '<input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" value="Delete" />' ~%] >+ [%~ action_block = action_block _ '</form>' ~%] >+ [%~ END ~%] >+[%~ ELSE ~%] >+ [%~ SET action_block = 'None' ~%] >+[%~ END ~%] >+[%~ To.json(action_block) ~%] >+[%~ END ~%] >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14517
:
40904
|
40905
|
40994
|
41467
| 41624