From: <lph...@us...> - 2008-01-24 21:15:15
|
Update of /cvsroot/tikiwiki/tiki/templates In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31483/templates Modified Files: Tag: BRANCH-1-10 translated-lang.tpl Log Message: [MOD] Adding the translate link below the language list. Index: translated-lang.tpl =================================================================== RCS file: /cvsroot/tikiwiki/tiki/templates/translated-lang.tpl,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -d -r1.10 -r1.10.2.1 --- translated-lang.tpl 8 Dec 2006 12:08:09 -0000 1.10 +++ translated-lang.tpl 24 Jan 2008 21:15:16 -0000 1.10.2.1 @@ -12,11 +12,30 @@ </select> </form> {else} {* get method to have the param in the url *} + <script type="text/javascript"> + current_page = "{$page}"; + {literal} + function quick_switch_language( element ) + { + var index = element.selectedIndex; + var option = element.options[index]; + + if( option.value == "-" ) + return; + else if( option.value == "_translate_" ) + document.location.href = "tiki-edit_translation.php?page=" + escape(current_page); + else + element.form.submit(); + } + {/literal} + </script> <form action="tiki-index.php" method="get"> - <select name="page" onchange="this.form.submit()"> + <select name="page" onchange="quick_switch_language( this )"> {section name=i loop=$trads} <option value="{$trads[i].objName}">{$trads[i].langName}</option> {/section} + <option value="-">---</option> + <option value="_translate_">{tr}Translate{/tr}</option> </select> </form> {/if} |