mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
do not show removed approvers/reviewers unless admin
This commit is contained in:
parent
76c02d89c7
commit
0f9ac271ce
|
@ -837,38 +837,40 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
break;
|
||||
}
|
||||
print "<tr>\n";
|
||||
print "<td>".$reqName."</td>\n";
|
||||
print "<td><i style=\"font-size: 80%;\">".$r["date"]." - ";
|
||||
/* $updateUser is the user who has done the review */
|
||||
$updateUser = $dms->getUser($r["userID"]);
|
||||
print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."</i><br />";
|
||||
print htmlspecialchars($r["comment"]);
|
||||
if($r['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&reviewlogid=".$r['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td>";
|
||||
if($class)
|
||||
echo "<i class=\"fa fa-circle text-".$class."\"></i> ";
|
||||
print getReviewStatusText($r["status"])."</td>\n";
|
||||
print "<td><ul class=\"unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessop->mayReview()) {
|
||||
if ($is_reviewer) {
|
||||
if ($r["status"]==0) {
|
||||
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("add_review")."</a></li>";
|
||||
} elseif ($accessop->mayUpdateReview($updateUser) && (($r["status"]==1)||($r["status"]==-1))) {
|
||||
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("edit")."</a></li>";
|
||||
if($user->isAdmin() || $r["status"] > -2) {
|
||||
print "<tr>\n";
|
||||
print "<td>".$reqName."</td>\n";
|
||||
print "<td><i style=\"font-size: 80%;\">".$r["date"]." - ";
|
||||
/* $updateUser is the user who has done the review */
|
||||
$updateUser = $dms->getUser($r["userID"]);
|
||||
print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."</i><br />";
|
||||
print htmlspecialchars($r["comment"]);
|
||||
if($r['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&reviewlogid=".$r['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td>";
|
||||
if($class)
|
||||
echo "<i class=\"fa fa-circle text-".$class."\"></i> ";
|
||||
print getReviewStatusText($r["status"])."</td>\n";
|
||||
print "<td><ul class=\"unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessop->mayReview()) {
|
||||
if ($is_reviewer) {
|
||||
if ($r["status"]==0) {
|
||||
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("add_review")."</a></li>";
|
||||
} elseif ($accessop->mayUpdateReview($updateUser) && (($r["status"]==1)||($r["status"]==-1))) {
|
||||
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("edit")."</a></li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "</ul></td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print "</ul></td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>";
|
||||
// $this->contentContainerEnd();
|
||||
|
@ -937,39 +939,41 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
break;
|
||||
}
|
||||
print "<tr>\n";
|
||||
print "<td>".$reqName."</td>\n";
|
||||
print "<td><i style=\"font-size: 80%;\">".$a["date"]." - ";
|
||||
/* $updateUser is the user who has done the approval */
|
||||
$updateUser = $dms->getUser($a["userID"]);
|
||||
print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$a["userID"]."'")."</i><br />";
|
||||
print htmlspecialchars($a["comment"]);
|
||||
if($a['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&approvelogid=".$a['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
echo "</td>\n";
|
||||
print "<td>";
|
||||
if($class)
|
||||
echo "<i class=\"fa fa-circle text-".$class."\"></i> ";
|
||||
print getApprovalStatusText($a["status"])."</td>\n";
|
||||
print "<td><ul class=\"unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessop->mayApprove()) {
|
||||
if ($is_approver) {
|
||||
if ($a['status'] == 0) {
|
||||
print "<li><a class=\"btn btn-primary btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."</a></li>";
|
||||
} elseif ($accessop->mayUpdateApproval($updateUser) && (($a["status"]==1)||($a["status"]==-1))) {
|
||||
print "<li><a class=\"btn btn-primary btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>";
|
||||
if($user->isAdmin() || $a["status"] > -2) {
|
||||
print "<tr>\n";
|
||||
print "<td>".$reqName."</td>\n";
|
||||
print "<td><i style=\"font-size: 80%;\">".$a["date"]." - ";
|
||||
/* $updateUser is the user who has done the approval */
|
||||
$updateUser = $dms->getUser($a["userID"]);
|
||||
print (is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$a["userID"]."'")."</i><br />";
|
||||
print htmlspecialchars($a["comment"]);
|
||||
if($a['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&approvelogid=".$a['approveLogID']."\" class=\"btn btn-mini\"><i class=\"fa fa-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
echo "</td>\n";
|
||||
print "<td>";
|
||||
if($class)
|
||||
echo "<i class=\"fa fa-circle text-".$class."\"></i> ";
|
||||
print getApprovalStatusText($a["status"])."</td>\n";
|
||||
print "<td><ul class=\"unstyled\">";
|
||||
if($accesserr)
|
||||
echo "<li><span class=\"text-error\">".$accesserr."</span></li>";
|
||||
|
||||
if($accessop->mayApprove()) {
|
||||
if ($is_approver) {
|
||||
if ($a['status'] == 0) {
|
||||
print "<li><a class=\"btn btn-primary btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."</a></li>";
|
||||
} elseif ($accessop->mayUpdateApproval($updateUser) && (($a["status"]==1)||($a["status"]==-1))) {
|
||||
print "<li><a class=\"btn btn-primary btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "</ul>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
print "</ul>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user