150 lines
5.6 KiB
Smarty
150 lines
5.6 KiB
Smarty
|
{ $block->display("core:top_clean") }
|
||
|
|
||
|
{ $method->exe("module_method","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else} <br>
|
||
|
|
||
|
{literal}
|
||
|
<script src="themes/{/literal}{$THEME_NAME}{literal}/view.js"></script>
|
||
|
<script language="JavaScript">
|
||
|
var module = 'module_method';
|
||
|
var locations = '{/literal}{$VAR.module_id}{literal}';
|
||
|
var id = '{/literal}{$VAR.id}{literal}';
|
||
|
var ids = '{/literal}{$VAR.ids}{literal}';
|
||
|
var array_id = id.split(",");
|
||
|
var array_ids = ids.split(",");
|
||
|
var num=0;
|
||
|
if(array_id.length > 2) {
|
||
|
document.location = '?_page='+module+':view&id='+array_id[0]+'&ids='+id;
|
||
|
}else if (array_ids.length > 2) {
|
||
|
document.write(view_nav_top(array_ids,id,ids));
|
||
|
}
|
||
|
|
||
|
function delete_record(id,ids)
|
||
|
{
|
||
|
temp = window.confirm("{/literal}{translate}alert_delete{/translate}{literal}");
|
||
|
if(temp == false) return;
|
||
|
|
||
|
var replace_id = id + ",";
|
||
|
ids = ids.replace(replace_id, '');
|
||
|
if(ids == '') {
|
||
|
var url = '?_page=core:search&module=' + module + '&do[]=' + module + ':delete&delete_id=' + id + COOKIE_URL;
|
||
|
window.location = url;
|
||
|
return;
|
||
|
} else {
|
||
|
var page = 'view&id=' +ids;
|
||
|
}
|
||
|
|
||
|
var doit = 'delete';
|
||
|
var url = '?_page='+ module +':'+ page +'&do[]=' + module + ':' + doit + '&delete_id=' + id + COOKIE_URL;
|
||
|
window.location = url;
|
||
|
}
|
||
|
// END -->
|
||
|
</script>
|
||
|
{/literal}
|
||
|
|
||
|
<!-- Loop through each record -->
|
||
|
{foreach from=$module_method item=module_method} <a name="{$module_method.id}"></a>
|
||
|
|
||
|
<!-- Display the field validation -->
|
||
|
{if $form_validation}
|
||
|
{ $block->display("core:alert_fields") }
|
||
|
{/if}
|
||
|
|
||
|
<!-- Display each record -->
|
||
|
<form name="update_form" method="post" action="">
|
||
|
|
||
|
<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 width="65%" class="table_heading">
|
||
|
<div align="center">
|
||
|
{translate module=module_method}
|
||
|
title_view
|
||
|
{/translate}
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr valign="top">
|
||
|
<td width="65%" class="row1">
|
||
|
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||
|
<tr class="row0" valign="top">
|
||
|
<td width="35%">
|
||
|
{translate module=module_method}
|
||
|
field_name
|
||
|
{/translate}
|
||
|
</td>
|
||
|
<td width="65%">
|
||
|
<input type="text" name="module_method_name" value="{$module_method.name}" size="32">
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="row1" valign="top">
|
||
|
<td width="35%">
|
||
|
{translate module=module_method}
|
||
|
field_notes
|
||
|
{/translate}
|
||
|
</td>
|
||
|
<td width="65%">
|
||
|
<textarea name="module_method_notes" cols="45" rows="5" >{$module_method.notes}</textarea>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="row1" valign="top">
|
||
|
<td width="35%">
|
||
|
{translate module=module_method}
|
||
|
field_module_id
|
||
|
{/translate}
|
||
|
</td>
|
||
|
<td width="65%">
|
||
|
{ $list->menu("", "module_method_module_id", "module", "name", $module_method.module_id, "form_menu") }
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="row3" valign="top">
|
||
|
<td width="35%">
|
||
|
{translate module=module_method}
|
||
|
field_menu_display
|
||
|
{/translate}
|
||
|
</td>
|
||
|
<td width="65%">
|
||
|
{ $list->bool("module_method_menu_display", $module_method.menu_display, "form_menu") }
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="row4" valign="top">
|
||
|
<td width="35%">
|
||
|
{translate module=module_method}
|
||
|
field_page
|
||
|
{/translate}
|
||
|
</td>
|
||
|
<td width="65%">
|
||
|
<input type="text" name="module_method_page" value="{$module_method.page}" size="32">
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="row1" valign="middle" align="left">
|
||
|
<td width="35%"></td>
|
||
|
<td width="65%">
|
||
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
|
||
|
</td>
|
||
|
<td align="right">
|
||
|
<input type="button" name="delete" value="{translate}delete{/translate}" class="form_button" onClick="delete_record('{$module_method.id}','{$VAR.id}');">
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<input type="hidden" name="_page" value="module_method:view">
|
||
|
<input type="hidden" name="module_method_id" value="{$module_method.id}">
|
||
|
<input type="hidden" name="do[]" value="module_method:update">
|
||
|
<input type="hidden" name="id" value="{$VAR.id}">
|
||
|
</form>
|
||
|
{/foreach}
|
||
|
{/if}
|