477 lines
19 KiB
Smarty
477 lines
19 KiB
Smarty
<section class="col-md-9" style="background-color: #333333">
|
|
<div class="row sortable">
|
|
<div class="col-sm-6" style="margin-top: -18px;font-size:14pt;color:#fff">
|
|
<!-- Montag -->
|
|
{if $heute==1}
|
|
<p style='background-color:orange'> Montag, {$day1|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Montag, {$day1|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k1 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Mittwoch -->
|
|
{if $heute==3}
|
|
<p style='background-color:orange'> Mittwoch, {$day3|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Mittwoch, {$day3|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k3 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Freitag -->
|
|
{if $heute==5}
|
|
<p style='background-color:orange'> Freitag, {$day5|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Freitag, {$day5|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k5 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Sonntag -->
|
|
{if $heute==7}
|
|
<p style='background-color:orange'> Sonntag, {$day7|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Sonntag, {$day7|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k7 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Spaltenwechsel -->
|
|
</div>
|
|
<div class="col-sm-6" style="margin-top: -18px;font-size:14pt;color:#fff">
|
|
<!-- Dienstag -->
|
|
{if $heute==2}
|
|
<p style='background-color:orange'> Dienstag, {$day2|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Dienstag, {$day2|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k2 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Donnerstag -->
|
|
{if $heute==4}
|
|
<p style='background-color:orange'> Donnerstag, {$day4|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Donnerstag, {$day4|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k4 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Samstag -->
|
|
{if $heute==6}
|
|
<p style='background-color:orange'> Samstag, {$day6|date_format:"%d.%m.%y"}<p>
|
|
{else}
|
|
<p style='background-color:gray'> Samstag, {$day6|date_format:"%d.%m.%y"}<p>
|
|
{/if}
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k6 item=kal}
|
|
<tr style="font-size:12pt" onclick="window.location='?s=kalender&pid={$kal.pid}&edit=1&car={$kal.car}';">
|
|
{if $kal.name!=0}
|
|
<td nowrap style="width: 30px;color: red" align="center"><i class='{$kal.icon}' ></i></td>
|
|
{else}
|
|
<td nowrap style="width: 30px;color: darkorange" align="left"><i class='{$kal.icon}'></i></td>
|
|
{/if}
|
|
<td nowrap style="width:170px" align="left">{$kal.name}</td>
|
|
<td nowrap style="width:125px" align="left">{$kal.bez}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- Geburtstage -->
|
|
<p style='background-color:gray'> Geburtstage<p>
|
|
|
|
<div class="kal_f">
|
|
<table class="no style">
|
|
<tbody>
|
|
{foreach from=$k0 item=k}
|
|
<tr>
|
|
<td nowrap style="width:110px;font-size:13pt"> <b>{$k.tag}</td>
|
|
<td nowrap style="width:190px;font-size:13pt"> <b>{$k.name}</td>
|
|
<td nowrap style="font-size:13pt"> <b>({$k.alter}.)</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- Main Section End -->
|
|
|
|
<!-- Sidebar -->
|
|
|
|
<aside class="col-md-3" style="background-color: #333333">
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<div class="btn-group">
|
|
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=1&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">{$kw}.KW</button>
|
|
</a>
|
|
<a class="btn btn-primary btn-sm" href="?s=kalender&wahl=2&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
|
|
<i class="fa fa-arrow-right" aria-hidden="true"></i>
|
|
</a>
|
|
<a class='btn btn-default btn-sm href="#"'>-</a>
|
|
|
|
<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 $edit==0}
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title">Anlegen/bearbeiten</h2></header>
|
|
</div>
|
|
|
|
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title">Mitarbeiter bearbeiten</h2></header>
|
|
<div class="panel-body" style="height:100px;">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
<tr>
|
|
<form action="" method="post">
|
|
<tr>
|
|
<td nowrap style="width:55px;font-size:12pt"> Name: </td>
|
|
<td>
|
|
<select style="width:165px" name="mitarbeiter">
|
|
{foreach from=$mitarbeiterlist item=mlist}
|
|
<option value="{$mlist.id}">{$mlist.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Grund :</td>
|
|
<td><select style="width:165px" name="grund">
|
|
{foreach from=$gruende item=gr}
|
|
<option value="{$gr.id}">{$gr.bez}</option>
|
|
{/foreach}
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<!-- <td><input type="text" name="info" value="" placeholder="hier deine info" /></td> -->
|
|
<td><input style="width:165px" type="submit" name="datewahl" value="weiter zum Datum" /></td>
|
|
</form>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title">Fahrzeug bearbeiten</h2></header>
|
|
<div class="panel-body" style="height:100px;">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
<tr>
|
|
<form action="" method="post">
|
|
<tr>
|
|
<td nowrap style="width:55px;font-size:12pt"> Name: </td>
|
|
<td>
|
|
<select style="width:165px" name="car">
|
|
{foreach from=$carlist item=clist}
|
|
<option value="{$clist.id}">{$clist.kz}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Grund :</td>
|
|
<td><select style="width:165px" name="grund">
|
|
{foreach from=$fgruende item=fgr}
|
|
<option value="{$fgr.id}">{$fgr.bez}</option>
|
|
{/foreach}
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<!-- <td><input type="text" name="info" value="" placeholder="hier deine info" /></td> -->
|
|
<td><input style="width:165px" type="submit" name="fdatewahl" value="weiter zum Datum" /></input></td>
|
|
</form>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{else}
|
|
{if $madata.g_id==4 && $car==0}
|
|
<div id="rightmenu" class="panel panel-warning">
|
|
<header class="panel-heading"><h2 class="panel-title">{$madata.name}</h2></header>
|
|
<section class="panel-body">
|
|
<table class="no-style full" id="urlaub" style="font-size:12pt">
|
|
</table>
|
|
</section>
|
|
</div>
|
|
{else}
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title" style="font-size:16pt">{$madata.name}</h2></header>
|
|
<div class="panel-body">
|
|
<table class="no style">
|
|
<tbody>
|
|
<tr><td nowrap style="font-size:16pt"><mark>{$madata.grund}</mark></td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<!-- <header class="panel-heading"><h2 class="panel-title" style="font-size:16pt">{$madata.name}</h2></header> -->
|
|
<div class="panel-body" style="height:675px;overflow-y: scroll;">
|
|
<table class="no style">
|
|
<tbody>
|
|
<form action="" method="post">
|
|
{foreach from=$testx item=test}
|
|
<tr>
|
|
<!-- ------------------ -->
|
|
<td {if $test.ft==1}bgcolor="#F0F0F0" {/if}
|
|
{if $test.ft==2}bgcolor="#F8BE7D" {/if}
|
|
style="line-height:10px;font-size:12pt">
|
|
{if $car>0}
|
|
<label>
|
|
<input type="checkbox" value="{$test.time}" id="info_{$test.time}" onChange="save_car({$test.time},{$madata.mid},{$madata.g_id})"
|
|
{if $test.ok>0}checked="checked" {/if} {if $madata.g_id==4 && $test.ft!=9 && $car==0} disabled{/if}>
|
|
{$test.time|date_format:" %d.%m.%Y"}
|
|
</label>
|
|
{else}
|
|
<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 $madata.g_id==4 && $test.ft!=9 && $car==0} disabled{/if}>
|
|
{$test.time|date_format:" %d.%m.%Y"}
|
|
</label>
|
|
{/if}
|
|
</td>
|
|
{if $test.time|date_format:"%w"==0}<tr><td><hr></td></tr>{/if}
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</aside>
|
|
|
|
<!-- Sidebar End -->
|
|
|
|
|
|
|
|
<!------------------------------------------------>
|
|
<script> var jahr = '{$jahr}';</script>
|
|
<script> var mitarbeiter = '{$madata.mid}';</script>
|
|
{literal}
|
|
<style>
|
|
ul.nav-tabs > li {
|
|
width: 33%;
|
|
text-align: center;
|
|
}
|
|
.kal_f {
|
|
background: #115270;
|
|
color: #aaaaaa;
|
|
padding: 5px;
|
|
border: 1px solid;
|
|
border-radius:6px;
|
|
margin-top: -16px;
|
|
margin-bottom: 18px;
|
|
height: 100%;
|
|
}
|
|
</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_car(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_car",
|
|
dataType: 'json',
|
|
data: 'time=' + time + "&maID="+maID+"&istC="+istC+"&gID="+gID,
|
|
success: function (data) {
|
|
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_old",
|
|
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: "left"
|
|
},
|
|
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}
|