Initial Commit of AgileBill Open Source
This commit is contained in:
65
themes/default/blocks/report/add.tpl
Normal file
65
themes/default/blocks/report/add.tpl
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
|
||||
<!-- Display the form validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display the form to collect the input values -->
|
||||
<form id="report_add" name="report_add" method="post" action="">
|
||||
{$COOKIE_FORM}
|
||||
<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">
|
||||
<center>
|
||||
{translate module=report}title_add{/translate}
|
||||
</center>
|
||||
</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=report}
|
||||
field_template
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_template" value="{$VAR.report_template}" {if $report_template == true}class="form_field_error"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_nickname
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_nickname" value="{$VAR.report_nickname}" {if $report_nickname == true}class="form_field_error"{/if}>
|
||||
</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="report:view">
|
||||
<input type="hidden" name="_page_current" value="report:add">
|
||||
<input type="hidden" name="do[]" value="report:add">
|
||||
<input type="hidden" name="report_date_last" value="{$smarty.now}">
|
||||
<input type="hidden" name="report_date_last2" value="{$smarty.now}">
|
||||
<input type="hidden" name="report_module" value="{$VAR.report_module}">
|
||||
<input type="hidden" name="report_template" value="{$VAR.report_template}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
153
themes/default/blocks/report/generate.tpl
Normal file
153
themes/default/blocks/report/generate.tpl
Normal file
@@ -0,0 +1,153 @@
|
||||
{$method->exe_noauth("report","get_user_criteria")}
|
||||
|
||||
<!-- Display the form to collect the input values -->
|
||||
<form name="report_view" method="post" action="" target="_blank">
|
||||
<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="row1">
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||||
{foreach from=$userCriteria item=field}
|
||||
<tr valign="top">
|
||||
<td width="36%">
|
||||
{$field.display}
|
||||
</td>
|
||||
<td width="54%">
|
||||
|
||||
<!-- date handling -->
|
||||
{if $field.type == 'date'}
|
||||
{html_menu_search_expr type=date module=report field=$field.name}
|
||||
{$list->calender_add("report[conditions][`$field.name`][value][]", "", "")}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<br>
|
||||
{html_menu_search_expr type=date module=report field=$field.name}
|
||||
{$list->calender_add("report[conditions][`$field.name`][value][]", "", "")}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
|
||||
<!-- year handling -->
|
||||
{elseif $field.type == 'date_year'}
|
||||
{html_menu_search_expr type=dateex module=report field=$field.name}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<input name="report[conditions][{$field.name}][value][]" type="text" value="{$field.value}" size="4" maxlength="4"> Example: 2005
|
||||
<br>
|
||||
{html_menu_search_expr type=dateex module=report field=$field.name}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<input name="report[conditions][{$field.name}][value][]" type="text" value="{$field.value}" size="4" maxlength="4"> Example: 2006
|
||||
|
||||
<!-- year/month handling -->
|
||||
{elseif $field.type == 'date_year_month'}
|
||||
{html_menu_search_expr type=dateex module=report field=$field.name}
|
||||
<select name="report[conditions][{$field.name}][value][month][]">
|
||||
<option></option>
|
||||
<option value="1">Jan (1)</option>
|
||||
<option value="2">Feb (2)</option>
|
||||
<option value="3">Mar (3)</option>
|
||||
<option value="4">Apr (4)</option>
|
||||
<option value="5">May (5)</option>
|
||||
<option value="6">Jun (6)</option>
|
||||
<option value="7">Jul (7)</option>
|
||||
<option value="8">Aug (8)</option>
|
||||
<option value="9">Oct (9)</option>
|
||||
<option value="10">Sep (10)</option>
|
||||
<option value="11">Nov (11)</option>
|
||||
<option value="12">Dec (12)</option>
|
||||
</select>
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<input name="report[conditions][{$field.name}][value][year][]" type="text" value="{$field.value}" size="4" maxlength="4"> Example: 2005
|
||||
<br>
|
||||
{html_menu_search_expr type=dateex module=report field=$field.name}
|
||||
<select name="report[conditions][{$field.name}][value][month][]">
|
||||
<option></option>
|
||||
<option value="1">Jan (1)</option>
|
||||
<option value="2">Feb (2)</option>
|
||||
<option value="3">Mar (3)</option>
|
||||
<option value="4">Apr (4)</option>
|
||||
<option value="5">May (5)</option>
|
||||
<option value="6">Jun (6)</option>
|
||||
<option value="7">Jul (7)</option>
|
||||
<option value="8">Aug (8)</option>
|
||||
<option value="9">Oct (9)</option>
|
||||
<option value="10">Sep (10)</option>
|
||||
<option value="11">Nov (11)</option>
|
||||
<option value="12">Dec (12)</option>
|
||||
</select>
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<input name="report[conditions][{$field.name}][value][year][]" type="text" value="{$field.value}" size="4" maxlength="4"> Example: 2006
|
||||
|
||||
<!-- boolean handling -->
|
||||
{elseif $field.type == 'bool'}
|
||||
{html_menu_search_expr type=exact module=report field=$field.name}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<select name="report[conditions][{$field.name}][value][]">
|
||||
<option value="" {if $field.value == ""}selected{/if}></option>
|
||||
<option value="1" {if $field.value == "1"}selected{/if}>True</option>
|
||||
<option value="0" {if $field.value == "0"}selected{/if}>False</option>
|
||||
</select>
|
||||
|
||||
<!-- text handling -->
|
||||
{elseif $field.type == 'text'}
|
||||
{html_menu_search_expr type=text module=report field=$field.name}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
<input type="text" name="report[conditions][{$field.name}][value][]" value="{$field.value}">
|
||||
|
||||
<!-- menu handling -->
|
||||
{elseif $field.type == 'menu' }
|
||||
{html_menu_search_expr type=exact module=report field=$field.name}
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
{if $field.values}
|
||||
<select name="report[conditions][{$field.name}][value][]">
|
||||
<option></option>
|
||||
{html_options options=$field.values }
|
||||
</select>
|
||||
{else if $field.table}
|
||||
{ $list->menu("no", "report[conditions][`$field.name`][value][]", "`$field.table`", "`$field.col_name`", "all", "") }
|
||||
{/if}
|
||||
|
||||
<!-- account autoselector -->
|
||||
{elseif $field.type == 'auto_account' }
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
{html_menu_search_expr type=exact module=report field=$field.name}
|
||||
{html_select_account name="report[conditions][`$field.name`][value][]"}
|
||||
|
||||
<!-- affiliate autoselector -->
|
||||
{elseif $field.type == 'auto_affiliate' }
|
||||
<input type="hidden" name="report[conditions][{$field.name}][type][]" value="{$field.type}">
|
||||
{html_menu_search_expr type=exact module=report field=$field.name}
|
||||
{html_select_affiliate name="report[conditions][`$field.name`][value][]"}
|
||||
{/if}
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr valign="top">
|
||||
<td width="36%">Rendering Format:</td>
|
||||
<td width="54%">
|
||||
<div align="left">
|
||||
<select name="report_format">
|
||||
<option value="html">HTML</option>
|
||||
<option value="pdf">PDF</option>
|
||||
<option value="text">TEXT</option>
|
||||
</select>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><input type="submit" name="Submit" value="Submit">
|
||||
<input type="hidden" name="_page" value="core:blank">
|
||||
<input type="hidden" name="report_output" value="">
|
||||
<input type="hidden" name="_escape" value="1">
|
||||
<input type="hidden" name="do[]" value="report:view">
|
||||
<input type="hidden" name="report_module" value="{$VAR.report_module}">
|
||||
<input type="hidden" name="report_template" value="{$VAR.report_template}"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
55
themes/default/blocks/report/main.tpl
Normal file
55
themes/default/blocks/report/main.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
<form name="form1" 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" align="center">
|
||||
<tr>
|
||||
<td class="table_heading">
|
||||
<center>
|
||||
{translate module=report}
|
||||
menu_view
|
||||
{/translate}
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" valign="top">
|
||||
<table width="100%" border="0" cellpadding="5" class="row1">
|
||||
<tr valign="top">
|
||||
<td width="33%">
|
||||
{translate module=report}
|
||||
module_select
|
||||
{/translate}
|
||||
</td>
|
||||
<td width="33%">
|
||||
{if $VAR.report_module != ""}
|
||||
{translate module=report}
|
||||
report_select
|
||||
{/translate}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="33%">
|
||||
{$method->exe_noauth("report","module_menu")}
|
||||
</td>
|
||||
<td width="33%">
|
||||
{if $VAR.report_module != ""}
|
||||
{$method->exe_noauth("report","report_menu")}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p>
|
||||
{if $VAR.report_template != "" && $VAR.report_module != "" }
|
||||
{$block->display("report:generate")}
|
||||
{/if}
|
||||
</p>
|
9
themes/default/blocks/report/output.tpl
Normal file
9
themes/default/blocks/report/output.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
|
||||
<tr valign="top">
|
||||
<td width="33%">Save </td>
|
||||
<td width="33%"><a href="?_page=core:blank&_escape=1&do%5B%5D=report:generate&">View</a>
|
||||
</td>
|
||||
<td width="33%">Download </td>
|
||||
</tr>
|
||||
</table>
|
98
themes/default/blocks/report/search_form.tpl
Normal file
98
themes/default/blocks/report/search_form.tpl
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
{ $method->exe("report","search_form") }
|
||||
{ if ($method->result == FALSE) }
|
||||
{ $block->display("core:method_error") }
|
||||
{else}
|
||||
|
||||
<form name="report_search" method="post" action="">
|
||||
{$COOKIE_FORM}
|
||||
<table width="500" 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">
|
||||
<center>
|
||||
{translate module=report}title_search{/translate}
|
||||
</center>
|
||||
</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=report}
|
||||
field_date_orig
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_date_orig" value="{$VAR.report_date_orig}" {if $report_date_orig == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_date_last
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{ $list->calender_search("report_date_last", $VAR.report_date_last, "form_field", "") }
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_template
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_template" value="{$VAR.report_template}" {if $report_template == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_nickname
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_nickname" value="{$VAR.report_nickname}" {if $report_nickname == true}class="form_field_error"{/if}> {translate}search_partial{/translate}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Define the results per page -->
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">{translate}search_results_per{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="limit" size="5" value="{$report_limit}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Define the order by field per page -->
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%">{translate}search_order_by{/translate}</td>
|
||||
<td width="65%">
|
||||
<select class="form_menu" name="order_by">
|
||||
{foreach from=$report item=record}
|
||||
<option value="{$record.field}">{$record.translate}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="row1" valign="top">
|
||||
<td width="35%"></td>
|
||||
<td width="65%">
|
||||
<input type="submit" name="Submit" value="{translate}search{/translate}" class="form_button">
|
||||
<input type="hidden" name="_page" value="core:search">
|
||||
<input type="hidden" name="_escape" value="Y">
|
||||
<input type="hidden" name="module" value="report">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{ $block->display("core:saved_searches") }
|
||||
{ $block->display("core:recent_searches") }
|
||||
{/if}
|
119
themes/default/blocks/report/search_show.tpl
Normal file
119
themes/default/blocks/report/search_show.tpl
Normal file
@@ -0,0 +1,119 @@
|
||||
|
||||
|
||||
{$method->exe("report","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 = 'report';
|
||||
{/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="5%" class="table_heading"> </td>
|
||||
<td width="23.75%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=report}field_date_orig{/translate}{literal}','date_orig'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="23.75%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=report}field_date_last{/translate}{literal}','date_last'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="23.75%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=report}field_template{/translate}{literal}','template'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<td width="23.75%" class="table_heading">
|
||||
{literal}
|
||||
<script language="JavaScript">
|
||||
document.write(search_heading('{/literal}{translate module=report}field_nickname{/translate}{literal}','nickname'));
|
||||
</script>
|
||||
{/literal}
|
||||
</td>
|
||||
<!-- LOOP THROUGH EACH RECORD -->
|
||||
{foreach from=$report item=record}
|
||||
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=report:view&id={$record.id},{$COOKIE_URL}';" 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="5%">
|
||||
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
|
||||
</td>
|
||||
<td> {$record.date_orig}</td>
|
||||
<td> {$list->date_time($record.date_last)}</td>
|
||||
<td> {$record.template}</td>
|
||||
<td> {$record.nickname}</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 $VAR._print != TRUE}<br>
|
||||
<center>
|
||||
<input type="submit" name="Submit" value="{translate}view_edit{/translate}" onClick="mass_do('', module+':view', limit, module);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}delete{/translate}" onClick="mass_do('delete', module+':search_show&search_id={$search_id}&page={$page}&order_by={$order}&{$sort}{$COOKIE_URL}', limit, module);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}select_all{/translate}" onClick="all_select(record_arr);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}deselect_all{/translate}" onClick="all_deselect(record_arr);" class="form_button">
|
||||
<input type="submit" name="Submit" value="{translate}range_select{/translate}" onClick="all_range_select(record_arr,limit);" class="form_button">
|
||||
<br>
|
||||
</center>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
127
themes/default/blocks/report/view.tpl
Normal file
127
themes/default/blocks/report/view.tpl
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
{ $method->exe("report","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
|
||||
|
||||
{literal}
|
||||
<!-- Define the update delete function -->
|
||||
<script language="JavaScript">
|
||||
<!-- START
|
||||
var module = 'report';
|
||||
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&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=$report item=report} <a name="{$report.id}"></a>
|
||||
|
||||
<!-- Display the field validation -->
|
||||
{if $form_validation}
|
||||
{ $block->display("core:alert_fields") }
|
||||
{/if}
|
||||
|
||||
<!-- Display each record -->
|
||||
<form name="report_view" method="post" action="">
|
||||
{$COOKIE_FORM}
|
||||
<table width="500" 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">
|
||||
<center>
|
||||
{translate module=report}title_view{/translate}
|
||||
</center>
|
||||
</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=report}
|
||||
field_date_orig
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{$list->date_time($report.date_orig)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_date_last
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
{$list->date_time($report.date_last)}
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_template
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_template" value="{$report.template}" size="32">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="35%">
|
||||
{translate module=report}
|
||||
field_nickname
|
||||
{/translate}</td>
|
||||
<td width="65%">
|
||||
<input type="text" name="report_nickname" value="{$report.nickname}" 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('{$report.id}','{$VAR.id}');">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="_page" value="report:view">
|
||||
<input type="hidden" name="report_id" value="{$report.id}">
|
||||
<input type="hidden" name="do[]" value="report:update">
|
||||
<input type="hidden" name="id" value="{$VAR.id}">
|
||||
</form>
|
||||
{/foreach}
|
||||
{/if}
|
Reference in New Issue
Block a user