mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
more efficient way to get documents in process
This commit is contained in:
parent
699e1bcfad
commit
d872b68efe
|
@ -374,6 +374,7 @@ $(document).ready( function() {
|
|||
}
|
||||
|
||||
if (count($resArr)>0) {
|
||||
if(0) {
|
||||
// Create an array to hold all of these results, and index the array by
|
||||
// document id. This makes it easier to retrieve document ID information
|
||||
// later on and saves us having to repeatedly poll the database every time
|
||||
|
@ -446,6 +447,45 @@ $(document).ready( function() {
|
|||
}else{
|
||||
printMLText("no_docs_to_check");
|
||||
}
|
||||
} else {
|
||||
// List the documents where a review has been requested.
|
||||
$this->contentHeading(getMLText("documents_to_process"));
|
||||
|
||||
$printheader=true;
|
||||
$iRev = array();
|
||||
$dList = array();
|
||||
foreach ($resArr as $res) {
|
||||
|
||||
if ( $res['id'] ) {
|
||||
$dList[] = $res["id"];
|
||||
$document = $dms->getDocument($res["id"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
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("status")."</th>\n";
|
||||
print "<th>".getMLText("action")."</th>\n";
|
||||
print "</tr>\n</thead>\n<tbody>\n";
|
||||
$printheader=false;
|
||||
}
|
||||
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
echo $this->documentListRow($document, $previewer, false, $res['version']);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$printheader){
|
||||
echo "</tbody>\n</table>";
|
||||
}else{
|
||||
printMLText("no_docs_to_check");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user