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

584 lines
25 KiB
Smarty

<section class="col-md-12">
<div class="row sortable">
<div class="col-md-4">
<div class="panel panel-warning">
<div class="panel-heading">Urlaubsplanung Auswahl</div>
{if $test==0}
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
<tr>
<td nowrap style="width:80px;font-size:12pt"> Name: </td>
<td>
<form action="" method="post" >
<select style="width:200px" name="mitarbeiter">
{foreach from=$mitarbeiterlist item=mitarbeiterlist}
<option value="{$mitarbeiterlist.id}">{$mitarbeiterlist.name}</option>
{/foreach}
</select>
</td>
<td><input style="width:50px" type="submit" name="datewahl" value="GO" /></td>
</form>
</tr>
</tbody>
</table>
</div>
{else}
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
<tr>
<td nowrap style="width:80px;font-size:12pt"> Name: </td>
<td nowrap style="width:200px;font-size:12pt">{$madata.name}</td>
<td><input style="width:50px" type="submit" disable name="datewahl" value="GO" /></td>
</tr>
</tbody>
</table>
</div>
{/if}
</div>
</div>
<!-- Vertretung -->
<div class="col-md-6">
<div class="panel panel-warning">
<div class="panel-heading">Planinfos zu MA.</div>
{if $test==0}
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
<tr>
<td nowrap style="width:55px;font-size:12pt"> Vertretung: </td>
<td>
<td nowrap style="width:270px;font-size:11pt;">
<input type="text" value="{$tour.infotext}" id="info_{$tour.id}" style="width:265px;" name="infotext[{$tour.id}]" onChange="save_info({$tour.id})"></td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
{/if}
</div>
</div>
<!-- Jahresauswahl -->
<div class="col-md-2">
<div class="panel panel-warning">
<div class="panel-heading">Auswahl Jahr</div>
{if $test==0}
<div class="panel-body">
<div class="btn-group">
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=3&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-default btn-sm">{$jahr}</button>
</a>
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=4&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
</div>
{/if}
</div>
</div>
</div>
</section>
<!-- 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=$test1 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},{$madata.mid},{$madata.g_id})"
{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=$test2 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},{$madata.mid},{$madata.g_id})"
{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=$test3 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},{$madata.mid},{$madata.g_id})"
{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=$test4 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},{$madata.mid},{$madata.g_id})"
{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=$test5 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},{$madata.mid},{$madata.g_id})"
{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=$test6 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},{$madata.mid},{$madata.g_id})"
{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=$test7 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},{$madata.mid},{$madata.g_id})"
{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=$test8 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},{$madata.mid},{$madata.g_id})"
{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=$test9 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},{$madata.mid},{$madata.g_id})"
{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=$test10 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},{$madata.mid},{$madata.g_id})"
{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=$test11 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},{$madata.mid},{$madata.g_id})"
{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=$test12 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},{$madata.mid},{$madata.g_id})"
{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 = '{$madata.mid}';</script>
{literal}
<style>
ul.nav-tabs > li {
width: 33%;
text-align: center;
}
</style>
<script>
function save_info(tourID) {
// alert($("#info_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=kal_save&a=info_save",
dataType: 'json',
data: 'tourID=' + tourID + "&info=" + $("#info_"+tourID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
function save_date(time,maID,gID) {
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="+maID+"&istC="+istC+"&gID="+gID,
success: function (data) {
if(data.success == true) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
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_save&a=load_free_urlaub",
dataType: 'json',
data: "maID=" + maID + "&jahr="+jahr,
success: function (data) {
$("#urlaub").html(data);
console.log(data)
}
});
}
</script>
{/literal}