diff --git a/module/doc/control.php b/module/doc/control.php index 0c5de5bbaf..ec0309240d 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1156,10 +1156,13 @@ class doc extends control * @param int $libID * @param int $queryID * @param string $param + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ - public function tableContents($type, $objectID = 0, $libID = 0, $queryID = 0, $param = '') + public function tableContents($type, $objectID = 0, $libID = 0, $queryID = 0, $param = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) { list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID); $this->session->set('createProjectLocate', $this->app->getURI(true), 'doc'); @@ -1178,10 +1181,14 @@ class doc extends control if($param == 'bySearch') { /* Load pager. */ + $rawMethod = $this->app->rawMethod; + $this->app->rawMethod = 'tableContents'; $this->app->loadClass('pager', $static = true); - $pager = new pager(0, 20, 1); + $pager = new pager($recTotal, $recPerPage, $pageID); + $this->app->rawMethod = $rawMethod; - $this->view->docs = $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID); + $this->view->title = $title; + $this->view->docs = $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager); $this->view->browseType = 'bySearch'; $this->view->pager = $pager; $this->view->param = $param; diff --git a/module/doc/css/browse.css b/module/doc/css/browse.css index d52cf2e338..9f08480a4a 100644 --- a/module/doc/css/browse.css +++ b/module/doc/css/browse.css @@ -1 +1,2 @@ -#pageActions ul.dropdown-menu {left: 67px !important;} +#mainContent .c-id {width: 70px;} +#mainContent .c-id > a {color: #0c60e1;} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 92bdb5fefb..0e2a340b24 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -98,3 +98,7 @@ $(function() } }); }) +$(document).on("click", '#bysearchTab', function() +{ + $('.main-content > .cell > .detail > .menu-actions').remove(); +}); diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 112b990c3d..b27c931f37 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -45,7 +45,7 @@ $lang->doclib->nameList['custom'] = '自定义文档库名称'; /* 字段列表。*/ $lang->doc->common = '文档'; -$lang->doc->id = '编号'; +$lang->doc->id = '文档编号'; $lang->doc->product = '所属' . $lang->productCommon; $lang->doc->project = '所属项目'; $lang->doc->execution = '所属' . $lang->execution->common; diff --git a/module/doc/model.php b/module/doc/model.php index 4a9ceddf2a..4b4c2a1b77 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2841,11 +2841,12 @@ EOT; * @param int $objectID * @param int $libID * @param int $queryID + * @param object $pager * * @access public * @return array */ - public function getDocsBySearch($type, $objectID, $libID, $queryID) + public function getDocsBySearch($type, $objectID, $libID, $queryID, $pager) { $queryName = $type . 'DocQuery'; $queryForm = $type . 'DocForm'; @@ -2876,6 +2877,7 @@ EOT; ->andWhere('lib')->in(array_keys($libs)) ->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi() ->orderBy('id_desc') + ->page($pager) ->fetchAll('id'); $docContents = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->in(array_keys($docs))->orderBy('version,doc')->fetchAll('doc'); diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 508200b39e..deb343f017 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -30,8 +30,13 @@
| doc->title;?> | doc->object;?> | + +doc->id;?> | +doc->title;?> | +doc->size;?> | doc->addedBy;?> | doc->addedDate;?> | @@ -44,6 +49,7 @@ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>|
|---|---|---|---|---|---|---|---|
| createLink('doc', 'view', "docID=$doc->id&version=0", '', true), " " . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?> | @@ -58,6 +64,15 @@ } ?> + + +createLink('doc', 'view', "docID=$doc->id&version=0", '', true), $doc->id, '', "title='{$doc->id}' class='iframe' data-width='90%'");?> | +createLink('doc', 'view', "docID=$doc->id&version=0", '', true), " " . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?> | + +{$doc->id}";?> | +{$doc->title}";?> | + +fileSize ? $doc->fileSize : '-';?> | addedBy);?> | addedDate, 'y-m-d');?> |