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_method/view_methods.tpl
2011-05-03 09:49:01 +10:00

76 lines
3.4 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/search_show_pre.tpl'}
{$method->exe_noauth($meth.0,'tpl_search_show')}
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<!-- DISPLAY THE SEARCH HEADING -->
<tr valign="middle" align="center" class="table_heading">
<td style="width: 19%;" class="table_heading">{t}Authorised{/t}</td>
<td style="width: 33%;" class="table_heading">{osb f=tf field=name}</td>
<td style="width: 48%;" class="table_heading">{osb f=tf field=notes}</td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$module_method item=record}
{if $record.checked == '2'}
<tr id="row{$record.id}" class="{$record._C}">
<td style="text-align: center;"><input type="checkbox" name="hidden_record{$record.id}" value="{$record.id}" checked="checked" disabled="disabled"/></td>
{else}
<tr id="row{$record.id}" onclick="row_sel('{$record.id}',1);" onmouseover="row_mouseover('{$record.id}','row_mouse_over_select','row_mouse_over');" onmouseout="row_mouseout('{$record.id}','{$record._C}','row_select');" class="{$record._C}">
<td style="text-align: center;"><input type="checkbox" name="record{$record.id}" value="{$record.id}" onclick="row_sel('{$record.id}',1,'{$record._C}');"/></td>
{/if}
<td>{$record.name}</td>
<td>
{$record.notes|truncate:'65'}
{if $record.checked == '1'}
<script type="text/javascript">row_sel('{$record.id}',1,'{$record._C}'); record_arr[i] = '{$record.id}'; i++; </script>
{elseif $record.checked == '3'}
<script type="text/javascript">row_sel('{$record.id}',0,'{$record._C}'); record_arr[i] = '{$record.id}'; i++; </script>
{/if}
</td>
</tr>
{/foreach}
<!-- END OF RESULT LOOP -->
</table>
</td>
</tr>
</table>
</form>
{if $VAR._print != true}
<div style="text-align: center;">
<br/>{t}Note - Checkboxes that are greyed out indicate inheritance from parent groups{/t}<br/>
<br/>
<input type="submit" name="Submit" value="{osb f=tt method=update_relations}" onclick="mass_do('update_relations',module+':view_methods&amp;module_method_group_id={$VAR.module_method_group_id}&amp;module_method_module_id={$VAR.module_method_module_id}',limit,module);" class="form_button"/><br/>
<br/>
<form id="view_methods" method="post" action="" enctype="multipart/form-data">
<div>
<input type="submit" name="Deleteall" value="{t}Delete all methods for this Group{/t}" class="form_button"/>
<input type="hidden" name="_page" value="{$VAR._page}"/>
<input type="hidden" name="do[]" value="module_method:update_relations"/>
<input type="hidden" name="id" value="0,"/>
<input type="hidden" name="module_method_module_id" value="{$VAR.module_method_module_id}"/>
<input type="hidden" name="module_method_group_id" value="{$VAR.module_method_group_id}"/>
</div>
</form>
<br/>
<input type="submit" name="Submit" value="{t}Select All{/t}" onclick="all_select(record_arr);" class="form_button"/>
<input type="submit" name="Submit" value="{t}De-Select All{/t}" onclick="all_deselect(record_arr);" class="form_button"/>
</div>
{/if}
{/if}
</div>