milestone fix; maybe not perfect
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<div>{$training->get_tr_duration()} perc</div>
|
||||
</div>
|
||||
|
||||
{if $trc_coaches}
|
||||
{if $trc_coaches || $trc_helpers}
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="coaches">
|
||||
<img src="/_image/coach.png">
|
||||
|
||||
210
template/templates/user_diary_with_helpers.tpl
Normal file
210
template/templates/user_diary_with_helpers.tpl
Normal file
@@ -0,0 +1,210 @@
|
||||
<div class="list">
|
||||
|
||||
{if count($actions) == 0}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{foreach $actions as $action}
|
||||
|
||||
{if $action@first}
|
||||
<div style="margin-bottom: 30px;">
|
||||
<div class="list_item line_height14 bigger_space actual_balance">
|
||||
<span class="size20 bold">
|
||||
Aktuális egyenleg: {$action->get_de_balance()|number_format:0:'':' '} Ft
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $action->get_de_training()|is_a:'training'}
|
||||
|
||||
{if !$action@first &&
|
||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||
|
||||
||
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||
<div class="diary_header">
|
||||
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
||||
<img src="/_image/open_folder.png">
|
||||
</div>
|
||||
</span>
|
||||
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{elseif $action@first}
|
||||
<span onclick="block_action('block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_training()->get_tr_date()|substr:0:4},{$action->get_de_training()->get_tr_date()|substr:5:2})} edzés)
|
||||
<div class="diary_header">
|
||||
<span class="balance_text" id="balance_text_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}">Egyenleg</span>
|
||||
<img src="/_image/open_folder.png">
|
||||
</div>
|
||||
</span>
|
||||
<div id="block_{$action->get_de_training()->get_tr_date()|substr:0:4}{$action->get_de_training()->get_tr_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space">
|
||||
<span class="size20 bold">
|
||||
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||
{$action->get_de_training()->get_tr_date_day()}.
|
||||
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
||||
{$action->get_de_training()->get_tr_date_time()}
|
||||
</span>
|
||||
<br>
|
||||
{if $action->get_de_training()->get_tr_training_type_trt_id()}{$action->get_de_training()->get_tr_type_name_by_id()} edzés{/if}
|
||||
{$action->get_de_training()->get_tr_duration()} p
|
||||
{strip}
|
||||
{if $action->get_de_training()->is_coach() || $action->get_de_training()->is_helper()}
|
||||
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
||||
{assign var="hasCoach" value="true"}
|
||||
{if $coach_name@first}({/if}{$coach_name}{if !$coach_name@last}, {/if}
|
||||
{/foreach}
|
||||
{if !$action->get_de_training()->is_helper() && $action->get_de_training()->is_coach()}){/if}
|
||||
{if $action->get_de_training()->is_helper() && !$action->get_de_training()->is_coach()}({/if}
|
||||
{foreach $action->get_de_training()->get_tr_helpers_name() as $coach_name}
|
||||
<i>{if $coach_name@first && $action->get_de_training()->is_coach()}, {/if}{$coach_name}{if !$coach_name@last}, {else}){/if}</i>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/strip}
|
||||
|
||||
{assign var="discount" value=""}
|
||||
{if $action->get_de_has_discount()}
|
||||
{if $action->get_de_discount_id() == 1}
|
||||
{assign var="discount" value="Próba kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 2}
|
||||
{assign var="discount" value="Havi 10+ kedvezmény"}
|
||||
{elseif $action->get_de_discount_id() == 3}
|
||||
{assign var="discount" value="Duplázó kedvezmény"}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div class="extra_row">
|
||||
<span class="bold">Egyenleg: {if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span>
|
||||
{if $discount != ""}<br>{$discount}{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="side_block">
|
||||
|
||||
|
||||
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
||||
|
||||
|
||||
{if !$action@first &&
|
||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_training()->get_tr_date()|substr:5:2
|
||||
|
||||
||
|
||||
|
||||
!$action@first &&
|
||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
||||
$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2 != $actions[$action@index-1]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
{elseif $action@first}
|
||||
|
||||
<span onclick="block_action('block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4},{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png">
|
||||
</span>
|
||||
<div id="block_{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||
|
||||
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
<span class="size20 bold">
|
||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date_day()}.
|
||||
</span>
|
||||
<br>
|
||||
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
||||
</div>
|
||||
|
||||
<div class="side_block">
|
||||
{assign var="discount" value=""}
|
||||
<span class="bold" style="font-size: 20px;">{if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span><br>{$discount}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{if $action@last}
|
||||
<div class="row">
|
||||
<div class="list_item line_height14 bigger_space money_deposit">
|
||||
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
$("#balance_text_"+block_id.substr(-6)).addClass('active_header');
|
||||
|
||||
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
$("#balance_text_"+block_id.substr(-6)).removeClass('active_header');
|
||||
}
|
||||
|
||||
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>
|
||||
@@ -3,20 +3,28 @@
|
||||
{if
|
||||
$ms@first ||
|
||||
(
|
||||
$ms_array[$ms@index]->get_ms_month()|substr:5:2 != $ms_array[$ms@index-1]->get_ms_month()|substr:5:2
|
||||
$ms_array[$ms@index]->get_ms_season() != $ms_array[$ms@index-1]->get_ms_season()
|
||||
)
|
||||
|
||||
}
|
||||
{if !$ms@first &&
|
||||
$ms_array[$ms@index]->get_ms_month()|substr:5:2 != $ms_array[$ms@index-1]->get_ms_month()|substr:5:2
|
||||
$ms_array[$ms@index]->get_ms_season() != $ms_array[$ms@index-1]->get_ms_season()
|
||||
}
|
||||
</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]}
|
||||
|
||||
|
||||
<span onclick="block_action('block_{$ms_array[$ms@index]->get_ms_season()}');" class="date_separator clickable">
|
||||
<div class="full full_block_{$ms_array[$ms@index]->get_ms_season()}">
|
||||
{nl2br($ms_array[$ms@index]->get_ms_sums())}
|
||||
</div>
|
||||
<div class="short short_block_{$ms_array[$ms@index]->get_ms_season()}">
|
||||
{assign var=someVar value="\n"|explode:$ms_array[$ms@index]->get_ms_sums()}
|
||||
{$someVar[0]}
|
||||
</div>
|
||||
<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">
|
||||
<div id="block_{$ms_array[$ms@index]->get_ms_season()}" class="month_block">
|
||||
{/if}
|
||||
|
||||
{if $ms->get_ms_training_mst_id() != null}
|
||||
@@ -53,6 +61,15 @@
|
||||
{$ms->get_ms_camp_msca_id()->get_msca_place()}<br>
|
||||
</div>
|
||||
</a>
|
||||
{elseif $ms->get_ms_ranking_msr_id() != null}
|
||||
<a>
|
||||
<div class="list_item ranking">
|
||||
<img src="/_image/ranking.png">
|
||||
<strong><span class="bold" style="display: block;">Ranglista</span></strong><br>
|
||||
{$ms->get_ms_ranking_msr_id()->get_msr_date()}<br>
|
||||
{nl2br($ms->get_ms_ranking_msr_id()->get_msr_rankings())}
|
||||
</div>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -67,10 +84,16 @@
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
$(".full_"+block_id).hide();
|
||||
$(".short_"+block_id).show();
|
||||
$(".short_"+block_id).css('display', 'inline-block');
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
$(".full_"+block_id).show();
|
||||
$(".short_"+block_id).hide();
|
||||
$(".full_"+block_id).css('display', 'inline-block');
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
|
||||
Reference in New Issue
Block a user