search in user list
loading gif lists can be closed and opened number of trainings at diary
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="list">
|
||||
{foreach $training_array as $training}
|
||||
<div class="bigger_space">
|
||||
|
||||
{if
|
||||
$training@first ||
|
||||
(
|
||||
@@ -8,11 +8,19 @@
|
||||
)
|
||||
|
||||
}
|
||||
{if !$training@first &&
|
||||
$training_array[$training@index]->get_tr_date()|substr:5:2 != $training_array[$training@index-1]->get_tr_date()|substr:5:2
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
<span class="date_separator">{$training_array[$training@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$training->get_tr_date()|substr:0:4},{$training->get_tr_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}" class="month_block">
|
||||
{/if}
|
||||
<div class="list_item line_height14">
|
||||
<div class="list_item line_height14 bigger_space">
|
||||
<span class="size20 bold">
|
||||
{$training->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
@@ -29,6 +37,40 @@
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if $training@last}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</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