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(); $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);

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 * @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
} /* }}} */ } /* }}} */
} }

View File

@ -87,6 +87,7 @@ echo "</div>\n";
echo "<div class=\"span9\">\n"; echo "<div class=\"span9\">\n";
$this->contentHeading(getMLText("timeline")); $this->contentHeading(getMLText("timeline"));
if($data) {
foreach($data as &$item) { foreach($data as &$item) {
switch($item['type']) { switch($item['type']) {
case 'add_version': case 'add_version':
@ -103,7 +104,8 @@ $this->contentHeading(getMLText("timeline"));
} }
$item['msg'] = $msg; $item['msg'] = $msg;
} }
$this->printTimeline($data, 550); $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";

View File

@ -1404,6 +1404,7 @@ 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();
if($timeline) {
foreach($timeline as &$item) { foreach($timeline as &$item) {
switch($item['type']) { switch($item['type']) {
case 'add_version': case 'add_version':
@ -1420,7 +1421,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
} }
$item['msg'] = $msg; $item['msg'] = $msg;
} }
$this->printTimeline($timeline); $this->printTimeline($timeline, 300, '', date('Y-m-d'));
}
} }
?> ?>
</div> </div>