* add show libs for product or project.
This commit is contained in:
@@ -183,7 +183,7 @@ $lang->product->menu->dynamic = 'Dynamic|product|dynamic|productID=%s';
|
||||
$lang->product->menu->plan = array('link' => 'Plan|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release = array('link' => 'Release|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap = 'Roadmap|product|roadmap|productID=%s';
|
||||
$lang->product->menu->doc = array('link' => 'Doc|product|doc|productID=%s', 'subModule' => 'doc');
|
||||
$lang->product->menu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
|
||||
$lang->product->menu->branch = '@branch@|branch|manage|productID=%s';
|
||||
$lang->product->menu->module = 'Modules|tree|browse|productID=%s&view=story';
|
||||
$lang->product->menu->view = array('link' => 'Info|product|view|productID=%s', 'alias' => 'edit');
|
||||
@@ -214,7 +214,7 @@ $lang->project->menu->dynamic = 'Dynamic|project|dynamic|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->testtask = 'Testtask|project|testtask|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => 'Team|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->doc = array('link' => 'Doc|project|doc|porjectID=%s', 'subModule' => 'doc');
|
||||
$lang->project->menu->doc = array('link' => 'Doc|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = array('link' => "{$lang->productCommon}|project|manageproducts|projectID=%s", 'alias' => 'edit,start,suspend,delay,close');
|
||||
$lang->project->menu->view = 'Info|project|view|projectID=%s';
|
||||
$lang->project->menu->create = array('link' => '<span class="icon-plus"> </span>New|project|create', 'float' => 'right');
|
||||
|
||||
@@ -183,7 +183,7 @@ $lang->product->menu->dynamic = '动态|product|dynamic|productID=%s';
|
||||
$lang->product->menu->plan = array('link' => '计划|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap = '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->doc = array('link' => '文档|product|doc|productID=%s', 'subModule' => 'doc');
|
||||
$lang->product->menu->doc = array('link' => '文档|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
|
||||
$lang->product->menu->branch = '@branch@|branch|manage|productID=%s';
|
||||
$lang->product->menu->module = '模块|tree|browse|productID=%s&view=story';
|
||||
$lang->product->menu->view = array('link' => '概况|product|view|productID=%s', 'alias' => 'edit');
|
||||
@@ -214,7 +214,7 @@ $lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->testtask = '测试|project|testtask|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->doc = array('link' => '文档|project|doc|porjectID=%s', 'subModule' => 'doc');
|
||||
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
$lang->project->menu->view = array('link' => '概况|project|view|projectID=%s', 'alias' => 'edit,start,suspend,putoff,close');
|
||||
$lang->project->menu->create = array('link' => "<i class='icon-plus'></i> 添加{$lang->projectCommon}|project|create", 'float' => 'right');
|
||||
|
||||
+82
-35
@@ -25,6 +25,7 @@ class doc extends control
|
||||
$this->loadModel('action');
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('project');
|
||||
$this->from = $this->cookie->from ? $this->cookie->from : 'doc';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,8 +70,11 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $from = 'doc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->from = $from;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
$this->loadModel('search');
|
||||
|
||||
/* Set browseType.*/
|
||||
@@ -94,8 +98,25 @@ class doc extends control
|
||||
$lib = $this->dao->select('*')->from(TABLE_DOCLIB)->where('id')->eq($libID)->orderBy('id')->fetch();
|
||||
}
|
||||
|
||||
/* Set menu, save session. */
|
||||
$this->doc->setMenu($this->libs, $libID, $type);
|
||||
/* According the from, set menus. */
|
||||
if($from == 'product')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->product->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $lib->product);
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
$this->project->setMenu($this->project->getPairs('nocode'), $lib->project);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doc->setMenu($this->libs, $libID, $type);
|
||||
}
|
||||
$this->session->set('docList', $this->app->getURI(true));
|
||||
|
||||
/* Set header and position. */
|
||||
@@ -113,7 +134,7 @@ class doc extends control
|
||||
$docs = $this->doc->getDocsByBrowseType($libID, $browseType, $queryID, $moduleID, $sort, $pager);
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=$libID&browseType=bySearch&queryID=myQueryID");
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=$libID&browseType=bySearch&queryID=myQueryID&orderBy=$orderBy&from=$from");
|
||||
$this->doc->buildSearchForm($libID, $this->libs, $queryID, $actionURL, $type);
|
||||
|
||||
$this->view->fixedMenu = false;
|
||||
@@ -146,7 +167,8 @@ class doc extends control
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->type = $type;
|
||||
$this->view->crumb = $this->doc->getCrumbs($libID, $moduleID);
|
||||
$this->view->from = $from;
|
||||
$this->view->crumb = $this->doc->getCrumbs($libID, $moduleID, $docID = 0, $from);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -229,12 +251,8 @@ class doc extends control
|
||||
else
|
||||
{
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if(!empty($lib->product) or !empty($lib->project))
|
||||
{
|
||||
$type = !empty($lib->product) ? 'product' : 'project';
|
||||
$count = $this->dao->select('count(*) as count')->from(TABLE_DOCLIB)->where($type)->eq($lib->$type)->fetch('count');
|
||||
if($count == 1)die(js::alert($this->lang->doc->errorEmptySysLib));
|
||||
}
|
||||
if(!empty($lib->main)) die(js::alert($this->lang->doc->errorMainSysLib));
|
||||
|
||||
$this->doc->delete(TABLE_DOCLIB, $libID);
|
||||
die(js::locate($this->createLink('doc', 'browse'), 'parent'));
|
||||
}
|
||||
@@ -251,7 +269,7 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($libID, $moduleID = 0, $productID = 0, $projectID = 0, $from = 'doc')
|
||||
public function create($libID, $moduleID = 0)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -267,13 +285,8 @@ class doc extends control
|
||||
}
|
||||
$this->action->create('doc', $docID, 'Created');
|
||||
|
||||
if($from == 'product') $link = $this->createLink('product', 'doc', "productID={$lib->product}");
|
||||
if($from == 'project') $link = $this->createLink('project', 'doc', "projectID={$lib->project}");
|
||||
if($from == 'doc')
|
||||
{
|
||||
$vars = "libID=$libID&browseType=byModule&moduleID={$this->post->module}";
|
||||
$link = $this->createLink('doc', 'browse', $vars);
|
||||
}
|
||||
$vars = "libID=$libID&browseType=byModule&moduleID={$this->post->module}&orderBy=id_desc&from=$this->from";
|
||||
$link = $this->createLink('doc', 'browse', $vars);
|
||||
die(js::locate($link, 'parent'));
|
||||
}
|
||||
|
||||
@@ -282,14 +295,14 @@ class doc extends control
|
||||
$this->libs = $this->doc->getLibs($type);
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($from == 'product')
|
||||
if($this->from == 'product')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->product->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $lib->product);
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
elseif($from == 'project')
|
||||
elseif($this->from == 'project')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
@@ -301,22 +314,11 @@ class doc extends control
|
||||
$this->doc->setMenu($this->libs, $libID, $type);
|
||||
}
|
||||
|
||||
$libs = $this->libs;
|
||||
if($productID)
|
||||
{
|
||||
$libs = $this->doc->getLibsByObject('product', $productID, 'onlylib');
|
||||
}
|
||||
elseif($projectID)
|
||||
{
|
||||
$libs = $this->doc->getLibsByObject('project', $projectID, 'onlylib');
|
||||
}
|
||||
|
||||
$this->view->title = $this->libs[$libID] . $this->lang->colon . $this->lang->doc->create;
|
||||
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $this->libs[$libID]);
|
||||
$this->view->position[] = $this->lang->doc->create;
|
||||
|
||||
$this->view->libID = $libID;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->type = $type;
|
||||
@@ -419,7 +421,7 @@ class doc extends control
|
||||
$this->view->users = $this->user->getPairs('noclosed,noletter');
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('doc', $docID);
|
||||
$this->view->keTableCSS = $this->doc->extractKETableCSS($doc->content);
|
||||
$this->view->crumb = $this->doc->getCrumbs($lib->id, $doc->module, $docID);
|
||||
$this->view->crumb = $this->doc->getCrumbs($lib->id, $doc->module, $docID, $this->from);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -692,8 +694,8 @@ class doc extends control
|
||||
public function showFiles($type, $objectID)
|
||||
{
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->app->session->set('taskList', $uri);
|
||||
$this->app->session->set('storyList', $uri);
|
||||
$this->app->session->set('taskList', $uri);
|
||||
$this->app->session->set('storyList', $uri);
|
||||
$this->app->session->set('docList', $uri);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
@@ -708,4 +710,49 @@ class doc extends control
|
||||
$this->view->files = $this->doc->getLibFiles($type, $objectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show libs for product or project
|
||||
*
|
||||
* @param string $type
|
||||
* @param int $objectID
|
||||
* @param string $from
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function objectLibs($type, $objectID, $from = 'doc')
|
||||
{
|
||||
$this->from = $from;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
if($from == 'product')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->product->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
$this->project->setMenu($this->project->getPairs('nocode'), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doc->setMenu(array($this->lang->doclib->select), 0, $type);
|
||||
}
|
||||
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $from;
|
||||
$this->view->libs = $this->doc->getLibByObject($type, $objectID);
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
.libs-group-heading {color: #808080; border-bottom:1px solid #ddd; padding:8px; text-align:center; background:#DDF3F5}
|
||||
.libs-group-heading a{display:block;width:100%;height:100%;}
|
||||
.libs-group{padding:10px 10px 10px 10px;}
|
||||
.lib {float: left; display: block; width:80px; padding: 5px; margin:0px 3px; text-align: center; color: #333; overflow: hidden; text-overflow: ellipsis;}
|
||||
.lib .file-icon{font-size:30px;}
|
||||
.lib .lib-name{height: 2em; line-height: 14px; overflow: hidden;}
|
||||
.lib:hover, .lib:focus, .lib:active {border-color: #2e6dad; background-color: #EBF2F9; color: #2e6dad}
|
||||
.crumb{margin-right:10px;}
|
||||
|
||||
#modulemenu .nav > li > .dropdown > a#libType{display:inline-block;}
|
||||
#modulemenu .nav > li > .dropdown.open > a#libType{background:#e5e5e5;}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.lib-heading{border-right:1px solid #ddd;}
|
||||
#libs table td.row{padding:0px;}
|
||||
#libs table td.lib-more{border-left:1px solid #ddd;}
|
||||
#libs table td.lib-more a.more{display:block;width:100%;height:100%}
|
||||
.table.project,.table.product{border:0px;}
|
||||
.table.project tbody td,.table.product tbody td{border-right:1px solid #ddd; width:33.3%;vertical-align: top; padding:0px;}
|
||||
.table.project tbody tr > td:first-child,.table.product tbody tr > td:first-child{padding:0px;}
|
||||
|
||||
@@ -21,9 +21,4 @@ $(document).ready(function()
|
||||
$('[data-id="create"] a').modalTrigger({type: 'iframe', width: 800});
|
||||
$('#modulemenu .nav li').removeClass('active');
|
||||
if(typeof(type) != 'undefined') $('#modulemenu .nav li[data-id="' + type + '"]').addClass('active');
|
||||
|
||||
$('.libs').on('click', '.libs-heading', function()
|
||||
{
|
||||
$(this).closest('.libs').toggleClass('collapsed');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,7 +93,7 @@ $lang->doc->confirmDeleteLib = " Are you sure to delete this doc library?";
|
||||
$lang->doc->errorEditSystemDoc = "System doc library needn't edit";
|
||||
$lang->doc->errorEmptyProduct = "{$lang->productCommon} is empty, can not create doc.";
|
||||
$lang->doc->errorEmptyProject = "{$lang->projectCommon} is empty, can not create doc.";
|
||||
$lang->doc->errorEmptySysLib = "Do not delete all library in system library";
|
||||
$lang->doc->errorMainSysLib = "Do not delete this library in system library";
|
||||
$lang->doc->accessDenied = "Access to this library denied.";
|
||||
$lang->doc->noMatched = "No matched library including '%s'";
|
||||
$lang->doc->versionNotFount = 'Do not found doc in this version';
|
||||
|
||||
@@ -97,7 +97,7 @@ $lang->doc->confirmDeleteLib = "您确定删除该文档库吗?";
|
||||
$lang->doc->errorEditSystemDoc = "系统文档库无需修改。";
|
||||
$lang->doc->errorEmptyProduct = "没有{$lang->productCommon},无法创建文档";
|
||||
$lang->doc->errorEmptyProject = "没有{$lang->projectCommon},无法创建文档";
|
||||
$lang->doc->errorEmptySysLib = "系统文档库不能全部删除!";
|
||||
$lang->doc->errorMainSysLib = "该系统文档库不能删除!";
|
||||
$lang->doc->accessDenied = "您没有权限访问该文档库!";
|
||||
$lang->doc->noMatched = '找不到包含"%s"的文档库';
|
||||
$lang->doc->versionNotFount = '该版本文档不存在';
|
||||
|
||||
@@ -1083,7 +1083,7 @@ class docModel extends model
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCrumbs($libID, $moduleID = 0, $docID = 0)
|
||||
public function getCrumbs($libID, $moduleID = 0, $docID = 0, $from = 'doc')
|
||||
{
|
||||
$lib = $this->getLibById($libID);
|
||||
$parents = $moduleID ? $this->loadModel('tree')->getParents($moduleID) : array();
|
||||
@@ -1097,8 +1097,8 @@ class docModel extends model
|
||||
}
|
||||
$crumb = '';
|
||||
if($objectName) $crumb .= $objectName . $this->lang->arrow;
|
||||
$crumb .= html::a(helper::createLink('doc', 'browse', "libID=$libID"), $lib->name);
|
||||
foreach($parents as $module) $crumb .= $this->lang->arrow . html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m=$module->id"), $module->name);
|
||||
$crumb .= html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=$from"), $lib->name);
|
||||
foreach($parents as $module) $crumb .= $this->lang->arrow . html::a(helper::createLink('doc', 'browse', "libID=$libID&browseType=byModule¶m=$module->id&orderBy=id_desc&from=$from"), $module->name);
|
||||
if($doc) $crumb .= $this->lang->arrow . $doc->title;
|
||||
|
||||
return $crumb;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php if(isset($subLibs[$lib->id])): ?>
|
||||
<?php if($i % 3 == 0) echo "<tr>"?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-<?php echo $type?>-heading'><strong><?php echo $lib->name?></strong></div>
|
||||
<div class='libs-group-heading libs-<?php echo $type?>-heading'><strong><?php echo html::a(inlink('objectLibs', "type=$type&objectID=$lib->id&from=doc"), $lib->name)?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs[$lib->id] as $subLibID => $subLibName):?>
|
||||
<?php
|
||||
@@ -54,7 +54,10 @@
|
||||
<?php else: ?>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($libs as $lib):?>
|
||||
<a class='lib' title='<?php echo $lib->name?>' href='<?php echo inlink('browse', "libID=$lib->id") ?>'><?php echo $lib->name?></a>
|
||||
<a class='lib' title='<?php echo $lib->name?>' href='<?php echo inlink('browse', "libID=$lib->id") ?>'>
|
||||
<i class='file-icon icon icon-folder-close-alt'></i>
|
||||
<div class='lib-name' title='<?php echo $lib->name?>'><?php echo $lib->name?></div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -18,7 +18,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
|
||||
<?php js::set('fixedMenu', $fixedMenu);?>
|
||||
<?php js::set('libID', $libID);?>
|
||||
<?php if(!$fixedMenu) js::set('type', $type);?>
|
||||
<?php if(!$fixedMenu and $this->from != 'doc') js::set('type', 'doc');?>
|
||||
<?php if($this->cookie->browseType == 'bymenu'):?>
|
||||
<?php include __DIR__ . '/browsebymenu.html.php';?>
|
||||
<?php elseif($this->cookie->browseType == 'bytree'):?>
|
||||
@@ -26,14 +26,14 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<?php else:?>
|
||||
<div id='featurebar'>
|
||||
<div class='crumb pull-left'><i class='icon icon-tags'></i> <?php echo $crumb;?></div>
|
||||
<ul class='nav'>
|
||||
<li id='allTab'><?php echo html::a(inlink('browse', "libID=$libID&browseType=all¶m=0&orderBy=$orderBy&from=$from"), $lang->doc->allDoc)?></li>
|
||||
<li id='openedbymeTab'><?php echo html::a(inlink('browse', "libID=$libID&browseType=openedByMe¶m=0&orderBy=$orderBy&from=$from"), $lang->doc->openedByMe)?></li>
|
||||
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> <?php echo $lang->doc->searchDoc;?></a></li>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
<ul class='btn-group nav'>
|
||||
<li id='allTab'><?php echo html::a(inlink('browse', "libID=$libID&browseType=all¶m=0&orderBy=$orderBy"), $lang->doc->allDoc)?></li>
|
||||
<li id='openedbymeTab'><?php echo html::a(inlink('browse', "libID=$libID&browseType=openedByMe¶m=0&orderBy=$orderBy"), $lang->doc->openedByMe)?></li>
|
||||
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> <?php echo $lang->doc->searchDoc;?></a></li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-ellipsis-h'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-cog'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<?php
|
||||
if(common::hasPriv('doc', 'editLib')) echo '<li>' . html::a(inlink('editLib', "rootID=$libID"), $lang->doc->editLib, '', "data-toggle='modal' data-type='iframe' data-width='600px'") . '</li>';
|
||||
@@ -50,7 +50,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<li><?php echo html::a('javascript:setBrowseType("bytree")', "<i class='icon icon-tags'></i> {$lang->doc->browseTypeList['tree']}");?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID&product=0&prject=0&from=doc");?>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID");?>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType == 'bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
@@ -70,7 +70,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed' id='docList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "libID=$libID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<?php $vars = "libID=$libID&browseType=$browseType¶m=$param&orderBy=%s&from=$from&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->doc->title);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->doc->addedBy);?></th>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<style>
|
||||
#filesPanel {margin-bottom:0px;}
|
||||
#filesPanel a {color: #114f8e}
|
||||
#filesPanel a:hover,
|
||||
#filesPanel a:focus,
|
||||
@@ -20,14 +21,14 @@
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<div class='crumb pull-left'><i class='icon icon-tags'></i> <?php echo $crumb;?></div>
|
||||
<ul class='nav'>
|
||||
<li <?php if($orderBy == 'addedDate_desc') echo "class='active'";?>><?php echo html::a(inlink('browse', "libID=$libID&browseType=$browseType¶m=$param&orderBy=addedDate_desc&from=$from"), $lang->doc->orderByOpen)?></li>
|
||||
<li <?php if($orderBy == 'editedDate_desc') echo "class='active'";?>><?php echo html::a(inlink('browse', "libID=$libID&browseType=$browseType¶m=$param&orderBy=editedDate_desc&from=$from"), $lang->doc->orderByEdit)?></li>
|
||||
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> <?php echo $lang->doc->searchDoc;?></a></li>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
<ul class='nav'>
|
||||
<li <?php if($orderBy == 'addedDate_desc') echo "class='active'";?>><?php echo html::a(inlink('browse', "libID=$libID&browseType=$browseType¶m=$param&orderBy=addedDate_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->doc->orderByOpen)?></li>
|
||||
<li <?php if($orderBy == 'editedDate_desc') echo "class='active'";?>><?php echo html::a(inlink('browse', "libID=$libID&browseType=$browseType¶m=$param&orderBy=editedDate_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->doc->orderByEdit)?></li>
|
||||
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i> <?php echo $lang->doc->searchDoc;?></a></li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-ellipsis-h'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-cog'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<?php if(empty($moduleID)):?>
|
||||
<?php
|
||||
@@ -40,7 +41,7 @@
|
||||
if(common::hasPriv('tree', 'delete')) echo '<li>' . html::a($this->createLink('tree', 'delete', "rootID=$libID&moduleID=$moduleID"), $lang->doc->deleteType, 'hiddenwin') . '</li>';
|
||||
?>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc"), $lang->doc->manageType) . '</li>';?>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc&moduleID=$moduleID"), $lang->doc->manageType) . '</li>';?>
|
||||
<li><?php echo html::a(inlink('ajaxFixedMenu', "libID=$libID&type=" . ($fixedMenu ? 'remove' : 'fixed')), $fixedMenu ? $lang->doc->removeMenu : $lang->doc->fixedMenu, "hiddenwin");?></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -52,17 +53,16 @@
|
||||
<li><?php echo html::a('javascript:setBrowseType("bytree")', "<i class='icon icon-tags'></i> {$lang->doc->browseTypeList['tree']}");?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID&product=0&prject=0&from=doc");?>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID");?>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType == 'bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<?php if($modules or $docs):?>
|
||||
<div class='panel' id='filesPanel'>
|
||||
<div class='panel-body clearfix'>
|
||||
<?php foreach($modules as $module):?>
|
||||
<div class='file file-dir'>
|
||||
<a href='<?php echo inlink('browse', "libID=$libID&browseType=bymenu¶m=$module->id")?>'>
|
||||
<a href='<?php echo inlink('browse', "libID=$libID&browseType=bymenu¶m=$module->id&orderBy=$orderBy&from=$from")?>'>
|
||||
<i class='file-icon icon icon-folder-close-alt'></i>
|
||||
<div class='file-name' title='<?php echo $module->name?>'><?php echo $module->name?></div>
|
||||
</a>
|
||||
@@ -81,5 +81,10 @@
|
||||
<div class='panel-footer'><?php $pager->show();?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#filesPanel .panel-body').css('min-height', $('.outer').height() - $('#featurebar').height() - 60);
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class='crumb pull-left'><i class='icon icon-tags'></i> <?php echo $crumb;?></div>
|
||||
<div class='actions'>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-ellipsis-h'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class='icon icon-cog'></i> <?php echo $lang->actions?> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<?php
|
||||
if(common::hasPriv('doc', 'editLib')) echo '<li>' . html::a(inlink('editLib', "rootID=$libID"), $lang->doc->editLib, '', "data-toggle='modal' data-type='iframe' data-width='600px'") . '</li>';
|
||||
@@ -52,7 +52,7 @@
|
||||
<li><?php echo html::a('javascript:setBrowseType("bytree")', "<i class='icon icon-tags'></i> {$lang->doc->browseTypeList['tree']}");?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID&product=0&prject=0&from=doc");?>
|
||||
<?php common::printIcon('doc', 'create', "libID=$libID&moduleID=$moduleID");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?php include '../../common/view/ueditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
|
||||
@@ -90,5 +90,5 @@
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php js::set('type', $type)?>
|
||||
<?php js::set('type', 'doc')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/ueditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('type', $type)?>
|
||||
<?php js::set('type', 'doc')?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<?php if(isset($subLibs['product'][$product->id])):?>
|
||||
<?php if($i % 3 == 0) echo '<tr>'?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-product-heading'><strong><?php echo $product->name?></strong></div>
|
||||
<div class='libs-group-heading libs-product-heading'><strong><?php echo html::a(inlink('objectLibs', "type=product&objectID=$product->id&from=doc"), $product->name)?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs['product'][$product->id] as $libID => $libName):?>
|
||||
<?php
|
||||
@@ -68,7 +68,7 @@
|
||||
<?php if(isset($subLibs['project'][$project->id])):?>
|
||||
<?php if($i % 3 == 0) echo '<tr>'?>
|
||||
<td>
|
||||
<div class='libs-group-heading libs-project-heading'><strong><?php echo $project->name?></strong></div>
|
||||
<div class='libs-group-heading libs-project-heading'><strong><?php echo html::a(inlink('objectLibs', "type=project&objectID=$project->id&from=doc"), $project->name)?></strong></div>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($subLibs['project'][$project->id] as $libID => $libName):?>
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* The objectLibs view file of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<strong><?php echo $object->name?></strong>
|
||||
<div class='actions'><?php echo html::backButton();?></div>
|
||||
</div>
|
||||
<div id='libs'>
|
||||
<div class='libs-group clearfix'>
|
||||
<?php foreach($libs as $libID => $lib):?>
|
||||
<?php
|
||||
if($libID == 'project' and $from != 'doc') continue;
|
||||
|
||||
$libLink = inlink('browse', "libID=$lib->id&browseType=all¶m=0&orderBy=id_desc&from=$from");
|
||||
if($libID == 'project') $libLink = inlink('allLibs', "type=project&extra=product=$lib->id");
|
||||
if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$lib->id");
|
||||
?>
|
||||
<a class='lib' title='<?php echo $lib->name?>' href='<?php echo $libLink?>'>
|
||||
<i class='file-icon icon icon-folder-close-alt'></i>
|
||||
<div class='lib-name' title='<?php echo $lib->name?>'><?php echo $lib->name?></div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('type', 'doc')?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -53,5 +53,5 @@
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
for($i = $doc->version; $i >= 1; $i --)
|
||||
{
|
||||
$class = $i == $version ? " class='active'" : '';
|
||||
echo '<li' . $class .'>' . html::a(inlink('view', "docID=$doc->id&version=$i"), '#' . $i) . '</li>';
|
||||
echo '<li' . $class .'>' . html::a(inlink('view', "docID=$doc->id"), '#' . $i) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -165,6 +165,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('type', $type)?>
|
||||
<?php js::set('type', 'doc')?>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -843,7 +843,7 @@ class productModel extends model
|
||||
}
|
||||
else if($module == 'doc')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "type=product&libID=%s");
|
||||
$link = helper::createLink('doc', 'objectLibs', "type=product&objectID=%s&from=product");
|
||||
}
|
||||
|
||||
return $link;
|
||||
|
||||
@@ -1749,7 +1749,7 @@ class projectModel extends model
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
|
||||
if($module == 'doc') $link = helper::createLink($module, $method, "type=project&libID=%s");
|
||||
if($module == 'doc') $link = helper::createLink('doc', 'objectLibs', "type=project&objectID=%s&from=project");
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user