- Remove sidebar and header in doc module.

This commit is contained in:
zhujinyong
2021-04-01 13:29:11 +08:00
parent cca579705e
commit 8da3e5ed4a
5 changed files with 31 additions and 66 deletions
+14 -14
View File
@@ -316,24 +316,24 @@ $lang->devops->menuOrder[25] = 'rules';
/* Doc menu.*/
$lang->doc->menu = new stdclass();
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|recent");
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|my");
$lang->doc->menu->favorite = array('link' => "{$lang->doc->favorite}|doc|favorite");
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|product");
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|project");
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|project");
$lang->doc->menu->wiki = array('link' => "{$lang->doc->wiki}|doc|project");
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|libID=0&browseTyp=byediteddate", 'alias' => 'recent');
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|libID=0&browseTyp=openedbyme", 'alias' => 'my');
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|libID=0&browseTyp=collectedbyme", 'alias' => 'collect');
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|objectLibs|type=product");
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|objectLibs|type=project");
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|objectLibs|libID=0");
$lang->doc->dividerMenu = ',product,';
/* Doc menu order. */
$lang->doc->menuOrder[5] = 'recent';
$lang->doc->menuOrder[10] = 'my';
$lang->doc->menuOrder[15] = 'favorite';
$lang->doc->menuOrder[20] = 'product';
$lang->doc->menuOrder[25] = 'project';
$lang->doc->menuOrder[30] = 'custom';
$lang->doc->menuOrder[35] = 'wiki';
$lang->doc->menuOrder[5] = 'dashboard';
$lang->doc->menuOrder[10] = 'recent';
$lang->doc->menuOrder[15] = 'my';
$lang->doc->menuOrder[20] = 'collect';
$lang->doc->menuOrder[25] = 'product';
$lang->doc->menuOrder[30] = 'project';
$lang->doc->menuOrder[35] = 'custom';
/* Report menu.*/
$lang->report->menu = new stdclass();
+15 -6
View File
@@ -70,9 +70,8 @@ class doc extends control
* Browse docs.
*
* @param string|int $libID product|execution or the int id of custom library
* @param int $moduleID
* @param int $productID
* @param int $executionID
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param string $from doc|project|product
* @param int $recTotal
@@ -160,6 +159,16 @@ class doc extends control
{
$libs = $this->doc->getAllLibsByType('collector');
$this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
$this->app->rawMethod = 'collect';
}
elseif($browseType == 'openedbyme')
{
$this->app->rawMethod = 'my';
}
elseif($browseType == 'byediteddate')
{
$this->app->rawMethod = 'recent';
}
$attachLibs = array();
@@ -842,14 +851,14 @@ class doc extends control
}
/**
* Show libs for product or execution.
* Show libs for product or project.
*
* @param string $type
* @param int $objectID
* @param int $objectID projectID|productID
* @access public
* @return void
*/
public function objectLibs($type, $objectID)
public function objectLibs($type, $objectID = 0)
{
// setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->session->set('docList', $this->app->getURI(true), 'doc');
-1
View File
@@ -67,7 +67,6 @@
.side-col > .cell > header {position: absolute; top: 10px; right: 10px; left: 10px;}
.side-col > .cell > header > .c-sm {padding-right: 20px; width: 60px;}
.side-col .docsTree {position: absolute; top: 53px; left: 0; right: 0; bottom: 0; overflow: auto; padding: 0 10px 10px;}
.main-col .block-files > .panel-body {top: 45px; left: 0; right: 0; bottom: 0; overflow: auto;}
td.c-name a {color: #0c60e1;}
td.c-name a:visited {color: #082999;}
+2 -44
View File
@@ -20,50 +20,9 @@
<?php $spliter = (empty($this->app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
<div class="main-row fade <?php if($spliter) echo 'split-row';?>" id="mainRow">
<?php if($this->from == 'doc') include './side.html.php';?>
<?php if($this->cookie->browseType == 'bygrid'):?>
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
<?php else:?>
<div class="main-col" data-min-width="400">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='doc'></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
<?php if($browseType != 'bysearch'):?>
<i class="icon icon-folder-open-o text-muted"></i>
<?php else:?>
<i class="icon icon-search text-muted"></i>
<?php endif;?>
<?php echo $breadTitle;?>
</div>
<nav class="panel-actions btn-toolbar">
<div class="btn-group">
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
</div>
<?php if($libID and common::canBeChanged('doc', $currentLib)):?>
<div class="dropdown">
<button class="btn" type="button" data-toggle="dropdown"><i class='icon-cog'></i> <span class="caret"></span></button>
<ul class='dropdown-menu'>
<li><?php common::printLink('tree', 'browse', "libID=$libID&viewType=doc&currentModuleID=0&branch=0&from=$from", "<i class='icon icon-cog'></i>" . $lang->doc->manageType);?></li>
<li><?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>" . $lang->doc->editlib, '', "class='iframe'");?></li>
<li><?php common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>" . $lang->doc->deleteLib, 'hiddenwin');?></li>
</ul>
</div>
<?php if(common::hasPriv('doc', 'create')):?>
<div class="dropdown" id='createDropdown'>
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $lang->doc->create;?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php foreach($lang->doc->typeList as $typeKey => $typeName):?>
<?php $class = strpos($config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';?>
<li><?php echo html::a($this->createLink('doc', 'create', "libID=$libID&moduleID=$moduleID&type=$typeKey&from={$lang->navGroup->doc}"), $typeName, '', "class='$class'");?></li>
<?php endforeach;?>
</ul>
</div>
<?php endif;?>
<?php endif;?>
</nav>
</div>
<?php if(empty($docs) and $browseType == 'bysearch'):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noSearchedDoc;?></span></p>
@@ -157,7 +116,7 @@
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title={$doc->title}");?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}", '', true), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title={$doc->title} class='iframe' data-width='90%'");?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
@@ -167,7 +126,7 @@
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'", true, true)?>
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no&from={$lang->navGroup->doc}", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
<?php endif;?>
</td>
@@ -182,6 +141,5 @@
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
-1
View File
@@ -13,7 +13,6 @@
<?php $pageCSS .= $this->doc->appendNavCSS();?>
<?php include '../../common/view/header.html.php';?>
<div class='main-row split-row fade' id='mainRow'>
<?php include './side.html.php';?>
<div class="main-col" data-min-width="400">
<div class="cell" id="queryBox" data-module='doc'></div>
<div class="row">