jb-data.de/template/tpl/ajax/kal_load.tpl
2025-08-11 22:23:30 +02:00

459 lines
21 KiB
Smarty

<!-- MA auswahl -->
<section class="col-md-12">
<div class="row sortable">
<!-- Januar -->
<div class="col-md-1">
{if $heute==1} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading" padding-left: 0>Jan.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.1 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- Dienstag -->
<div class="col-md-1">
{if $heute==2} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Feb.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.2 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<!-- <div id="MyDiv"><nobr> -->
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- März -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">März</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.3 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- März -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">April</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.4 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- Mai -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Mai</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.5 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- März -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Juni</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.6 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- Juli -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Juli</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.7 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- 8 -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Aug.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.8 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- 9 -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Sep.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.9 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- 10 -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Okt.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.10 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- 11 -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Nov.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.11 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- Dezember -->
<div class="col-md-1">
{if $heute==3} <div class="panel panel-warning"> {else} <div class="panel panel-primary"> {/if}
<div class="panel-heading">Dez.</div>
<div class="panel-body" style="height:700px;overflow-y: noscroll;">
<table class="no style">
<tbody>
<form action="" method="post">
{foreach from=$kdata.12 item=test}
<tr>
<!-- ------------------ -->
<td {if $test.ft==1}bgcolor="#AEAEAE" {/if}
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
style="line-height:6px;font-size:10pt">
<label>
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_date({$test.time},{$maid})"
{if $test.ok!=0}checked="checked" {/if}
{if $test.ft==1} disabled {/if}
{if $test.ft==2} disabled {/if} >
{$test.time|date_format:"%d"}
</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<!-- Main Section End -->
<!-- Sidebar -->
<!----------------------------------------------
<script> var jahr = '{$jahr}';</script>
<script> var mitarbeiter = '{$maID}';</script>
{literal}
<script>
function save_date(time,maID) {
var remember = document.getElementById('info_'+time);
if (remember.checked){
var istC = 1;
}else{
var istC = 0;
}
$.ajax({
type: 'POST',
url: "ajax.php?s=kal_save&a=date_save",
dataType: 'json',
data: 'time=' + time + "&maID="+mitarbeiter+"&istC="+istC,
success: function (data) {
if(data.success == true) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 200,
newest_on_top: true,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
}
console.log(data)
}
});load_free_urlaub(mitarbeiter,jahr)
}
load_free_urlaub(mitarbeiter,jahr);
function load_free_urlaub(maID,jahr) {
$.ajax({
type: 'POST',
url: "ajax.php?s=kal_rest_u&tpl",
dataType: 'html',
data: "maID=" + maID + "&jahr="+jahr,
success: function (data) {
$("#urlaub").html(data);
console.log(data)
}
});
}
</script>
{/literal}
-->