Initial Commit of AgileBill Open Source
This commit is contained in:
104
themes/default/blocks/static_relation/add.tpl
Normal file
104
themes/default/blocks/static_relation/add.tpl
Normal file
@@ -0,0 +1,104 @@
|
||||
{ $block->display("core:top_clean") }
|
||||
|
||||
<!-- Display the form validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
|
||||
<!-- Display the form to collect the input values -->
|
||||
<form id="static_relation_add" name="static_relation_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=static_relation}
|
||||
title_add
|
||||
{/translate}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="65%" class="row1">
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_static_var_id
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->menu("no", "static_relation_static_var_id", "static_var", "name", $VAR.static_relation_static_var_id, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_module_id
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->menu("no", "static_relation_module_id", "module", "name", $VAR.static_relation_module_id, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_default_value
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="static_relation_default_value" cols="40" rows="2" {if $static_relation_default_value == true}class="form_field_error"{/if}>{$VAR.static_relation_default_value}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_description
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="static_relation_description" cols="40" rows="2" {if $static_relation_description == true}class="form_field_error"{/if}>{$VAR.static_relation_description}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_required
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->bool("static_relation_required",$VAR.static_relation_required, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_sort_order
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="static_relation_sort_order" value="{$VAR.static_relation_sort_order}" {if $static_relation_sort_order == true}class="form_field_error"{/if} size="3">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%"></td>
|
||||
<td width="65%">
|
||||
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
|
||||
<input type="hidden" name="_page" value="static_relation:view">
|
||||
<input type="hidden" name="_page_current" value="static_relation:add">
|
||||
<input type="hidden" name="do[]" value="static_relation:add">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
113
themes/default/blocks/static_relation/search_show.tpl
Normal file
113
themes/default/blocks/static_relation/search_show.tpl
Normal file
@@ -0,0 +1,113 @@
|
||||
{ $block->display("core:top_clean") }
|
||||
|
||||
{$method->exe("static_relation","search_show")}
|
||||
{if ($method->result == FALSE)}
|
||||
{$block->display("core:method_error")}
|
||||
{else}
|
||||
{if $results == 1}
|
||||
{translate results=$results}search_result_count{/translate}
|
||||
{else}
|
||||
{translate results=$results}search_results_count{/translate}
|
||||
{/if}
|
||||
<BR>
|
||||
|
||||
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
<!-- START
|
||||
var module = 'static_relation';
|
||||
{/literal}
|
||||
{if $VAR._print == TRUE}
|
||||
var p = '&_escape=y&_print=y';
|
||||
{else}
|
||||
var p = '';
|
||||
{/if}{literal}
|
||||
var IMAGE = '{/literal}{$NONSSL_IMAGE}{literal}';
|
||||
var order = '{/literal}{$order}{literal}';
|
||||
var sort1 = '{/literal}{$sort}{literal}';
|
||||
var search_id = '{/literal}{$search_id}{literal}';
|
||||
var page = {/literal}{$page}{literal};
|
||||
var pages = '{/literal}{$pages}{literal}';
|
||||
var results = '{/literal}{$results}{literal}';
|
||||
var limit = '{/literal}{$limit}{literal}';
|
||||
record_arr = new Array ({/literal}{$limit}{literal});
|
||||
var i = 0;
|
||||
// END -->
|
||||
</script>
|
||||
<SCRIPT SRC="themes/{/literal}{$THEME_NAME}{literal}/search.js"></SCRIPT>
|
||||
{/literal}
|
||||
|
||||
<!-- SHOW THE SEARCH NAVIGATION MENU -->
|
||||
<center><script language="JavaScript">document.write(search_nav_top());</script></center>
|
||||
|
||||
<!-- BEGIN THE RESULTS CONTENT AREA -->
|
||||
<div id="search_results" onKeyPress="key_handler(event);">
|
||||
<table id="main1" width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<form id="form1" name="form1" method="post" action="">
|
||||
<tr>
|
||||
<td>
|
||||
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
|
||||
<!-- DISPLAY THE SEARCH HEADING -->
|
||||
<tr valign="middle" align="center" class="table_heading">
|
||||
<td width="6%" class="table_heading"> </td>
|
||||
<td width="29%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=static_relation}field_static_var_id{/translate}{literal}','static_var_id'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="16%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=static_relation}field_module_id{/translate}{literal}','module_id'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="15%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=static_relation}field_sort_order{/translate}{literal}','sort_order'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="34%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=static_relation}field_default_value{/translate}{literal}','default_value'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- LOOP THROUGH EACH RECORD -->
|
||||
{foreach from=$static_relation item=record}
|
||||
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1); window.location='?_page=static_relation:view&id={$record.id}&_escape=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 align="center" width="6%">
|
||||
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
|
||||
</td>
|
||||
<td width="29%">
|
||||
{$record.static_var_id}
|
||||
</td>
|
||||
<td width="16%">
|
||||
{$record.module_id}
|
||||
</td>
|
||||
<td width="15%">
|
||||
{$record.sort_order}
|
||||
</td>
|
||||
<td width="34%">
|
||||
{$record.default_value}
|
||||
</td>
|
||||
</tr>
|
||||
{literal}
|
||||
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 0, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
|
||||
{/literal}
|
||||
{/foreach}
|
||||
<!-- END OF RESULT LOOP -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
|
||||
{/if}
|
||||
</div>
|
155
themes/default/blocks/static_relation/view.tpl
Normal file
155
themes/default/blocks/static_relation/view.tpl
Normal file
@@ -0,0 +1,155 @@
|
||||
{ $block->display("core:top_clean") }
|
||||
|
||||
{ $method->exe("static_relation","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else} <br>
|
||||
|
||||
{literal}
|
||||
<!-- Define the update delete function -->
|
||||
<script language="JavaScript">
|
||||
<!-- START
|
||||
var module = 'static_relation';
|
||||
var locations = '{/literal}{$VAR.module_id}{literal}';
|
||||
if (locations != "")
|
||||
{
|
||||
refresh(0,'#'+locations)
|
||||
}
|
||||
// Mass update, view, and delete controller
|
||||
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&_escape=1&delete_id=' + id ;
|
||||
window.location = url;
|
||||
return;
|
||||
} else {
|
||||
var page = 'view&id=' +ids;
|
||||
}
|
||||
|
||||
var doit = 'delete';
|
||||
var url = '?_page='+ module +':'+ page +'&_escape=1&do[]=' + module + ':' + doit + '&delete_id=' + id;
|
||||
window.location = url;
|
||||
}
|
||||
// END -->
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<!-- Loop through each record -->
|
||||
{foreach from=$static_relation item=static_relation} <a name="{$static_relation.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" align="center">
|
||||
<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=static_relation}
|
||||
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=static_relation}
|
||||
field_static_var_id
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->menu("no", "static_relation_static_var_id", "static_var", "name", $static_relation.static_var_id, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_module_id
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->menu("", "static_relation_module_id", "module", "name", $static_relation.module_id, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_default_value
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="static_relation_default_value" cols="45" rows="2" >{$static_relation.default_value}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row3" valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_description
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<textarea name="static_relation_description" cols="45" rows="2" >{$static_relation.description}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row4" valign="top">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_required
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
{ $list->bool("static_relation_required",$static_relation.required, "form_menu") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row1" valign="middle" align="left">
|
||||
<td width="35%">
|
||||
{translate module=static_relation}
|
||||
field_sort_order
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="static_relation_sort_order" value="{$static_relation.sort_order}" size="3">
|
||||
</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('{$static_relation.id}','{$VAR.id}');">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="_page" value="static_relation:view">
|
||||
<input type="hidden" name="static_relation_id" value="{$static_relation.id}">
|
||||
<input type="hidden" name="do[]" value="static_relation:update">
|
||||
<input type="hidden" name="id" value="{$VAR.id}">
|
||||
<input type="hidden" name="_escape" value="1">
|
||||
</form>
|
||||
{/foreach}
|
||||
{/if}
|
Reference in New Issue
Block a user