Merge branch 'seeddms-5.0.x' into develop
|
@ -2521,6 +2521,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
$timeline = array();
|
$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;
|
$queryStr = "SELECT * FROM tblDocumentContent WHERE document = " . $this->_id;
|
||||||
$resArr = $db->getResultArray($queryStr);
|
$resArr = $db->getResultArray($queryStr);
|
||||||
if (is_bool($resArr) && $resArr == false)
|
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']);
|
$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']));
|
$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;
|
$queryStr = "SELECT * FROM tblDocumentFiles WHERE document = " . $this->_id;
|
||||||
$resArr = $db->getResultArray($queryStr);
|
$resArr = $db->getResultArray($queryStr);
|
||||||
|
|
BIN
styles/bootstrap/timeline/img/16/delete.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
styles/bootstrap/timeline/img/16/moveleft.png
Normal file
After Width: | Height: | Size: 553 B |
BIN
styles/bootstrap/timeline/img/16/moveright.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
styles/bootstrap/timeline/img/16/new.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
styles/bootstrap/timeline/img/16/zoomin.png
Normal file
After Width: | Height: | Size: 441 B |
BIN
styles/bootstrap/timeline/img/16/zoomout.png
Normal file
After Width: | Height: | Size: 361 B |
BIN
styles/bootstrap/timeline/img/24/delete.png
Normal file
After Width: | Height: | Size: 944 B |
BIN
styles/bootstrap/timeline/img/24/moveleft.png
Normal file
After Width: | Height: | Size: 679 B |
BIN
styles/bootstrap/timeline/img/24/moveright.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
styles/bootstrap/timeline/img/24/new.png
Normal file
After Width: | Height: | Size: 667 B |
BIN
styles/bootstrap/timeline/img/24/zoomin.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
styles/bootstrap/timeline/img/24/zoomout.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
styles/bootstrap/timeline/img/32/delete.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
styles/bootstrap/timeline/img/32/moveleft.png
Normal file
After Width: | Height: | Size: 590 B |
BIN
styles/bootstrap/timeline/img/32/moveright.png
Normal file
After Width: | Height: | Size: 596 B |
BIN
styles/bootstrap/timeline/img/32/new.png
Normal file
After Width: | Height: | Size: 250 B |
BIN
styles/bootstrap/timeline/img/32/zoomin.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
styles/bootstrap/timeline/img/32/zoomout.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
styles/bootstrap/timeline/img/cluster_bg.png
Normal file
After Width: | Height: | Size: 209 B |
BIN
styles/bootstrap/timeline/img/deleteEvent.png
Normal file
After Width: | Height: | Size: 473 B |
BIN
styles/bootstrap/timeline/img/themeswitcher/buttonbg.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/icon_color_arrow.gif
Normal file
After Width: | Height: | Size: 46 B |
BIN
styles/bootstrap/timeline/img/themeswitcher/menuhoverbg.png
Normal file
After Width: | Height: | Size: 546 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_blitzer.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 10 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_dot_luv.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_flick.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.2 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_le_frog.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_sunny.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_ui_dark.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 5.0 KiB |
BIN
styles/bootstrap/timeline/img/themeswitcher/theme_90_windoze.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
|
@ -2244,7 +2244,9 @@ mayscript>
|
||||||
*
|
*
|
||||||
* @param object $document document
|
* @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">
|
<script type="text/javascript">
|
||||||
var timeline;
|
var timeline;
|
||||||
|
@ -2253,7 +2255,7 @@ mayscript>
|
||||||
data = [
|
data = [
|
||||||
<?php
|
<?php
|
||||||
foreach($timeline as $item) {
|
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
|
// specify options
|
||||||
var options = {
|
var options = {
|
||||||
'width': '100%',
|
'width': '100%',
|
||||||
'height': '<?= $height ?>px',
|
'height': '100%',
|
||||||
'editable': false, // enable dragging and editing events
|
<?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',
|
'style': 'box',
|
||||||
'locale': 'de_DE'
|
'locale': 'de_DE'
|
||||||
};
|
};
|
||||||
|
@ -2279,7 +2292,7 @@ mayscript>
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div id="timeline"></div>
|
<div id="timeline" style="height: <?= $height ?>px;"></div>
|
||||||
<?php
|
<?php
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,23 +87,25 @@ echo "</div>\n";
|
||||||
|
|
||||||
echo "<div class=\"span9\">\n";
|
echo "<div class=\"span9\">\n";
|
||||||
$this->contentHeading(getMLText("timeline"));
|
$this->contentHeading(getMLText("timeline"));
|
||||||
foreach($data as &$item) {
|
if($data) {
|
||||||
switch($item['type']) {
|
foreach($data as &$item) {
|
||||||
case 'add_version':
|
switch($item['type']) {
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
case 'add_version':
|
||||||
break;
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
|
||||||
case 'add_file':
|
break;
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
case 'add_file':
|
||||||
break;
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
|
||||||
case 'status_change':
|
break;
|
||||||
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
case 'status_change':
|
||||||
break;
|
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||||
default:
|
break;
|
||||||
$msg = '???';
|
default:
|
||||||
}
|
$msg = '???';
|
||||||
$item['msg'] = $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";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
|
|
|
@ -1404,23 +1404,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
if($user->isAdmin()) {
|
if($user->isAdmin()) {
|
||||||
$this->contentHeading(getMLText("timeline"));
|
$this->contentHeading(getMLText("timeline"));
|
||||||
$timeline = $document->getTimeline();
|
$timeline = $document->getTimeline();
|
||||||
foreach($timeline as &$item) {
|
if($timeline) {
|
||||||
switch($item['type']) {
|
foreach($timeline as &$item) {
|
||||||
case 'add_version':
|
switch($item['type']) {
|
||||||
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version']));
|
case 'add_version':
|
||||||
break;
|
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version']));
|
||||||
case 'add_file':
|
break;
|
||||||
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName()));
|
case 'add_file':
|
||||||
break;
|
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName()));
|
||||||
case 'status_change':
|
break;
|
||||||
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
case 'status_change':
|
||||||
break;
|
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
|
||||||
default:
|
break;
|
||||||
$msg = '???';
|
default:
|
||||||
|
$msg = '???';
|
||||||
|
}
|
||||||
|
$item['msg'] = $msg;
|
||||||
}
|
}
|
||||||
$item['msg'] = $msg;
|
$this->printTimeline($timeline, 300, '', date('Y-m-d'));
|
||||||
}
|
}
|
||||||
$this->printTimeline($timeline);
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|