403 lines
18 KiB
Smarty
403 lines
18 KiB
Smarty
<section class="col-md-8">
|
|
<div class="row sortable">
|
|
<!-- Main Section -- mittlere Spalte -->
|
|
<div class="col-md-12">
|
|
{if $anzeige==0}
|
|
{if $nochmenge!=0}
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading" style="background-color:green;color: white">Touren werden angelegt !!!</div>
|
|
<div class="panel-body">
|
|
<i class="fas fa-spinner fa-pulse fa-2x" style="color: red"></i>
|
|
<span style="font-size: 14px;color: darkred"> Bitte warten...</br></span>
|
|
<span id="i_tour_a" style="font-size: 20px;color: darkred"> Es sind noch {$nochmenge} Tour(en) in der Warteschleife zum Anlegen. !!!</span>
|
|
</div>
|
|
{else}
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading" style="background-color:orangered;color: white">alle aktiven Touren für den Monat {$monat} im Jahr {$jahr} anlegen.</div>
|
|
<div class="panel-body">
|
|
<table class="table table-condensed">
|
|
<thead style="background-color:yellow">
|
|
<th style="width:100px;font-size:8pt" align="left">Tour</th>
|
|
<th style="width:190px;font-size:8pt" align="left">Tourbez.</th>
|
|
<th style="width:220px;font-size:8pt" align="center">Stammfahrer</th>
|
|
<th style="width:80px;font-size:8pt" align="center">Stammauto</th>
|
|
<th style="width:35px;font-size:8pt" align="left">Status</th>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$touraktiv item=taktiv}
|
|
<td align="left" style="font-size:11pt">{$taktiv.tour}</td>
|
|
<td style="font-size:8pt">{$taktiv.infotitel}</td>
|
|
|
|
<td style="font-size:11pt">{$taktiv.name}</td>
|
|
<td style="font-size:11pt">{$taktiv.kz}</td>
|
|
{if $taktiv.ok==1}
|
|
<td style="font-size:11pt" align="right"><i class="fad fa-check-square" style="color: green"></i></td>
|
|
{else}
|
|
<td style="font-size:11pt" align="right"><i class="fad fa-times-square"></i></td>
|
|
{/if}
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<!-- ------------------------------------ Tourenliste -->
|
|
{else} <!-- keine Auswahlgetroffen -->
|
|
{if $einzel==0}
|
|
<div class="panel panel-warning">
|
|
<div class="panel-heading">Auswahl Touren {$monat}/{$jahr}</div>
|
|
<div class="panel-body">
|
|
<table class="no-style full">
|
|
<thead>
|
|
<th style="width:25px;font-size:8pt" align="left">akt.</th>
|
|
<th style="width:100px;font-size:8pt" align="left">Tourbez.</th>
|
|
<th style="width:190px;font-size:8pt" align="left">Detailanzeige</th>
|
|
<th style="width:220px;font-size:8pt" align="center">Stammfahrer</th>
|
|
<th style="width:120px;font-size:8pt" align="center">Stammauto</th>
|
|
<!--
|
|
<th style="width:20px;font-size:8pt" align="left">anl.</th>-->
|
|
<th style="width:15px;font-size:8pt" align="left">del.</th>
|
|
|
|
<th style="width:35px;font-size:8pt" align="left">Status</th>
|
|
</thead>
|
|
<tbody>
|
|
<form action="" method="post">
|
|
{foreach from=$toursel item=tsel}
|
|
<td>
|
|
<label>
|
|
<input type="checkbox" value="{$tsel.id}" id="info_{$tsel.id}" onChange="save_date({$tsel.id})" {if $tsel.aktiv==1} checked="checked" {/if}>
|
|
</label>
|
|
</td>
|
|
<td style="width:110px;font-size:12pt" align="left"><a href="?s=itour&wahl=8&tid={$tsel.id}&jahr={$jahr}&monat={$monat}" title="Kicke zum auswälen" >{$tsel.tour}</a></td>
|
|
<td style="width:190px;font-size:9pt">{$tsel.infotitel}</td>
|
|
|
|
<td style="width:220px;font-size:10pt"><center>
|
|
<select name="Fahrer[{$tsel.id}]" id="user_{$tsel.id}" style="width:190px;" onChange="save_user({$tsel.id})" >
|
|
{foreach from=$fahrer_array item=allfahrer}
|
|
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tsel.s_fahrer}
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
|
|
<td style="width:120px;font-size:10pt"><center>
|
|
<select name="Fahrzeug[{$tsel.id}]" id="car_{$tsel.id}" style="width:100px;" onChange="save_car({$tsel.id})" >
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id
|
|
output=$allauto.kz selected=$tsel.s_auto}
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
<!--
|
|
<td><input type="image" name="add" value="{$tsel.id}"src="template/images/icon/add.png"/></td> -->
|
|
<td><input type="image" name="del" value="{$tsel.id}"src="template/images/icon/cross.png"/></td>
|
|
|
|
<td style="width:40px;font-size:11pt" align="right">{$tsel.wert} x</td>
|
|
</tr>
|
|
{/foreach}
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="panel-footer">
|
|
<a href="http://jb-data.de/index.php?s=itour&tid={$tsel.typ}&jahr={$jahr}&monat={$monat}&wahl=6" class="btn btn-default">Alle Ausgewählte Touren anlegen.</a>
|
|
</form>
|
|
</div>
|
|
{else}
|
|
|
|
|
|
<!-- ///////////////// einzeltouranzeige -->
|
|
<div class="panel panel-warning">
|
|
<div class="panel-heading">Einzelanzeige {$anzeigetour} für {$monat}/{$jahr}</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-2">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-body" style="height:215px;overflow-y:">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
{foreach from=$etour item=e_tour}
|
|
{if $e_tour.wz==1} <!-- ist Montag ???????? -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<div class="panel panel-primary">
|
|
<div class="panel-body" style="height:215px;overflow-y:">
|
|
<table class="no-style full">
|
|
<tbody>
|
|
{/if}
|
|
<tr>
|
|
<td style="width:20px;font-size:12pt">
|
|
<label>
|
|
<input type="checkbox" value="{$e_tour.tid}" id="info_{$e_tour.tag}"
|
|
onChange="tsave_date('{$e_tour.tid}','{$e_tour.tag}','{$e_tour.monat}','{$e_tour.jahr}','{$e_tour.ok}')" {if $e_tour.ok>0} checked="checked" {/if}>
|
|
</label>
|
|
</td>
|
|
|
|
<td {if $e_tour.ft==1}
|
|
bgcolor="#F89737"
|
|
{else}
|
|
{if $e_tour.wz==0}bgcolor="#BEBEBE" {else}
|
|
bgcolor="#FFFFFF"
|
|
{/if}
|
|
{/if}
|
|
style="width:20px;font-size:11pt;color:#000000">{$e_tour.wt}
|
|
</td>
|
|
<td {if $e_tour.ft==1}
|
|
bgcolor="#F89737"
|
|
{else}
|
|
{if $e_tour.wz==0}bgcolor="#BEBEBE" {else}
|
|
bgcolor="#FFFFFF"
|
|
{/if}
|
|
{/if}
|
|
style="width:70px;font-size:11pt;color:#000000" align="right">{$e_tour.tag}
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <td style="width:300px;font-size:11pt"> {$e_tour.tour}</td> -->
|
|
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<!-- ------------------------------------ -->
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ------------------------------------ -->
|
|
<!-- ------------------------------------ -->
|
|
<!-- ------------------------------------ -->
|
|
<!-- ------------------------------------ -->
|
|
<!-- ------------------------------------ -->
|
|
<!-- Sidebar -->
|
|
<aside class="col-md-4">
|
|
<!-- ------------------------------------ Monatswechsel -->
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<div class="btn-group">
|
|
<a class="btn btn-warning btn-md" href="?s=itour&wahl=1&jahr={$jahr}&monat={$monat}&tid={$anzeige}" 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-md">{$monat}/{$jahr}</button>
|
|
</a>
|
|
<a class="btn btn-warning btn-md" href="?s=itour&wahl=2&jahr={$jahr}&monat={$monat}&tid={$anzeige}" aria-label="Skip to main navigation">
|
|
<i class="fa fa-arrow-right" aria-hidden="true"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- ------------------------------------- alle aktiven anlegen -->
|
|
{if $anzeige==0 && $nochmenge==0}
|
|
<div id="rightmenu" class="panel panel-default" style="background-color: yellow;color: white">
|
|
<div class="btn-group">
|
|
<a class="btn btn-md" href="?s=itour&wahl=7&jahr={$jahr}&monat={$monat}" aria-label="alle anlegen">
|
|
<i class="fad fa-edit"></i> Alle aktiven Touren anlegen !!!
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<!-- ------------------------------------- Bereichswahl -->
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<div class="panel-heading">Typ Bereich</div>
|
|
<div class="panel-body">
|
|
<table class="no style">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:140px;font-size:8pt" align="left">Tour</th>
|
|
<th style="width:220px;font-size:8pt" align="left">Info</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$tourenlist item=tlist}
|
|
<tr>
|
|
<td style="width:140px;font-size:12pt" align="left">
|
|
<a href="?s=itour&tid={$tlist.tid}&jahr={$jahr}&monat={$monat}" title="Kicke zum auswälen">{$tlist.tname}
|
|
</td>
|
|
<td style="width:140px;font-size:10pt" align="left">{$tlist.tinfotitel}
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- ------------------------------------ Sondertermine -->
|
|
<div id="rightmenu" class="panel panel-warning">
|
|
<div class="panel-heading">Besonderes {$monat}/{$jahr}</div>
|
|
<div class="panel-body">
|
|
<table class="no-style full">
|
|
<thead>
|
|
{foreach from=$datenlist item=dlist}
|
|
<tr>
|
|
<td style="width:90px;font-size:11pt">{$dlist.tag}.{$dlist.monat}.{$dlist.jahr}</td>
|
|
<td style="width:160px;font-size:11pt">{$dlist.info}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!------------------------------------------------>
|
|
{if $nochmenge!=0}
|
|
{literal}
|
|
<script>
|
|
var refreshId = setInterval(function() {
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=i_tour_a&tpl',
|
|
cache : false,
|
|
data : {
|
|
},
|
|
dataType : "html",
|
|
success : function(data){
|
|
$("#i_tour_a").html(data);
|
|
},
|
|
})
|
|
}, 10000);
|
|
</script>
|
|
{/literal}
|
|
{/if}
|
|
|
|
<!------------------------------------------------>
|
|
<script> var jahr = '{$jahr}';</script>
|
|
<script> var monat = '{$monat}';</script>
|
|
<script> var tag = '{$tag}';</script>
|
|
{literal}
|
|
<script>
|
|
function save_date(id) {
|
|
// alert($("#info_"+id).val());
|
|
var remember = document.getElementById('info_'+id);
|
|
if (remember.checked){
|
|
var istC = 1;
|
|
}else{
|
|
var istC = 0;
|
|
}
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=itour_save&a=date_save",
|
|
dataType: 'json',
|
|
data: 'tour='+id+ "&id="+id+"&istC="+istC,
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
}
|
|
console.log(data)
|
|
}
|
|
});
|
|
}
|
|
function tsave_date(tid,tag,monat,jahr) {
|
|
// alert($("#info_"+tag).val());
|
|
var remember = document.getElementById('info_'+tag);
|
|
if (remember.checked){
|
|
var istC = 1;
|
|
}else{
|
|
var istC = 0;
|
|
}
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=itour_save&a=tdate_save",
|
|
dataType: 'json',
|
|
// data: 'tour='+tid + "&tid="+tid + "&istC="+istC + "&tag="+tag +"&monat="+monat+ "&jahr="+jahr,
|
|
data: 'tour='+tid + "&tid="+tid + "&istC="+istC + "&tag="+tag +"&monat="+monat+ "&jahr="+jahr,
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
}
|
|
console.log(data)
|
|
}
|
|
});
|
|
}
|
|
function save_car(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=itour_save&a=car_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&car=" + $("#car_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
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_user(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=itour_save&a=user_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&user=" + $("#user_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
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)
|
|
}
|
|
});
|
|
|
|
}
|
|
$(document).ready(function(){
|
|
$('[data-toggle="popover"]').popover();
|
|
});
|
|
|
|
</script>
|
|
{/literal}
|
|
|
|
|
|
|