PythonQ 248-8XX Manual de usuario Pagina 254

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 299
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 253
Chapter 12
Adding the transliteration tool to the display
template
Next, we add the code to display the transliteration control on the OPAC pages. We
add this block of code to the
masthead. inc
file in the folder
koha -tmpl /opac -tmpl/
prog /en /includes
/. The
masthead. inc
file is included in all OPAC pages that have
the Search tool on the top. Let's edit the file:
koha @linux: /home /koha /kohaclone # vi koha -tmpl /opac - tmpl /prog /en/
includes /masthead. inc
And, add this block of code:
<! -- TMPL IF NAME = "ms value" -->
<input type = "textbox" id = "transll" name = "q" value = " <! -- TMPL_VAR
ESCAPE= "HTML" NAME= "ms_value"
- ->" class = "left" style= "width:35 %;
font -size: 100 %; " / > <div id= "translControl " > < /div>
<! -- TMPL_ELSE -->
<input type = "textbox" id = "transll" name = "q" class = "left"
style = "width: 35 %; font -size: 100%; " / ><div id= "translControl " >< /div>
Editing the Perl scripts to enable the system
preference
And finally, we need a mechanism to look up the value (on or off) of the system
preference in the database, and pass that value to the template files. We edit the
opac -main .pl
file in the folder opac:
koha@linux:/home/koha/kohaclone # vi opac/opac-main.pl
And add this block of code somewhere near the bottom of the file:
# If GooglelndicTransliteration system preference is On Set parameter
to load Google's JavaScript in OPAC search screens
if (C4:: Context -> preference ('GooglelndicTransliteration'))
$ template- >param(' GooglelndicTransliteration' => 1);
}
Do the same in the opac -search.pl
in the folder opac.
[ 239 ]
Vista de pagina 253
1 2 ... 249 250 251 252 253 254 255 256 257 258 259 ... 298 299

Comentarios a estos manuales

Sin comentarios