jump to presence; bigger checkbox; actual balance
This commit is contained in:
@@ -25,11 +25,11 @@ class training {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function set_tr_date($_tr_date) {
|
public function set_tr_date($_tr_date) {
|
||||||
$this->tr_date = $_tr_date;
|
$this->tr_date = $_tr_date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_tr_training_type_trt_id($_tr_training_type_trt_id) {
|
public function set_tr_training_type_trt_id($_tr_training_type_trt_id) {
|
||||||
$this->tr_training_type_trt_id = $_tr_training_type_trt_id;
|
$this->tr_training_type_trt_id = $_tr_training_type_trt_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_tr_duration($_tr_duration) {
|
public function set_tr_duration($_tr_duration) {
|
||||||
@@ -58,7 +58,7 @@ class training {
|
|||||||
|
|
||||||
public function get_tr_date_day() {
|
public function get_tr_date_day() {
|
||||||
$day = date("d", strtotime($this->tr_date));
|
$day = date("d", strtotime($this->tr_date));
|
||||||
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
if (substr($day, 0, 1) == '0') return substr($day, 1, 1);
|
||||||
return date("d", strtotime($this->tr_date));
|
return date("d", strtotime($this->tr_date));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ class training {
|
|||||||
$training_data_array = $training_data_assoc_array[0];
|
$training_data_array = $training_data_assoc_array[0];
|
||||||
foreach ($training_data_array as $field => $value) {
|
foreach ($training_data_array as $field => $value) {
|
||||||
$function_name = "set_" . $field;
|
$function_name = "set_" . $field;
|
||||||
$this->$function_name($value);
|
$this->$function_name($value);
|
||||||
}
|
}
|
||||||
$this->set_tr_coaches();
|
$this->set_tr_coaches();
|
||||||
}
|
}
|
||||||
@@ -142,9 +142,9 @@ class training {
|
|||||||
$day_of_week = date('N', strtotime($_training_value_array['tr_date']));
|
$day_of_week = date('N', strtotime($_training_value_array['tr_date']));
|
||||||
//kigyűjtük a hónap további ilyen napjait
|
//kigyűjtük a hónap további ilyen napjait
|
||||||
$last_day = date("t", strtotime($_training_value_array['tr_date']));
|
$last_day = date("t", strtotime($_training_value_array['tr_date']));
|
||||||
|
|
||||||
for ($actual_day=date('d', strtotime($_training_value_array['tr_date'])); $actual_day <= $last_day; $actual_day=$actual_day+7) {
|
for ($actual_day=date('d', strtotime($_training_value_array['tr_date'])); $actual_day <= $last_day; $actual_day=$actual_day+7) {
|
||||||
$new_tr_id = $sql->insert_into('training',
|
$new_tr_id = $sql->insert_into('training',
|
||||||
array(
|
array(
|
||||||
'tr_date' => date('Y-m', strtotime($_training_value_array['tr_date'])) . '-' . $actual_day . ' ' . date('H:i', strtotime($_training_value_array['tr_date'])),
|
'tr_date' => date('Y-m', strtotime($_training_value_array['tr_date'])) . '-' . $actual_day . ' ' . date('H:i', strtotime($_training_value_array['tr_date'])),
|
||||||
'tr_training_type_trt_id' => $_training_value_array['tr_training_type_trt_id'],
|
'tr_training_type_trt_id' => $_training_value_array['tr_training_type_trt_id'],
|
||||||
@@ -201,6 +201,8 @@ class training {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $new_tr_id;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function update_training($_training_value_array, $_tr_id) {
|
public static function update_training($_training_value_array, $_tr_id) {
|
||||||
@@ -220,7 +222,7 @@ class training {
|
|||||||
foreach ($_training_value_array['helpers'] as $coach_id) {
|
foreach ($_training_value_array['helpers'] as $coach_id) {
|
||||||
$sql->insert_into('training_coach', array('trc_training_tr_id' => $_tr_id, 'trc_coach_uc_id' => $coach_id, 'trc_helper' => 1));
|
$sql->insert_into('training_coach', array('trc_training_tr_id' => $_tr_id, 'trc_coach_uc_id' => $coach_id, 'trc_helper' => 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($_training_value_array['helpers']);
|
unset($_training_value_array['helpers']);
|
||||||
}
|
}
|
||||||
if ($_training_value_array['tr_note'] == "") {
|
if ($_training_value_array['tr_note'] == "") {
|
||||||
@@ -231,4 +233,4 @@ class training {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -42,6 +42,18 @@ div.list div.money_deposit {
|
|||||||
color: #002E4C;
|
color: #002E4C;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.list div.actual_balance {
|
||||||
|
background-color: #020372;
|
||||||
|
border-left: 2px solid #FD9500;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.list div.actual_balance:hover {
|
||||||
|
background-color: #020372;
|
||||||
|
border-left: 2px solid #FD9500;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.list_item.training {
|
.list_item.training {
|
||||||
background-color: #a1ffff;
|
background-color: #a1ffff;
|
||||||
border-left: 2px solid #0a40ff;
|
border-left: 2px solid #0a40ff;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.form_wrapper {
|
.form_wrapper {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
form > div {
|
form > div {
|
||||||
@@ -78,24 +78,24 @@ textarea:hover,
|
|||||||
input[type=text]:hover,
|
input[type=text]:hover,
|
||||||
input[type=email]:hover {
|
input[type=email]:hover {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
color: #333;
|
color: #333;
|
||||||
border-color: rgba(41, 92, 161, 0.4);
|
border-color: rgba(41, 92, 161, 0.4);
|
||||||
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
||||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
||||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset, 0 0 8px rgba(41, 92, 161, 0.6);
|
||||||
outline: 0 none;
|
outline: 0 none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coach {
|
.coach {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 3px 10px 0px 0px;
|
margin: 10px 10px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coach_type {
|
.coach_type {
|
||||||
margin: 3px 0px 0px 0px;
|
transform: scale(2);
|
||||||
|
margin: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coach_type_text {
|
.coach_type_text {
|
||||||
@@ -105,7 +105,7 @@ input[type=email]:hover {
|
|||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
form > div {
|
form > div {
|
||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px 0;
|
||||||
}
|
}
|
||||||
form > div > label,
|
form > div > label,
|
||||||
legend {
|
legend {
|
||||||
@@ -123,7 +123,7 @@ input[type=email]:hover {
|
|||||||
input[type=password],
|
input[type=password],
|
||||||
textarea,
|
textarea,
|
||||||
select {
|
select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 1250px) {
|
@media (min-width: 1250px) {
|
||||||
@@ -136,6 +136,16 @@ input[type=email]:hover {
|
|||||||
.form_wrapper {
|
.form_wrapper {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coach_type {
|
||||||
|
transform: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.coach {
|
||||||
|
float: left;
|
||||||
|
margin: 3px 10px 0px 0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 601px) {
|
@media (min-width: 601px) {
|
||||||
@@ -145,4 +155,7 @@ input[type=email]:hover {
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 680px) {
|
||||||
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ switch ($this->get_id()) {
|
|||||||
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
$training_type_assoc_array = $sql->assoc_array($training_type_query);
|
||||||
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
|
||||||
//COACH ARRAY
|
//COACH ARRAY
|
||||||
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0;";
|
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0 AND ua_name != 'Tóth Richárd';";
|
||||||
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);
|
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -164,9 +164,17 @@ if (isset($_POST['action'])) {
|
|||||||
unset($_POST['action']);
|
unset($_POST['action']);
|
||||||
|
|
||||||
$every_week = isset($_POST['every_week']);
|
$every_week = isset($_POST['every_week']);
|
||||||
|
$jumpTo = $_POST['jumpTo'];
|
||||||
|
unset($_POST['jumpTo']);
|
||||||
if ($every_week) unset($_POST['every_week']);
|
if ($every_week) unset($_POST['every_week']);
|
||||||
training::create_training($_POST, $every_week);
|
$tr_id = training::create_training($_POST, $every_week);
|
||||||
header("Location: /admin/trainings/");
|
|
||||||
|
if (!$jumpTo) {
|
||||||
|
header("Location: /admin/trainings/");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header("Location: /admin/presence/".$tr_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,68 +1,81 @@
|
|||||||
<div class="form_wrapper">
|
<div class="form_wrapper">
|
||||||
<form method="post">
|
<form method="post" id="training-create">
|
||||||
<input type="hidden" name="action" id="action" value="training_data_create">
|
<input type="hidden" name="action" id="action" value="training_data_create">
|
||||||
|
<input type="hidden" name="jumpTo" id="jumpTo" value="0">
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="tr_date">Dátum:</label>
|
<label class="desc" id="title1" for="tr_date">Dátum:</label>
|
||||||
<div><input type="text" name="tr_date" id="tr_date" title="ÉÉÉÉ-HH-NN ÓÓ:PP" placeholder="ÉÉÉÉ-HH-NN ÓÓ:PP" required></div>
|
<div><input type="text" name="tr_date" id="tr_date" title="ÉÉÉÉ-HH-NN ÓÓ:PP" placeholder="ÉÉÉÉ-HH-NN ÓÓ:PP" required></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title2" for="tr_training_type_trt_id">Típus:</label>
|
<label class="desc" id="title2" for="tr_training_type_trt_id">Típus:</label>
|
||||||
<div>
|
<div>
|
||||||
<select name="tr_training_type_trt_id" id="tr_training_type_trt_id">
|
<select name="tr_training_type_trt_id" id="tr_training_type_trt_id">
|
||||||
<option value="null"> - </option>
|
<option value="null"> - </option>
|
||||||
{foreach $training_type_assoc_array as $training_type_array}
|
{foreach $training_type_assoc_array as $training_type_array}
|
||||||
<option value="{$training_type_array.trt_id}">
|
<option value="{$training_type_array.trt_id}">
|
||||||
{$training_type_array.trt_name}
|
{$training_type_array.trt_name}
|
||||||
</option>
|
</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="tr_duration">Időtartam (perc):</label>
|
<label class="desc" id="title1" for="tr_duration">Időtartam (perc):</label>
|
||||||
<div><input type="text" name="tr_duration" id="tr_duration" required></div>
|
<div><input type="text" name="tr_duration" id="tr_duration" required></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="every_week">Minden héten ebben az időpontban: (az adott hónapban)</label>
|
<label class="desc" id="title1" for="every_week">Minden héten ebben az időpontban: (az adott hónapban)</label>
|
||||||
<div><input type="checkbox" name="every_week" id="every_week" value="1"></div>
|
<div><input type="checkbox" name="every_week" id="every_week" value="1"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" for="tr_note">Megjegyzés:</label>
|
<label class="desc" for="tr_note">Megjegyzés:</label>
|
||||||
<div>
|
<div>
|
||||||
<textarea rows="4" name="tr_note" id="tr_note"></textarea>
|
<textarea rows="4" name="tr_note" id="tr_note"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" id="title1" for="coaches">Edző(k):</label>
|
<label class="desc" id="title1" for="coaches">Edző(k):</label>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bold">Név</td>
|
<td class="bold">Név</td>
|
||||||
<td class="bold">E</td>
|
<td class="bold center">E</td>
|
||||||
<td class="bold">SE</td>
|
<td class="bold center">SE</td>
|
||||||
</tr>
|
</tr>
|
||||||
{foreach $coach_array as $coach}
|
{foreach $coach_array as $coach}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="coach">{$coach->get_ua_name()}</td>
|
<td class="coach">{$coach->get_ua_name()}</td>
|
||||||
<td><input type="checkbox" name="coaches[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
|
<td><input type="checkbox" name="coaches[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
|
||||||
<td><input type="checkbox" name="helpers[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
|
<td><input type="checkbox" name="helpers[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<input class="button black" type="submit" value="Létrehozás">
|
<input class="button black save" type="submit" value="Létrehozás">
|
||||||
</div>
|
<input class="button black jump-to" type="button" value="Létrehozás és ugrás a jelenléthez">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.jump-to').click(function () {
|
||||||
|
$('#jumpTo').val(1);
|
||||||
|
|
||||||
|
if ($('#tr_date').val().length && $('#tr_training_type_trt_id').val() != 'null' && $('#tr_duration').val().length) {
|
||||||
|
//$('#training-create').submit();
|
||||||
|
$('.save').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bold">Név</td>
|
<td class="bold">Név</td>
|
||||||
<td class="bold">E</td>
|
<td class="bold center">E</td>
|
||||||
<td class="bold">SE</td>
|
<td class="bold center">SE</td>
|
||||||
</tr>
|
</tr>
|
||||||
{foreach $coach_array as $coach}
|
{foreach $coach_array as $coach}
|
||||||
<tr>
|
<tr>
|
||||||
@@ -62,4 +62,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -102,6 +102,30 @@
|
|||||||
<div><input type="text" name="uk_facebook" id="uk_facebook"></div>
|
<div><input type="text" name="uk_facebook" id="uk_facebook"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" for="uk_shirt_size_ss_id">Pólóméret:</label>
|
||||||
|
<div>
|
||||||
|
<select name="uk_shirt_size_ss_id" id="uk_shirt_size_ss_id">
|
||||||
|
<option value="null"> - </option>
|
||||||
|
{foreach $shirt_size_assoc_array as $shirt_size_array}
|
||||||
|
<option value="{$shirt_size_array.shirt_id}">
|
||||||
|
{$shirt_size_array.shirt_name}
|
||||||
|
</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" for="uk_shirt_note">Póló megjegyzés:</label>
|
||||||
|
<div><input type="text" name="uk_shirt_note" id="uk_shirt_note"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="desc" for="uk_balance_transfer">Áthozat (Ft):</label>
|
||||||
|
<div><input type="text" name="uk_balance_transfer" id="uk_balance_transfer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" for="uk_school_sc_id">Iskola neve:</label>
|
<label class="desc" for="uk_school_sc_id">Iskola neve:</label>
|
||||||
<div>
|
<div>
|
||||||
@@ -162,30 +186,6 @@
|
|||||||
<div><input type="text" name="uk_official_age_category" id="uk_official_age_category"></div>
|
<div><input type="text" name="uk_official_age_category" id="uk_official_age_category"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="desc" for="uk_shirt_size_ss_id">Pólóméret:</label>
|
|
||||||
<div>
|
|
||||||
<select name="uk_shirt_size_ss_id" id="uk_shirt_size_ss_id">
|
|
||||||
<option value="null"> - </option>
|
|
||||||
{foreach $shirt_size_assoc_array as $shirt_size_array}
|
|
||||||
<option value="{$shirt_size_array.shirt_id}">
|
|
||||||
{$shirt_size_array.shirt_name}
|
|
||||||
</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="desc" for="uk_shirt_note">Póló megjegyzés:</label>
|
|
||||||
<div><input type="text" name="uk_shirt_note" id="uk_shirt_note"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="desc" for="uk_balance_transfer">Áthozat (Ft):</label>
|
|
||||||
<div><input type="text" name="uk_balance_transfer" id="uk_balance_transfer"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="desc" for="uk_parent_1">Szülő:</label>
|
<label class="desc" for="uk_parent_1">Szülő:</label>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1,190 +1,200 @@
|
|||||||
<div class="list">
|
<div class="list">
|
||||||
|
|
||||||
{if count($actions) == 0}
|
{if count($actions) == 0}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="list_item line_height14 bigger_space money_deposit">
|
<div class="list_item line_height14 bigger_space money_deposit">
|
||||||
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{foreach $actions as $action}
|
{foreach $actions as $action}
|
||||||
|
|
||||||
{if $action->get_de_training()|is_a:'training'}
|
{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@first &&
|
{if $action->get_de_training()|is_a:'training'}
|
||||||
$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
|
|
||||||
|
|
||||||
||
|
{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
|
|
||||||
|
|
||||||
}
|
!$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}
|
</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}.
|
<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]}
|
{$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)
|
({$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">
|
<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>
|
<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">
|
<img src="/_image/open_folder.png">
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</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">
|
<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}
|
{elseif $action@first}
|
||||||
<div class="row">
|
<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}.
|
||||||
<div class="list_item line_height14 bigger_space">
|
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||||
<span class="size20 bold">
|
({$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)
|
||||||
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
<div class="diary_header">
|
||||||
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
<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>
|
||||||
{$action->get_de_training()->get_tr_date_day()}.
|
<img src="/_image/open_folder.png">
|
||||||
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
</div>
|
||||||
{$action->get_de_training()->get_tr_date_time()}
|
</span>
|
||||||
</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">
|
||||||
<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
|
|
||||||
{if $action->get_de_training()->is_coach()}
|
|
||||||
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
|
||||||
{if $coach_name@first}({/if}{$coach_name}{if $coach_name@last}){else}, {/if}
|
|
||||||
{/foreach}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{assign var="discount" value=""}
|
{/if}
|
||||||
{if $action->get_de_has_discount()}
|
<div class="row">
|
||||||
{if $action->get_de_discount_id() == 1}
|
<div class="list_item line_height14 bigger_space">
|
||||||
{assign var="discount" value="Próba kedvezmény"}
|
<span class="size20 bold">
|
||||||
{elseif $action->get_de_discount_id() == 2}
|
{$action->get_de_training()->get_tr_date()|substr:0:4}.
|
||||||
{assign var="discount" value="Havi 10+ kedvezmény"}
|
{$months[$actions[$action@index]->get_de_training()->get_tr_date()|substr:5:2]}
|
||||||
{elseif $action->get_de_discount_id() == 3}
|
{$action->get_de_training()->get_tr_date_day()}.
|
||||||
{assign var="discount" value="Duplázó kedvezmény"}
|
{$days[$action->get_de_training()->get_tr_date_day_of_week()]}
|
||||||
{/if}
|
{$action->get_de_training()->get_tr_date_time()}
|
||||||
{/if}
|
</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
|
||||||
|
{if $action->get_de_training()->is_coach()}
|
||||||
|
{foreach $action->get_de_training()->get_tr_coaches_name() as $coach_name}
|
||||||
|
{if $coach_name@first}({/if}{$coach_name}{if $coach_name@last}){else}, {/if}
|
||||||
|
{/foreach}
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="extra_row">
|
{assign var="discount" value=""}
|
||||||
<span class="bold">Egyenleg: {if $action->get_de_balance()>0}+{/if}{$action->get_de_balance()|number_format:0:'':' '} Ft</span>
|
{if $action->get_de_has_discount()}
|
||||||
{if $discount != ""}<br>{$discount}{/if}
|
{if $action->get_de_discount_id() == 1}
|
||||||
</div>
|
{assign var="discount" value="Próba kedvezmény"}
|
||||||
</div>
|
{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="side_block">
|
<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}
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
{elseif $action->get_de_money_deposit()|is_a:'money_deposit'}
|
||||||
|
|
||||||
|
|
||||||
{if !$action@first &&
|
{if !$action@first &&
|
||||||
$actions[$action@index-1]->get_de_training()|is_a:'training' &&
|
$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
|
$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 &&
|
!$action@first &&
|
||||||
$actions[$action@index-1]->get_de_money_deposit()|is_a:'money_deposit' &&
|
$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
|
$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>
|
</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}.
|
<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]}
|
{$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)
|
({$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">
|
<img src="/_image/open_folder.png">
|
||||||
</span>
|
</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">
|
<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}
|
{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}.
|
<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]}
|
{$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)
|
({$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">
|
<img src="/_image/open_folder.png">
|
||||||
</span>
|
</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">
|
<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}
|
{/if}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="list_item line_height14 bigger_space money_deposit">
|
<div class="list_item line_height14 bigger_space money_deposit">
|
||||||
<span class="size20 bold">
|
<span class="size20 bold">
|
||||||
{$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:0:4}.
|
||||||
{$months[$actions[$action@index]->get_de_money_deposit()->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
{$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()}.
|
{$action->get_de_money_deposit()->get_mod_money_income()->get_mi_date_day()}.
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
befizetés: {$action->get_de_money_deposit()->get_mod_money_income()->get_mi_sum(true)} Ft
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="side_block">
|
<div class="side_block">
|
||||||
{assign var="discount" value=""}
|
{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}
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $action@last}
|
{if $action@last}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="list_item line_height14 bigger_space money_deposit">
|
<div class="list_item line_height14 bigger_space money_deposit">
|
||||||
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
Áthozat: <span class="bold">{$balance_transfer} Ft</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function open_block(block_id) {
|
function open_block(block_id) {
|
||||||
$("#"+block_id).slideDown("slow");
|
$("#"+block_id).slideDown("slow");
|
||||||
$("#balance_text_"+block_id.substr(-6)).addClass('active_header');
|
$("#balance_text_"+block_id.substr(-6)).addClass('active_header');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function close_block(block_id) {
|
function close_block(block_id) {
|
||||||
$("#"+block_id).slideUp("slow");
|
$("#"+block_id).slideUp("slow");
|
||||||
$("#balance_text_"+block_id.substr(-6)).removeClass('active_header');
|
$("#balance_text_"+block_id.substr(-6)).removeClass('active_header');
|
||||||
}
|
}
|
||||||
|
|
||||||
function block_action(block_id) {
|
function block_action(block_id) {
|
||||||
if ($("#"+block_id).is(':hidden')) {
|
if ($("#"+block_id).is(':hidden')) {
|
||||||
open_block(block_id);
|
open_block(block_id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
close_block(block_id);
|
close_block(block_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
var divs = $( "div[class=month_block]" );
|
var divs = $( "div[class=month_block]" );
|
||||||
$( ".list" ).find( divs ).hide();
|
$( ".list" ).find( divs ).hide();
|
||||||
var div_list = $( ".list" ).find( divs );
|
var div_list = $( ".list" ).find( divs );
|
||||||
|
|
||||||
open_block(div_list[0].id);
|
open_block(div_list[0].id);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user