This commit is contained in:
tianshujie
2023-04-07 09:43:54 +08:00
parent 22f8b70387
commit 7b1a0fb936
3 changed files with 9 additions and 11 deletions
+4 -6
View File
@@ -178,24 +178,22 @@ class api extends control
/**
* Release list.
*
* @param int $libID
* @param int $libID
* @param string $orderBy
* @access public
* @return void
*/
public function releases($libID, $orderBy = 'id', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function releases($libID, $orderBy = 'id')
{
$libs = $this->doc->getApiLibs();
$this->app->loadClass('pager', $static = true);
$this->lang->modulePageNav = $this->generateLibsDropMenu($libs[$libID]);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Append id for secend sort. */
$sort = common::appendOrder($orderBy);
$releases = $this->api->getReleaseByQuery($libID, $pager, $sort);
$releases = $this->api->getReleaseByQuery($libID, '', $sort);
$this->view->releases = $releases;
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->title = $this->lang->api->managePublish;
$this->view->libID = $libID;
+2
View File
@@ -2,3 +2,5 @@
.c-actions {width: 60px;}
tbody tr td {white-space: nowrap; overflow: hidden; text-overflow: clip;}
#mainContent {max-height: 400px;}
#releaseListForm {margin-bottom: 20px;}
+3 -5
View File
@@ -13,7 +13,6 @@
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<div class="cell" id="queryBox" data-module='user'></div>
<div id='mainMenu' class='clearfix'>
<div class='main-header'>
<h2><?php echo $lang->api->managePublish;?></h2>
@@ -24,11 +23,11 @@
<p><span class="text-muted"><?php echo $lang->noData;?></span></p>
</div>
<?php else:?>
<form class='main-table table-user' data-ride='table' method='post' data-checkable='false' id='userListForm'>
<table class='table has-sort-head' id='userList'>
<form class='main-table' method='post' id='releaseListForm'>
<table class='table has-sort-head' id='releaseList'>
<thead>
<tr>
<?php $vars = "libID={$libID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<?php $vars = "libID={$libID}&orderBy=%s";?>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='c-version'><?php common::printOrderLink('version', $orderBy, $vars, $lang->api->version);?></th>
<th class='c-name'><?php echo $lang->api->desc;?></th>
@@ -52,7 +51,6 @@
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
</form>
<?php endif;?>
</div>