mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
propperly take new workflow mode traditional_only_approval into account
This commit is contained in:
parent
4c41f560c3
commit
cb3392c774
|
@ -222,7 +222,7 @@ $(document).ready(function() {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
if($workflowmode != 'traditional') {
|
||||
if($workflowmode == 'advanced') {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -262,6 +262,7 @@ $(document).ready(function() {
|
|||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
if($workflowmode == 'traditional') {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -372,7 +373,7 @@ $(document).ready(function() {
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php $this->contentSubHeading(getMLText("assign_approvers")); ?>
|
||||
|
|
|
@ -62,7 +62,7 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style {
|
|||
<a href="../out/out.AttributeMgr.php" class="span3 btn btn-medium"><i class="icon-tags"></i><br /><?php echo getMLText("global_attributedefinitions")?></a>
|
||||
</div>
|
||||
<?php
|
||||
if($this->params['workflowmode'] != 'traditional') {
|
||||
if($this->params['workflowmode'] == 'advanced') {
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<a href="../out/out.WorkflowMgr.php" class="span3 btn btn-medium"><i class="icon-sitemap"></i><br /><?php echo getMLText("global_workflows"); ?></a>
|
||||
|
|
|
@ -494,8 +494,9 @@ $(document).ready(function () {
|
|||
|
||||
echo "<li><a href=\"../out/out.MyDocuments.php?inProcess=1\">".getMLText("documents_in_process")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.MyDocuments.php\">".getMLText("all_documents")."</a></li>\n";
|
||||
if($this->params['workflowmode'] == 'traditional') {
|
||||
echo "<li><a href=\"../out/out.ReviewSummary.php\">".getMLText("review_summary")."</a></li>\n";
|
||||
if($this->params['workflowmode'] == 'traditional' || $this->params['workflowmode'] == 'traditional_only_approval') {
|
||||
if($this->params['workflowmode'] == 'traditional')
|
||||
echo "<li><a href=\"../out/out.ReviewSummary.php\">".getMLText("review_summary")."</a></li>\n";
|
||||
echo "<li><a href=\"../out/out.ApprovalSummary.php\">".getMLText("approval_summary")."</a></li>\n";
|
||||
} else {
|
||||
echo "<li><a href=\"../out/out.WorkflowSummary.php\">".getMLText("workflow_summary")."</a></li>\n";
|
||||
|
@ -527,7 +528,7 @@ $(document).ready(function () {
|
|||
echo " <li><a href=\"../out/out.DefaultKeywords.php\">".getMLText("global_default_keywords")."</a></li>\n";
|
||||
echo " <li><a href=\"../out/out.Categories.php\">".getMLText("global_document_categories")."</a></li>\n";
|
||||
echo " <li><a href=\"../out/out.AttributeMgr.php\">".getMLText("global_attributedefinitions")."</a></li>\n";
|
||||
if($this->params['workflowmode'] != 'traditional') {
|
||||
if($this->params['workflowmode'] == 'advanced') {
|
||||
echo " <li><a href=\"../out/out.WorkflowMgr.php\">".getMLText("global_workflows")."</a></li>\n";
|
||||
echo " <li><a href=\"../out/out.WorkflowStatesMgr.php\">".getMLText("global_workflow_states")."</a></li>\n";
|
||||
echo " <li><a href=\"../out/out.WorkflowActionsMgr.php\">".getMLText("global_workflow_actions")."</a></li>\n";
|
||||
|
|
|
@ -57,7 +57,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
exit;
|
||||
}
|
||||
|
||||
if($workflowmode == 'traditional') {
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
// Get document list for the current user.
|
||||
$reviewStatus = $user->getReviewStatus();
|
||||
$approvalStatus = $user->getApprovalStatus();
|
||||
|
@ -137,91 +137,93 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
|
||||
// List the documents where a review has been requested.
|
||||
$this->contentHeading(getMLText("documents_to_review"));
|
||||
$this->contentContainerStart();
|
||||
$printheader=true;
|
||||
$iRev = array();
|
||||
$dList = array();
|
||||
foreach ($reviewStatus["indstatus"] as $st) {
|
||||
|
||||
if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
if($workflowmode == 'traditional') {
|
||||
$this->contentHeading(getMLText("documents_to_review"));
|
||||
$this->contentContainerStart();
|
||||
$printheader=true;
|
||||
$iRev = array();
|
||||
$dList = array();
|
||||
foreach ($reviewStatus["indstatus"] as $st) {
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
print "<th>".getMLText("last_update")."</th>\n";
|
||||
print "<th>".getMLText("expires")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$printheader=false;
|
||||
if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
print "<th>".getMLText("last_update")."</th>\n";
|
||||
print "<th>".getMLText("expires")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$printheader=false;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$latestContent = $document->getLatestContent();
|
||||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
|
||||
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."</td>";
|
||||
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
foreach ($reviewStatus["grpstatus"] as $st) {
|
||||
|
||||
print "<tr>\n";
|
||||
$latestContent = $document->getLatestContent();
|
||||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
|
||||
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."</td>";
|
||||
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
foreach ($reviewStatus["grpstatus"] as $st) {
|
||||
|
||||
if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) {
|
||||
$dList[] = $st["documentID"];
|
||||
$document = $dms->getDocument($st["documentID"]);
|
||||
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
print "<th>".getMLText("last_update")."</th>\n";
|
||||
print "<th>".getMLText("expires")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$printheader=false;
|
||||
}
|
||||
if ($printheader){
|
||||
print "<table class=\"table table-condensed\">";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th></th>\n";
|
||||
print "<th>".getMLText("name")."</th>\n";
|
||||
print "<th>".getMLText("owner")."</th>\n";
|
||||
print "<th>".getMLText("version")."</th>\n";
|
||||
print "<th>".getMLText("last_update")."</th>\n";
|
||||
print "<th>".getMLText("expires")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$printheader=false;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
$latestContent = $document->getLatestContent();
|
||||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
print "<tr>\n";
|
||||
$latestContent = $document->getLatestContent();
|
||||
$previewer->createPreview($latestContent);
|
||||
print "<td><a href=\"../op/op.Download.php?documentid=".$st["documentID"]."&version=".$st["version"]."\">";
|
||||
if($previewer->hasPreview($latestContent)) {
|
||||
print "<img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
} else {
|
||||
print "<img class=\"mimeicon\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
|
||||
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."</td>";
|
||||
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</a></td>";
|
||||
print "<td><a href=\"out.ViewDocument.php?documentid=".$st["documentID"]."\">".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."</a></td>";
|
||||
print "<td>".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."</td>";
|
||||
print "<td>".$st["version"]."</td>";
|
||||
print "<td>".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."</td>";
|
||||
print "<td".($docIdx[$st["documentID"]][$st["version"]]['status']!=S_EXPIRED?"":" class=\"warning\"").">".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"]))."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
if (!$printheader){
|
||||
echo "</tbody>\n</table>";
|
||||
}else{
|
||||
printMLText("no_docs_to_review");
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
if (!$printheader){
|
||||
echo "</tbody>\n</table>";
|
||||
}else{
|
||||
printMLText("no_docs_to_review");
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
|
||||
// List the documents where an approval has been requested.
|
||||
$this->contentHeading(getMLText("documents_to_approve"));
|
||||
|
@ -306,11 +308,12 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentContainerEnd();
|
||||
}
|
||||
else {
|
||||
|
||||
$this->contentHeading(getMLText("documents_to_review"));
|
||||
$this->contentContainerStart();
|
||||
printMLText("no_review_needed");
|
||||
$this->contentContainerEnd();
|
||||
if($workflowmode == 'traditional') {
|
||||
$this->contentHeading(getMLText("documents_to_review"));
|
||||
$this->contentContainerStart();
|
||||
printMLText("no_review_needed");
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
$this->contentHeading(getMLText("documents_to_approve"));
|
||||
$this->contentContainerStart();
|
||||
printMLText("no_approval_needed");
|
||||
|
|
|
@ -240,8 +240,10 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
|
|||
<tr>
|
||||
<td><?php printMLText("status");?>:</td>
|
||||
<td>
|
||||
<?php if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { ?>
|
||||
<?php if($workflowmode == 'traditional') { ?>
|
||||
<label class="checkbox" for='pendingReview'><input type="checkbox" id="pendingReview" name="pendingReview" value="1" <?php echo in_array(S_DRAFT_REV, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_REV);?></label>
|
||||
<?php } ?>
|
||||
<label class="checkbox" for='pendingApproval'><input type="checkbox" id="pendingApproval" name="pendingApproval" value="1" <?php echo in_array(S_DRAFT_APP, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_DRAFT_APP);?></label>
|
||||
<?php } else { ?>
|
||||
<label class="checkbox" for='inWorkflow'><input type="checkbox" id="inWorkflow" name="inWorkflow" value="1" <?php echo in_array(S_IN_WORKFLOW, $status) ? "checked" : ""; ?>><?php printOverallStatusText(S_IN_WORKFLOW);?></label>
|
||||
|
|
|
@ -185,6 +185,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
<?php
|
||||
}
|
||||
if($workflowmode == "traditional" || $workflowmode == 'traditional_only_approval') {
|
||||
if($workflowmode == "traditional") {
|
||||
?>
|
||||
|
||||
|
@ -236,7 +237,9 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
|
|||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2"><?php printMLText("approvers");?>:</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue
Block a user