created money expense
This commit is contained in:
90
template/templates/money_expense.tpl
Normal file
90
template/templates/money_expense.tpl
Normal file
@@ -0,0 +1,90 @@
|
||||
<div class="buttons">
|
||||
|
||||
<a href="/admin/create/money_expense" class="addbutton add-big">Új kiadás</a>
|
||||
<a href="/admin/money_expense_category" class="addbutton add-big">Kiadás kategóriák kezelése</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list full_width">
|
||||
{foreach $mox_array as $mox}
|
||||
|
||||
{if !$mox@first && $mox_array[$mox@index]->get_mox_date()|substr:5:2 != $mox_array[$mox@index-1]->get_mox_date()|substr:5:2}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $mox@first || $mox_array[$mox@index]->get_mox_date()|substr:5:2 != $mox_array[$mox@index-1]->get_mox_date()|substr:5:2}
|
||||
<span class="date_separator">{$mox_array[$mox@index]->get_mox_date()|substr:0:4}.
|
||||
{$months[$mox_array[$mox@index]->get_mox_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$mox->get_mox_date()|substr:0:4}{$mox->get_mox_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{/if}
|
||||
<a href="/admin/money_expense/{$mox->get_mox_id()}">
|
||||
<div class="list_item">
|
||||
<table class="money">
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<img src="/_image/expense.png">
|
||||
</td>
|
||||
<td class="quarter_width">
|
||||
{$mox->get_mox_date()}
|
||||
</td>
|
||||
<td class="no_mobile_show quarter_width">
|
||||
{if $mox->get_mox_money_expense_category_moxc_id()}{$mox->get_mox_moxc()->get_moxc_name()}{else}<span class="italic">nincs megadva</span>{/if}
|
||||
</td>
|
||||
<td class="no_mobile_show quarter_width">
|
||||
{$mox->get_mox_name()}
|
||||
</td>
|
||||
<td class="quarter_width">
|
||||
{$mox->get_mox_item()}
|
||||
</td>
|
||||
<td class="sum">
|
||||
{$mox->get_mox_sum()|number_format:0:'':' '} Ft
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{if $mox@last}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user