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/module/view.tpl

117 lines
4.6 KiB
Smarty
Raw Normal View History

2009-08-03 04:10:16 +00:00
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
2009-08-03 04:10:16 +00:00
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
2009-08-03 04:10:16 +00:00
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
2009-08-03 04:10:16 +00:00
<!-- 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">{osb f=tt}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row0" valign="top">
<td style="width: 35%;">{osb f=tf field=name}</td>
<td style="width: 65%;"><input type="text" name="module_name" value="{$record.name}" size="32"/></td>
</tr>
<tr class="row1" valign="top">
<td style="width: 35%;">{osb f=tf field=notes}</td>
<td style="width: 65%;"><textarea name="module_notes" cols="45" rows="5" >{$record.notes}</textarea></td>
</tr>
<tr class="row3" valign="top">
<td style="width: 35%;">{osb f=tf field=date_orig}</td>
<td style="width: 65%;">{$record.date_orig|date_format:$smarty.const.DEFAULT_DATE_FORMAT}</td>
</tr>
<tr class="row4" valign="top">
<td style="width: 35%;">{osb f=tf field=date_last}</td>
<td style="width: 65%;">
{$record.date_last|date_format:$smarty.const.DEFAULT_DATE_FORMAT}
<input type="hidden" name="module_date_last" value="{$smarty.now|date_format:$smarty.const.DEFAULT_DATE_FORMAT}"/>
</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td style="width: 35%;">{osb f=tf field=parent_id}</td>
<td style="width: 65%;">{$list->menu('','module_parent_id','module','name',$record.parent_id,'form_menu')}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td style="width: 35%;">{osb f=tf field=menu_display}</td>
<td style="width: 65%;">{$list->bool('module_menu_display',$record.menu_display)}</td>
</tr>
<tr class="row1" valign="middle" align="left">
<td style="width: 35%;">{osb f=tf field=status}</td>
<td style="width: 65%;">{$list->bool('module_status',$record.status)}</td>
</tr>
</table>
</td>
</tr>
{include file='file:../core/view_tr_submit_delete.tpl'}
</table>
</td>
</tr>
</table>
{include file='file:../core/view_post.tpl'}
</form>
<p style="text-align: center;"><a href="javascript:showMethods()">{osb f=tt module=module_method method=view}</a> &nbsp;|&nbsp; <a href="javascript:showAdd()">{osb f=tt module=module_method method=add}</a></p>
<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">{osb f=tt module=group method=title_relation}</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr class="row1" valign="middle" align="left">
<td class="width: 35%;">{t}Select Group{/t}</td>
<td class="width: 65%;">{$list->menu('no','module_method_module_id','group','name','','" onchange="showGroupPerm(this)',true)}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="text-align: center;">
<script type="text/javascript">
<!--
var module_id = {$record.id};
{literal}
function showMethods() {
showIFrame('iframe',550,400,'?_page=core:search&module=module_method&module_method_module_id='+module_id+'&_next_page_one=view');
}
function showAdd() {
showIFrame('iframe',550,300,'?_page=module_method:add&module_method_module_id='+module_id);
}
2009-08-03 04:10:16 +00:00
function showGroupPerm(obj) {
showIFrame('iframe',550,400,'?_page=module_method:view_methods'+'&module_method_group_id='+obj.value+'&module_method_module_id={/literal}{$record.id}{literal}');
}
{/literal}
//-->
</script>
<br/>
<iframe name="iframe" id="iframe" style="border:0px; width:0px; height:0px;" scrolling="auto" allowtransparency="true" frameborder="0" src="themes/{$THEME_NAME}/IEFrameWarningBypass.htm"></iframe>
</div>
{/if}