Merge branch 'seeddms-5.0.x' into develop

This commit is contained in:
Uwe Steinmann 2015-09-22 16:01:09 +02:00
commit b0edf297a2
51 changed files with 56 additions and 36 deletions

View File

@ -2521,6 +2521,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
$timeline = array();
/* No need to add entries for new version because the status log
* will generate an entry as well.
$queryStr = "SELECT * FROM tblDocumentContent WHERE document = " . $this->_id;
$resArr = $db->getResultArray($queryStr);
if (is_bool($resArr) && $resArr == false)
@ -2530,6 +2532,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
$date = date('Y-m-d H:i:s', $row['date']);
$timeline[] = array('date'=>$date, 'msg'=>'Added version '.$row['version'], 'type'=>'add_version', 'version'=>$row['version'], 'document'=>$this, 'params'=>array($row['version']));
}
*/
$queryStr = "SELECT * FROM tblDocumentFiles WHERE document = " . $this->_id;
$resArr = $db->getResultArray($queryStr);

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -2244,7 +2244,9 @@ mayscript>
*
* @param object $document document
*/
protected function printTimeline($timeline, $height=300) { /* {{{ */
protected function printTimeline($timeline, $height=300, $start='', $end='') { /* {{{ */
if(!$timeline)
return;
?>
<script type="text/javascript">
var timeline;
@ -2253,7 +2255,7 @@ mayscript>
data = [
<?php
foreach($timeline as $item) {
echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."'},";
echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."'},\n";
}
?>
/* {
@ -2265,8 +2267,19 @@ mayscript>
// specify options
var options = {
'width': '100%',
'height': '<?= $height ?>px',
'editable': false, // enable dragging and editing events
'height': '100%',
<?php
if($start) {
$tmp = explode('-', $start);
echo "\t\t\t'min': new Date(".$tmp[0].", ".($tmp[1]-1).", ".$tmp[2]."),\n";
}
if($end) {
$tmp = explode('-', $end);
echo "'\t\t\tmax': new Date(".$tmp[0].", ".($tmp[1]-1).", ".$tmp[2]."),\n";
}
?>
'_editable': false,
'selectable': false,
'style': 'box',
'locale': 'de_DE'
};
@ -2279,7 +2292,7 @@ mayscript>
});
</script>
<div id="timeline"></div>
<div id="timeline" style="height: <?= $height ?>px;"></div>
<?php
} /* }}} */
}

View File

@ -87,23 +87,25 @@ echo "</div>\n";
echo "<div class=\"span9\">\n";
$this->contentHeading(getMLText("timeline"));
foreach($data as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
break;
case 'status_change':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
}
$item['msg'] = $msg;
if($data) {
foreach($data as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
break;
case 'status_change':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
}
$this->printTimeline($data, 550);
$item['msg'] = $msg;
}
$this->printTimeline($data, 550, date('Y-m-d', $from), date('Y-m-d', $to+1));
}
echo "</div>\n";
echo "</div>\n";

View File

@ -1404,23 +1404,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if($user->isAdmin()) {
$this->contentHeading(getMLText("timeline"));
$timeline = $document->getTimeline();
foreach($timeline as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName()));
break;
case 'status_change':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
if($timeline) {
foreach($timeline as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName()));
break;
case 'status_change':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
}
$item['msg'] = $msg;
}
$item['msg'] = $msg;
$this->printTimeline($timeline, 300, '', date('Y-m-d'));
}
$this->printTimeline($timeline);
}
?>
</div>