This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/product_translate/view.tpl
2011-05-03 09:49:04 +10:00

95 lines
3.3 KiB
Smarty

{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<script type="text/javascript">
<!--
{literal}
function editTranslations(product_id) {
var language_id = document.getElementById('language_id').value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+language_id+'&product_translate_product_id='+product_id+'&_escape=1&_escape_next=1&_next_page_one=edit&_next_page_none=add&name_id1=product_translate_product_id&val_id1='+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
window.open(url,'ProductLanguage','scrollbars=yes,toolbar=no,status=no,width=700,height=650');
}
function viewTranslations(product_id) {
var language_id = document.getElementById('language_id').value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+language_id+'&product_translate_product_id='+product_id+'&_next_page_one=view&_next_page_none=add&name_id1=product_translate_product_id&val_id1='+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
document.location = url;
}
{/literal}
// -->
</script>
<!-- Display each record -->
<form id="view" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="table_heading">&nbsp;</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr>
<td class="body"><b>{$list->menu_files('','language_id',$record.language_id,'language','','_core.xml',"\" onchange=\"viewTranslations(`$record.product_id`);") } <a href="javascript:editTranslations({$record.product_id});">{t}Edit{/t}</a></b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=name}</b></td>
</tr>
<tr>
<td>{$record.name}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=description_short}</b></td>
</tr>
<tr>
<td>{$record.description_short}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=description_full}</b></td>
</tr>
<tr>
<td>{$record.description_full}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if}