Bugzilla – Attachment 40994 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]
Bug 14517: List shelves list is broken for translated interfaces
Bug-14517-List-shelves-list-is-broken-for-translat.patch (text/plain), 4.43 KB, created by
Jonathan Druart
on 2015-07-14 15:32:37 UTC
(
hide
)
Description:
Bug 14517: List shelves list is broken for translated interfaces
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-07-14 15:32:37 UTC
Size:
4.43 KB
patch
obsolete
>From 78fe26ae38de60ce17ecff1be3c1d1c723df7d9b 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] 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. >--- > .../virtualshelves/tables/shelves_results.tt | 35 ++++++++++++++++++---- > 1 file 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 ~%] >-- >2.1.0
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