mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 17:05:46 +00:00
move printProtocol() into class.Bootstrap.php
This commit is contained in:
parent
7cc3a0cf86
commit
88df1cee82
|
@ -1998,5 +1998,106 @@ mayscript>
|
|||
function show(){ /* {{{ */
|
||||
parent::show();
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Output a protocol
|
||||
*
|
||||
* @param object $attribute attribute
|
||||
*/
|
||||
protected function printProtocol($latestContent, $type="") { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
?>
|
||||
<legend><?php printMLText($type.'_log'); ?></legend>
|
||||
<table class="table condensed">
|
||||
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('last_update'); ?>, <?php printMLText('comment'); ?></th><th><?php printMLText('status'); ?></th></tr>
|
||||
<?php
|
||||
switch($type) {
|
||||
case "review":
|
||||
$statusList = $latestContent->getReviewStatus(10);
|
||||
break;
|
||||
case "approval":
|
||||
$statusList = $latestContent->getApprovalStatus(10);
|
||||
break;
|
||||
case "revision":
|
||||
$statusList = $latestContent->getRevisionStatus(10);
|
||||
break;
|
||||
case "receipt":
|
||||
$statusList = $latestContent->getReceiptStatus(1);
|
||||
break;
|
||||
default:
|
||||
$statusList = array();
|
||||
}
|
||||
foreach($statusList as $rec) {
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
switch ($rec["type"]) {
|
||||
case 0: // individual.
|
||||
$required = $dms->getUser($rec["required"]);
|
||||
if (!is_object($required)) {
|
||||
$reqName = getMLText("unknown_user")." '".$rec["required"]."'";
|
||||
} else {
|
||||
$reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")");
|
||||
}
|
||||
break;
|
||||
case 1: // Approver is a group.
|
||||
$required = $dms->getGroup($rec["required"]);
|
||||
if (!is_object($required)) {
|
||||
$reqName = getMLText("unknown_group")." '".$rec["required"]."'";
|
||||
}
|
||||
else {
|
||||
$reqName = "<i>".htmlspecialchars($required->getName())."</i>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo $reqName;
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "<i style=\"font-size: 80%;\">".$rec['date']." - ";
|
||||
$updateuser = $dms->getUser($rec["userID"]);
|
||||
if(!is_object($required))
|
||||
echo getMLText("unknown_user");
|
||||
else
|
||||
echo htmlspecialchars($updateuser->getFullName()." (".$updateuser->getLogin().")");
|
||||
echo "</i>";
|
||||
if($rec['comment'])
|
||||
echo "<br />".htmlspecialchars($rec['comment']);
|
||||
switch($type) {
|
||||
case "review":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
case "approval":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
switch($type) {
|
||||
case "review":
|
||||
echo getReviewStatusText($rec["status"]);
|
||||
break;
|
||||
case "approval":
|
||||
echo getApprovalStatusText($rec["status"]);
|
||||
break;
|
||||
case "revision":
|
||||
echo getRevisionStatusText($rec["status"]);
|
||||
break;
|
||||
case "receipt":
|
||||
echo getReceiptStatusText($rec["status"]);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -110,107 +110,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Output a protocol
|
||||
*
|
||||
* @param object $attribute attribute
|
||||
*/
|
||||
protected function printProtocol($latestContent, $type="") { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
?>
|
||||
<legend><?php printMLText($type.'_log'); ?></legend>
|
||||
<table class="table condensed">
|
||||
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('last_update'); ?>, <?php printMLText('comment'); ?></th><th><?php printMLText('status'); ?></th></tr>
|
||||
<?php
|
||||
switch($type) {
|
||||
case "review":
|
||||
$statusList = $latestContent->getReviewStatus(10);
|
||||
break;
|
||||
case "approval":
|
||||
$statusList = $latestContent->getApprovalStatus(10);
|
||||
break;
|
||||
case "revision":
|
||||
$statusList = $latestContent->getRevisionStatus(10);
|
||||
break;
|
||||
case "receipt":
|
||||
$statusList = $latestContent->getReceiptStatus(1);
|
||||
break;
|
||||
default:
|
||||
$statusList = array();
|
||||
}
|
||||
foreach($statusList as $rec) {
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
switch ($rec["type"]) {
|
||||
case 0: // individual.
|
||||
$required = $dms->getUser($rec["required"]);
|
||||
if (!is_object($required)) {
|
||||
$reqName = getMLText("unknown_user")." '".$rec["required"]."'";
|
||||
} else {
|
||||
$reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")");
|
||||
}
|
||||
break;
|
||||
case 1: // Approver is a group.
|
||||
$required = $dms->getGroup($rec["required"]);
|
||||
if (!is_object($required)) {
|
||||
$reqName = getMLText("unknown_group")." '".$rec["required"]."'";
|
||||
}
|
||||
else {
|
||||
$reqName = "<i>".htmlspecialchars($required->getName())."</i>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo $reqName;
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "<i style=\"font-size: 80%;\">".$rec['date']." - ";
|
||||
$updateuser = $dms->getUser($rec["userID"]);
|
||||
if(!is_object($required))
|
||||
echo getMLText("unknown_user");
|
||||
else
|
||||
echo htmlspecialchars($updateuser->getFullName()." (".$updateuser->getLogin().")");
|
||||
echo "</i>";
|
||||
if($rec['comment'])
|
||||
echo "<br />".htmlspecialchars($rec['comment']);
|
||||
switch($type) {
|
||||
case "review":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&reviewlogid=".$rec['reviewLogID']."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
case "approval":
|
||||
if($rec['file']) {
|
||||
echo "<br />";
|
||||
echo "<a href=\"../op/op.Download.php?documentid=".$documentid."&approvelogid=".$rec['approveLogID']."\" class=\"btn btn-mini\"><i class=\"icon-download\"></i> ".getMLText('download')."</a>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
switch($type) {
|
||||
case "review":
|
||||
echo getReviewStatusText($rec["status"]);
|
||||
break;
|
||||
case "approval":
|
||||
echo getApprovalStatusText($rec["status"]);
|
||||
break;
|
||||
case "revision":
|
||||
echo getRevisionStatusText($rec["status"]);
|
||||
break;
|
||||
case "receipt":
|
||||
echo getReceiptStatusText($rec["status"]);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
parent::show();
|
||||
$dms = $this->params['dms'];
|
||||
|
|
Loading…
Reference in New Issue
Block a user