* rewrite the doc-view page.
This commit is contained in:
@@ -391,10 +391,11 @@ class doc extends control
|
||||
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$doc->lib"), $this->libs[$doc->lib]);
|
||||
$this->view->position[] = $this->lang->doc->view;
|
||||
|
||||
$this->view->doc = $doc;
|
||||
$this->view->lib = $lib;
|
||||
$this->view->actions = $this->loadModel('action')->getList('doc', $docID);
|
||||
$this->view->users = $this->user->getPairs('noclosed,nodeleted');
|
||||
$this->view->doc = $doc;
|
||||
$this->view->lib = $lib;
|
||||
$this->view->actions = $this->loadModel('action')->getList('doc', $docID);
|
||||
$this->view->users = $this->user->getPairs('noclosed,nodeleted,noletter');
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('doc', $docID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -29,8 +29,7 @@ $lang->doc->addedBy = 'Added by';
|
||||
$lang->doc->addedDate = 'Added date';
|
||||
$lang->doc->editedBy = 'Edited by';
|
||||
$lang->doc->editedDate = 'Edited date';
|
||||
$lang->doc->manage = 'Doc type';
|
||||
$lang->doc->manageType = 'Manage type';
|
||||
$lang->doc->basicInfo = 'Basic Info';
|
||||
|
||||
$lang->doc->moduleDoc = 'By module';
|
||||
$lang->doc->searchDoc = 'By search';
|
||||
@@ -46,10 +45,12 @@ $lang->doc->edit = 'Edit doc';
|
||||
$lang->doc->delete = 'Delete doc';
|
||||
$lang->doc->browse = 'Browse doc';
|
||||
$lang->doc->view = 'View doc';
|
||||
$lang->doc->manageType = 'Manage type';
|
||||
|
||||
$lang->doc->libName = 'Library name';
|
||||
$lang->doc->createLib = 'Create library';
|
||||
$lang->doc->editLib = 'Edit library';
|
||||
$lang->doc->deleteLib = 'Delete library';
|
||||
$lang->doc->libName = 'Library name';
|
||||
|
||||
/* Browse tabs. */
|
||||
$lang->doc->allProduct = 'All products';
|
||||
|
||||
@@ -29,8 +29,7 @@ $lang->doc->addedBy = '由谁添加';
|
||||
$lang->doc->addedDate = '添加时间';
|
||||
$lang->doc->editedBy = '由谁编辑';
|
||||
$lang->doc->editedDate = '编辑时间';
|
||||
$lang->doc->manage = '文档分类';
|
||||
$lang->doc->manageType = '维护分类';
|
||||
$lang->doc->basicInfo = '基本信息';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
@@ -46,10 +45,12 @@ $lang->doc->edit = '编辑文档';
|
||||
$lang->doc->delete = '删除文档';
|
||||
$lang->doc->browse = '文档列表';
|
||||
$lang->doc->view = '文档详情';
|
||||
$lang->doc->manageType = '维护分类';
|
||||
|
||||
$lang->doc->libName = '文档库名称';
|
||||
$lang->doc->createLib = '创建文档库';
|
||||
$lang->doc->editLib = '编辑文档库';
|
||||
$lang->doc->deleteLib = '删除文档库';
|
||||
$lang->doc->libName = '文档库名称';
|
||||
|
||||
/* 查询条件列表 */
|
||||
$lang->doc->allProduct = '所有产品';
|
||||
|
||||
@@ -35,7 +35,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$libID&view=doc", $lang->doc->manage);?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$libID&view=doc", $lang->doc->manageType);?>
|
||||
<?php if(is_numeric($libID)) common::printLink('tree', 'fix', "root=$libID&type=customdoc", $lang->tree->fix, 'hiddenwin');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,58 +11,95 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<table class='table-1'>
|
||||
<caption>DOC #<?php echo $doc->id . ' ' . $doc->title?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->title;?></th>
|
||||
<td <?php if($doc->deleted) echo "class='deleted'";?>><?php echo $doc->title;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->lib;?></th>
|
||||
<td><?php echo $lib;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $doc->moduleName ? $doc->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->type;?></th>
|
||||
<td><?php echo $lang->doc->types[$doc->type];?></td>
|
||||
</tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->title;?></th>
|
||||
<td><?php echo $doc->title;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->keywords;?></th>
|
||||
<td><?php echo $doc->keywords;?></td>
|
||||
</tr>
|
||||
<tr id='urlBox' <?php if($doc->type != 'url') echo "class='hidden'";?>>
|
||||
<th class='rowhead'><?php echo $lang->doc->url;?></th>
|
||||
<td><?php echo html::a(urldecode($doc->url), '', '_blank');?></td>
|
||||
</tr>
|
||||
<tr id='contentBox' <?php if($doc->type != 'text') echo "class='hidden'";?>>
|
||||
<th class='rowhead'><?php echo $lang->doc->content;?></th>
|
||||
<td class='content'><?php echo $doc->content;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->digest;?></th>
|
||||
<td><?php echo nl2br($doc->digest);?></td>
|
||||
</tr>
|
||||
<tr id='fileBox' <?php if($doc->type != 'file') echo "class='hidden'";?>>
|
||||
<th class='rowhead'><?php echo $lang->files;?></th>
|
||||
<td><?php echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'false'));?></td>
|
||||
<div id='titlebar'>
|
||||
<div id='main' <?php if($doc->deleted) echo "class='deleted'";?>>DOC #<?php echo $doc->id . ' ' . $doc->title;?></div>
|
||||
<div>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->docList ? $this->session->docList : inlink('browse');
|
||||
$params = "docID=$doc->id";
|
||||
if(!$doc->deleted)
|
||||
{
|
||||
ob_start();
|
||||
common::printIcon('doc', 'edit', $params);
|
||||
common::printIcon('doc', 'delete', $params, '', 'button', '', 'hiddenwin');
|
||||
common::printDivider();
|
||||
common::printRPN($browseLink, $preAndNext);
|
||||
|
||||
$actionLinks = ob_get_contents();
|
||||
ob_end_clean();
|
||||
echo $actionLinks;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='cont-rt5'>
|
||||
<tr valign='top'>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->doc->digest;?></legend>
|
||||
<div><?php echo $doc->digest;?></div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->doc->keywords;?></legend>
|
||||
<div><?php echo $doc->keywords;?></div>
|
||||
</fieldset>
|
||||
<?php if($doc->type == 'url'):?>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->doc->url;?></legend>
|
||||
<div><?php echo html::a(urldecode($doc->url), '', '_blank');?></div>
|
||||
</fieldset>
|
||||
<?php endif;?>
|
||||
<?php if($doc->type == 'text'):?>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->doc->content;?></legend>
|
||||
<div class='content'><?php echo $doc->content;?></div>
|
||||
</fieldset>
|
||||
<?php endif;?>
|
||||
<?php if($doc->type == 'file'):?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true'));?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<div class='a-center actionlink'><?php if(!$doc->deleted) echo $actionLinks;?></div>
|
||||
</td>
|
||||
<td class='divider'></td>
|
||||
<td class='side'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->doc->basicInfo;?></legend>
|
||||
<table class='table-1 a-left fixed'>
|
||||
<tr>
|
||||
<th class='rowhead w-200'><?php echo $lang->doc->lib;?></th>
|
||||
<td><?php echo $lib;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $doc->moduleName ? $doc->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->type;?></th>
|
||||
<td><?php echo $lang->doc->types[$doc->type];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->addedBy;?></th>
|
||||
<td><?php echo $users[$doc->addedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->addedDate;?></th>
|
||||
<td><?php echo $doc->addedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->editedBy;?></th>
|
||||
<td><?php echo $users[$doc->editedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->editedDate;?></th>
|
||||
<td><?php echo $doc->editedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->docList ? $this->session->docList : inlink('browse');
|
||||
if(!$doc->deleted)
|
||||
{
|
||||
common::printLink('doc', 'edit', "docID=$doc->id", $lang->edit);
|
||||
common::printLink('doc', 'delete', "docID=$doc->id", $lang->delete, 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user