96 lines
3.0 KiB
Smarty
96 lines
3.0 KiB
Smarty
<div class="list half_width">
|
|
{foreach $ms_array as $ms}
|
|
{if
|
|
$ms@first ||
|
|
(
|
|
$ms_array[$ms@index]->get_ms_month()|substr:5:2 != $ms_array[$ms@index-1]->get_ms_month()|substr:5:2
|
|
)
|
|
|
|
}
|
|
{if !$ms@first &&
|
|
$ms_array[$ms@index]->get_ms_month()|substr:5:2 != $ms_array[$ms@index-1]->get_ms_month()|substr:5:2
|
|
}
|
|
</div>
|
|
{/if}
|
|
<span onclick="block_action('block_{$ms->get_ms_month()|substr:0:4}{$ms->get_ms_month()|substr:5:2}');" class="date_separator clickable">{$ms_array[$ms@index]->get_ms_month()|substr:0:4}.
|
|
{$months[$ms_array[$ms@index]->get_ms_month()|substr:5:2]}
|
|
<img src="/_image/open_folder.png">
|
|
</span>
|
|
<div id="block_{$ms->get_ms_month()|substr:0:4}{$ms->get_ms_month()|substr:5:2}" class="month_block">
|
|
{/if}
|
|
|
|
{if $ms->get_ms_training_mst_id() != null}
|
|
<a>
|
|
<div class="list_item training">
|
|
<img src="/_image/training.png">
|
|
<strong><span style="display: block;">Edzés</span></strong><br>
|
|
{$ms->get_ms_training_mst_id()->get_mst_date()}<br>
|
|
{$ms->get_ms_training_mst_id()->get_mst_count()}<br>
|
|
{nl2br($ms->get_ms_training_mst_id()->get_mst_trainings())}
|
|
</div>
|
|
</a>
|
|
{elseif $ms->get_ms_competition_msc_id() != null}
|
|
<a>
|
|
<div class="list_item competition">
|
|
<img src="/_image/competition.png">
|
|
<strong><span class="bold" style="display: block;">Verseny</span></strong><br>
|
|
{$ms->get_ms_competition_msc_id()->get_msc_date()}<br>
|
|
{$ms->get_ms_competition_msc_id()->get_msc_name()}<br>
|
|
{$ms->get_ms_competition_msc_id()->get_msc_category()}<br>
|
|
{$ms->get_ms_competition_msc_id()->get_msc_place()}<br>
|
|
{if $ms->get_ms_competition_msc_id()->get_msc_matches() != null}
|
|
<span class="bold">Mérkőzések:</span><br>
|
|
{nl2br($ms->get_ms_competition_msc_id()->get_msc_matches())}
|
|
{/if}
|
|
</div>
|
|
</a>
|
|
{elseif $ms->get_ms_camp_msca_id() != null}
|
|
<a>
|
|
<div class="list_item camp">
|
|
<img src="/_image/camp.png">
|
|
<strong><span class="bold" style="display: block;">Edzőtábor</span></strong><br>
|
|
{$ms->get_ms_camp_msca_id()->get_msca_date()}<br>
|
|
{$ms->get_ms_camp_msca_id()->get_msca_place()}<br>
|
|
</div>
|
|
</a>
|
|
{/if}
|
|
|
|
|
|
{if $ms@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>
|