diff --git a/module/doc/control.php b/module/doc/control.php index 4cd5c2643e..775531fe04 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -904,10 +904,11 @@ class doc extends control * @param int $objectID projectID|productID * @param int $libID * @param int $docID + * @param int $version * @access public * @return void */ - public function objectLibs($type, $objectID = 0, $libID = 0, $docID = 0) + public function objectLibs($type, $objectID = 0, $libID = 0, $docID = 0, $version = 0) { $this->session->set('docList', $this->app->getURI(true), 'doc'); @@ -982,7 +983,7 @@ class doc extends control /* Get doc. */ if($docID) { - $doc = $this->doc->getById($docID, 0, true); + $doc = $this->doc->getById($docID, $version, true); if(!$doc) die(js::error($this->lang->notFound) . js::locate('back')); if($doc->contentType == 'markdown') @@ -1002,6 +1003,7 @@ class doc extends control $this->view->docID = $docID; $this->view->doc = $docID ? $doc : ''; $this->view->type = $type; + $this->view->version = $version; $this->view->object = $object; $this->view->objectType = $type; $this->view->libID = $libID; diff --git a/module/doc/css/objectlibs.css b/module/doc/css/objectlibs.css index 355224e6b0..b875b16044 100644 --- a/module/doc/css/objectlibs.css +++ b/module/doc/css/objectlibs.css @@ -9,8 +9,10 @@ .side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;} .side-col .tips {padding: 0 10px;} .main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;} -.main-col .doc-title .title {margin-right: 10px; line-height: 32px;} +.main-col .doc-title .title {margin-right: 10px; line-height: 32px; font-size: 25px;} .main-col .doc-title .info {flex: 1 1 0;} +.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;} +.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;} .main-col .doc-title .actions a {margin-right: 8px;} .main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;} #sidebar {width: 275px;} diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index a4d175a197..33b29e2f66 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -6,7 +6,22 @@
title;?>
-
+
+
+ + #version;?> + + + +
+
diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index c581fa5042..47555a9600 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -36,8 +36,8 @@ - id}");?>"> - title;?> + + createLink('doc', 'view', "docID={$doc->id}", '', true), $doc->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'")?> fileSize ? $doc->fileSize : '-';?> addedBy);?> editedDate) ? formatTime($doc->addedDate, 'Y-m-d') : formatTime($doc->editedDate, 'Y-m-d');?> @@ -142,8 +142,8 @@ - id}");?>"> - title;?> + + createLink('doc', 'view', "docID={$doc->id}", '', true), $doc->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'")?> fileSize ? $doc->fileSize : '-';?> addedBy);?> editedDate) ? formatTime($doc->editedDate, 'Y-m-d') : formatTime($doc->addedDate, 'y-m-d');?> @@ -173,8 +173,8 @@ - id}");?>"> - title;?> + + createLink('doc', 'view', "docID={$doc->id}", '', true), $doc->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'")?> addedBy);?> editedDate) ? formatTime($doc->editedDate, 'Y-m-d') : formatTime($doc->addedDate, 'y-m-d');?> diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index bd2734a3d0..4a1a00a251 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -14,7 +14,7 @@ openApp == 'execution'):;?> -
+