diff --git a/CHANGEDB.php b/CHANGEDB.php index 172134d..7a363e6 100644 --- a/CHANGEDB.php +++ b/CHANGEDB.php @@ -113,4 +113,10 @@ UPDATE gibbonModule SET url='https://github.com/raynichc/helpdesk' WHERE name='Help Desk';end " ; +//v0.3.05 +$count++; +$sql[$count][0]="0.3.05" ; +$sql[$count][1]=" +" ; + ?> diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 44cecf9..cecf68c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -125,4 +125,9 @@ Fixed one permission having the wrong URL. v0.3.04 ------- Fixed helpDesk_setTechGroup.php not having the technicians group as a default. -Changed some icons to others to fit the theme of the rest of gibbon. \ No newline at end of file +Changed some icons to others to fit the theme of the rest of gibbon. + +v0.3.05 +------- +Added row coloring to tables to fit with the rest of gibbon. +Allowed Resolved issues to be viewed. \ No newline at end of file diff --git a/helpDesk_manageTechnicianGroup.php b/helpDesk_manageTechnicianGroup.php index a3f9abe..3094e02 100644 --- a/helpDesk_manageTechnicianGroup.php +++ b/helpDesk_manageTechnicianGroup.php @@ -95,8 +95,14 @@ print "" . _('Create') . ""; print "" ; if (! $result->rowcount() == 0){ + $rowCount = 0; while($row=$result->fetch()){ - print "" ; + if($rowCount%2 == 0) { + print ""; + } + else { + print ""; + } print "" . $row['groupName'] . "" ; print " "; $techsIn = ""; @@ -117,7 +123,7 @@ print"" ; print "" ; - + $rowCount++; } } else { print ""; diff --git a/helpDesk_manageTechnicians.php b/helpDesk_manageTechnicians.php index 424c23f..a9d8ec3 100644 --- a/helpDesk_manageTechnicians.php +++ b/helpDesk_manageTechnicians.php @@ -98,8 +98,14 @@ print "" . _('Create') . ""; print "" ; if (! $result->rowcount() == 0){ + $rowCount=0; while($row=$result->fetch()){ - print "" ; + if($rowCount%2 == 0) { + print ""; + } + else { + print ""; + } print "". formatName($row['title'],$row['preferredName'],$row['surname'], "Student", FALSE, FALSE) ."" ; print " "; $issues = ""; @@ -121,7 +127,7 @@ print ""; print ""; print "" ; - + $rowCount++; } } else { print ""; diff --git a/issues_discussPostProccess.php b/issues_discussPostProccess.php index abf93b2..83a680a 100644 --- a/issues_discussPostProccess.php +++ b/issues_discussPostProccess.php @@ -48,7 +48,7 @@ } -if (!relatedToIssue($connection2, $issueID, $_SESSION[$guid]["gibbonPersonID"]) && !getPermissionValue($connection2, $_SESSION[$guid]["gibbonPersonID"], "resolveIssue")) { +if (!relatedToIssue($connection2, $issueID, $_SESSION[$guid]["gibbonPersonID"]) && !getPermissionValue($connection2, $_SESSION[$guid]["gibbonPersonID"], "resolveIssue") || getIssueStatus($connection2, $issueID)=="Resolved") { //Fail 0 aka No permission $URL=$URL . "&addReturn=fail0" ; header("Location: {$URL}"); diff --git a/issues_discussView.php b/issues_discussView.php index ea609cc..8681e98 100644 --- a/issues_discussView.php +++ b/issues_discussView.php @@ -56,7 +56,7 @@ $result=$connection2->prepare($sql); $result->execute($data); - $sql2="SELECT helpDeskTechnicians.*, surname , title, preferredName FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) JOIN gibbonPerson ON (helpDeskTechnicians.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE issueID=:issueID " ; + $sql2="SELECT helpDeskTechnicians.*, surname , title, preferredName, helpDeskIssue.status AS issueStatus FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) JOIN gibbonPerson ON (helpDeskTechnicians.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE issueID=:issueID " ; $result2=$connection2->prepare($sql2); $result2->execute($data); $array2 = $result2->fetchall(); @@ -185,13 +185,13 @@ print "" ; print "" ; print "
" ; - + if($array2[0]["issueStatus"]!="Resolved") { print "
" ; print "" . _('Refresh') . " " . _('Add') . " " ; if(getPermissionValue($connection2, $_SESSION[$guid]["gibbonPersonID"], "resolveIssue")) { print "" . _('Resolve'); } print ""; print "
" ; - + } if ($result3->rowCount()==0){ print "
" ; print _("There are no records to display."); diff --git a/issues_view.php b/issues_view.php index 57c7e4c..8dbbf8b 100644 --- a/issues_view.php +++ b/issues_view.php @@ -331,7 +331,7 @@ print ""; print "" . _('Create ') . ""; print "
" ; - print ""; + print "
"; print ""; print ""; print ""; } else { + $rowCount = 0; foreach($resultIssue as $row){ - print ""; + if($rowCount%2 == 0) { + print ""; + } + else { + print ""; + } + print ""; $issueName = $row['issueName']; if(strlen($issueName)>15) $issueName = substr($issueName, 0, 15) . "..."; @@ -371,7 +378,7 @@ if($renderPriority) { printf(""); } printf("" ; - print ""; print ""; + $rowCount++; } } print "
IDTitle
"; @@ -356,8 +356,15 @@ print "
" . intval($row['issueID']) . "" .$row['priority']. "" .$row['status']. "
"); print "" . dateConvertBack($guid, $row["date"]) . "
"; + print ""; $openCreated = false; $resolveCreated = false; if(isTechnician($_SESSION[$guid]["gibbonPersonID"], $connection2) && !relatedToIssue($connection2, intval($row['issueID']), $_SESSION[$guid]["gibbonPersonID"])) @@ -401,8 +408,13 @@ if(!$openCreated && !($row['status']=="Resolved")) { print ""; } if(!$resolveCreated && !($row['status']=="Resolved")) { print ""; } } + if($row['status']=="Resolved" && relatedToIssue($connection2, intval($row['issueID']), $_SESSION[$guid]["gibbonPersonID"])) { + print ""; + $openCreated = true; + } print "
"; diff --git a/manifest.php b/manifest.php index da010e5..4f4c251 100644 --- a/manifest.php +++ b/manifest.php @@ -25,7 +25,7 @@ $entryURL="issues_view.php" ; $type="Additional" ; $category="Other" ; -$version="0.3.04" ; +$version="0.3.05" ; $author="Adrien Tremblay & Ray Clark" ; $url="https://github.com/raynichc/helpdesk" ; diff --git a/moduleFunctions.php b/moduleFunctions.php index aa8c8f9..bb0530c 100755 --- a/moduleFunctions.php +++ b/moduleFunctions.php @@ -142,6 +142,10 @@ function relatedToIssue($connection2, $issueID, $gibbonPersonID) { $isRelated = $row["gibbonPersonID"]==$gibbonPersonID; } + if(getPermissionValue($connection2, $gibbonPersonID, "fullAccess")) { + $isRelated = true; + } + return $isRelated; } @@ -223,4 +227,18 @@ function getPermissionValue($connection2, $gibbonPersonID, $permission) { } return $row[$permission]; } + +function getIssueStatus($connection2, $issueID) { + try { + $data=array("issueID"=> $issueID); + $sql="SELECT status FROM helpDeskIssue WHERE issueID:issueID"; + $result=$connection2->prepare($sql); + $result->execute($data); + $row = $result->fetch(); + } + catch(PDOException $e) { + print $e; + } + return $row["status"]; +} ?> diff --git a/version.php b/version.php index ea8ecdb..bf8c893 100644 --- a/version.php +++ b/version.php @@ -20,7 +20,7 @@ /** * Sets version information */ -$moduleVersion="0.3.04" ; +$moduleVersion="0.3.05" ; /* */