Merge branch 'master' into 9503/csvExportProjektÜbersicht

This commit is contained in:
Andreas Österreicher
2021-05-21 07:06:06 +02:00
43 changed files with 2501 additions and 273 deletions
+8 -8
View File
@@ -91,20 +91,20 @@ if($aktion!='zip')
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
<script type="text/javascript" src="../../../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
<script src="../../../vendor/components/jqueryui/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="../../../include/js/tablesort/table.css" type="text/css">
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>';
include('../../../include/meta/jquery.php');
include('../../../include/meta/jquery-tablesorter.php');
echo '
<script language="JavaScript" type="text/javascript">
$(document).ready(function()
{
$("#t1").tablesorter(
{
sortList: [[5,0]],
widgets: ["zebra"]
widgets: ["zebra"],
headers: {1: { sorter: "shortDate", dateFormat: "ddmmyyyy" }}
});
});
</script>
+2 -2
View File
@@ -1246,7 +1246,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
echo '<tr><td nowrap>'.$p->t("zeitaufzeichnung/organisationseinheiten").'</td>
<td colspan="3"><SELECT '.$oestyle.' name="oe_kurzbz_1">';
$oe = new organisationseinheit();
$oe->getFrequent($user,'180','3',true);
$oe->getFrequent($user,'180','3',true, array('oezuordnung', 'fachzuordnung', 'kstzuordnung'));
$trennlinie = true;
echo '<option value="">-- '.$p->t("zeitaufzeichnung/keineAuswahl").' --</option>';
@@ -1632,7 +1632,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
$langindex = 1;
else
$langindex = 2;
echo '<b>'.$tagbez[$langindex][$datum->formatDatum($tag,'N')].' '.$datum->formatDatum($tag,'d.m.Y').'</b> <span id="tag_'.$datum->formatDatum($tag,'d_m_Y').'">'.$zeitsperre_text.'</span>'.$pausefehlt_str;
echo '<span style="display: inline-block; width: 130px;"><b>'.$tagbez[$langindex][$datum->formatDatum($tag,'N')].' '.$datum->formatDatum($tag,'d.m.Y').'</b></span><span id="tag_'.$datum->formatDatum($tag,'d_m_Y').'">'.$zeitsperre_text.'</span>'.$pausefehlt_str;
if ($ersumme != '00:00')
$erstr = ' (+ '.$ersumme.' ER)';
else
@@ -90,6 +90,7 @@ $ztauf->getListeUserFromTo($uid, $year.'-'.$month.'-01', $year.'-'.$month.'-'.$d
$projektlines = array();
$dayStart = $dayEnd = '';
$projektnames = $projektphasenames = $tosubtract = $allpauseranges = array();
$projektTiteles = array();
$activitiesToSubtract = ['Pause', 'LehreExtern', 'Arztbesuch', 'Behoerde'];//aktivitaetstypen which should be subtracted fromworktime
$ztaufdata = $ztauf->result;
$totalmonthsum = 0.00;
@@ -281,7 +282,15 @@ for ($i = 0; $i < count($ztaufdata); $i++)
//add new projekt to array with unique projekt names
if (!in_array($ztaufrow->projekt_kurzbz, $projektnames))
{
$projektnames[] = $ztaufrow->projekt_kurzbz;
$pt = new projekt();
$pt->load($ztaufrow->projekt_kurzbz);
if(!empty($pt->titel))
$projektTiteles[convertProblemChars($ztaufrow->projekt_kurzbz)] = convertProblemChars($pt->titel);
else
$projektTiteles[convertProblemChars($ztaufrow->projekt_kurzbz)] = 'kein Titel';
}
}
}
@@ -557,10 +566,21 @@ if ($nrProjects < 1)//no projekts - merge all cells and write notice
foreach ($projektnames as $projektname)
{
//Creating a worksheet
$worksheet =& $workbook->addWorksheet($projektname);
$worksheet->setInputEncoding('utf-8');
$titel = $projektTiteles[convertProblemChars($projektname)];
if ((strlen($titel)+strlen($projektname)) > 31)
{
$maxLength = 31;
$maxLength = ($maxLength - 3 - strlen($projektname));
$titel = substr($titel, 0, $maxLength);
$titel.='...';
}
//Creating a worksheet
$worksheet =& $workbook->addWorksheet(convertProblemChars($projektname).' ('.$titel.')');
$worksheet->setInputEncoding('utf-8');
$titel = $projektTiteles[convertProblemChars($projektname)];
//general options
$worksheet->setLandscape();
$worksheet->hideGridlines();
@@ -686,7 +706,7 @@ foreach ($projektnames as $projektname)
$worksheet->write($zeile, $spalte + 1 + $i, '', $format_bold_centered_toprightline);
$worksheet->setMerge($zeile, $spalte, $zeile, $spalte + 1 + $phasenameslength);
$worksheet->write($zeile, $spalte, $projektname, $format_bold_centered_toprightline);
$worksheet->write($zeile, $spalte, $projektname.' ('.$titel.')', $format_bold_centered_toprightline);
for ($i = 0; $i < $phasenameslength; $i++)
$worksheet->write($zeile + 1, $spalte + 1 + $i, $phasenames[$i], $format_bold_centered_bottomline);