+ add doc view file.
This commit is contained in:
@@ -10,6 +10,8 @@ $config->action->objectTables['bug'] = TABLE_BUG;
|
||||
$config->action->objectTables['case'] = TABLE_CASE;
|
||||
$config->action->objectTables['testtask'] = TABLE_TESTTASK;
|
||||
$config->action->objectTables['user'] = TABLE_USER;
|
||||
$config->action->objectTables['doc'] = TABLE_DOC;
|
||||
$config->action->objectTables['doclib'] = TABLE_DOCLIB;
|
||||
|
||||
$config->action->objectNameFields['product'] = 'name';
|
||||
$config->action->objectNameFields['story'] = 'title';
|
||||
@@ -22,3 +24,5 @@ $config->action->objectNameFields['bug'] = 'title';
|
||||
$config->action->objectNameFields['case'] = 'title';
|
||||
$config->action->objectNameFields['testtask'] = 'name';
|
||||
$config->action->objectNameFields['user'] = 'account';
|
||||
$config->action->objectNameFields['doc'] = 'title';
|
||||
$config->action->objectNameFields['doclib'] = 'name';
|
||||
|
||||
@@ -42,11 +42,14 @@ $lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['testtask'] = '测试任务';
|
||||
$lang->action->objectTypes['user'] = '用户';
|
||||
$lang->action->objectTypes['doc'] = '文档';
|
||||
$lang->action->objectTypes['doclib'] = '文档库';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->created = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
@@ -64,6 +67,7 @@ $lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label->created = '创建了';
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->created = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
@@ -104,5 +108,6 @@ $lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|browse|libID=%s';
|
||||
$lang->action->label->doc = '文档|doc|view|docID=%s';
|
||||
$lang->action->label->user = '用户';
|
||||
$lang->action->label->doc = '文档|doc|view|docID=%s';
|
||||
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
@@ -42,11 +42,14 @@ $lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['testtask'] = '測試任務';
|
||||
$lang->action->objectTypes['user'] = '用戶';
|
||||
$lang->action->objectTypes['doc'] = '文檔';
|
||||
$lang->action->objectTypes['doclib'] = '文檔庫';
|
||||
|
||||
/* 用來描述操作歷史記錄。*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 創建。';
|
||||
$lang->action->desc->created = '$date, 由 <strong>$actor</strong> 創建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 變更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 編輯。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 關閉。';
|
||||
@@ -61,6 +64,7 @@ $lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,舊值
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,區別為:<blockquote>%s</blockquote>';
|
||||
|
||||
/* 用來顯示動態信息。*/
|
||||
$lang->action->label->created = '創建了';
|
||||
$lang->action->label->opened = '創建了';
|
||||
$lang->action->label->changed = '變更了';
|
||||
$lang->action->label->edited = '編輯了';
|
||||
@@ -95,5 +99,6 @@ $lang->action->label->case = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = '測試任務|testtask|view|caseID=%s';
|
||||
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->user = '用戶';
|
||||
$lang->action->label->doc = '文檔|doc|view|docID=%s';
|
||||
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* @copyright Copyright 2009-2010 青島易軟天創網絡科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id: zh-tw.php 972 2010-07-28 06:14:58Z wwccss $
|
||||
* @version $Id: zh-tw.php 993 2010-08-02 10:20:01Z wwccss $
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* 欄位列表。*/
|
||||
@@ -139,9 +139,9 @@ $lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
|
||||
$lang->bug->setTemplateTitle = '請輸入bug模板標題(保存之前請先填寫bug重現步驟):';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tblStep = "[步驟]\n";
|
||||
$lang->bug->tblResult = "[結果]\n";
|
||||
$lang->bug->tblExpect = "[期望]\n";
|
||||
$lang->bug->tplStep = "[b][步驟][/b]\n\n";
|
||||
$lang->bug->tplResult = "[b][結果][/b]\n\n";
|
||||
$lang->bug->tplExpect = "[b][期望][/b]\n\n";
|
||||
|
||||
/* 各個欄位取值列表。*/
|
||||
$lang->bug->severityList[3] = '3';
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* @copyright Copyright 2009-2010 青島易軟天創網絡科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: zh-tw.php 988 2010-07-31 07:14:46Z wwccss $
|
||||
* @version $Id: zh-tw.php 993 2010-08-02 10:20:01Z wwccss $
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->arrow = ' » ';
|
||||
@@ -53,6 +53,7 @@ $lang->confirm = '確認';
|
||||
$lang->preview = '預覽';
|
||||
$lang->goback = '返回';
|
||||
$lang->showHelp = '顯示幫助';
|
||||
$lang->closeHelp = '關閉幫助';
|
||||
$lang->go = 'GO!';
|
||||
|
||||
$lang->actions = '操作';
|
||||
@@ -275,7 +276,7 @@ $lang->smilies->angry = '憤怒';
|
||||
$lang->smilies->cool = '耍酷';
|
||||
$lang->smilies->indifferent = '冷漠';
|
||||
$lang->smilies->sick = '病中';
|
||||
$lang->smilies->blush = '尷尬';
|
||||
$lang->smilies->blush = '臉紅';
|
||||
$lang->smilies->angel = '天使';
|
||||
$lang->smilies->confused = '困惑';
|
||||
$lang->smilies->cry = '大哭';
|
||||
|
||||
@@ -126,12 +126,11 @@ class doc extends control
|
||||
else
|
||||
{
|
||||
$this->doc->delete(TABLE_DOCLIB, $libID);
|
||||
//$this->session->set('doc', ''); // 清除session。
|
||||
die(js::locate($this->createLink('doc', 'browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 创建文档。extras是其他的参数,key和value之间使用=连接,多个键值对之间使用,隔开。*/
|
||||
/* 创建文档。*/
|
||||
public function create($libID, $moduleID = 0, $productID = 0, $projectID = 0)
|
||||
{
|
||||
//if(empty($this->libs)) $this->locate($this->createLink('doc', 'createLib'));
|
||||
@@ -188,7 +187,121 @@ class doc extends control
|
||||
//$this->view->keywords = $keywords;
|
||||
//$this->view->url = $url;
|
||||
//$this->view->views = $views;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑文档。*/
|
||||
public function edit($docID)
|
||||
{
|
||||
/* 更新文档信息。*/
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->doc->update($docID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('doc', $docID);
|
||||
if(!empty($changes) or !empty($files))
|
||||
{
|
||||
$action = !empty($changes) ? 'Edited' : 'Commented';
|
||||
$fileAction = '';
|
||||
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
|
||||
$actionID = $this->action->create('doc', $docID, $action, $fileAction);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 查找当前文档信息。*/
|
||||
$doc = $this->doc->getById($docID);
|
||||
|
||||
/* 设置菜单。*/
|
||||
$libID = $doc->lib;
|
||||
$this->doc->setMenu($this->libs, $libID);
|
||||
|
||||
/* 获得子模块列表。*/
|
||||
if($libID == 'product' or $libID == 'project')
|
||||
{
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu(0, $libID . 'doc', $startModuleID = 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($libID, 'customdoc', $startModuleID = 0);
|
||||
}
|
||||
|
||||
/* 位置信息。*/
|
||||
$this->view->header->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->users = $this->user->getPairs('noclosed,nodeleted');
|
||||
$this->view->title = $doc->title;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->moduleID = $doc->module;
|
||||
$this->view->productID = $doc->product;
|
||||
$this->view->projectID = $doc->project;
|
||||
//$this->view->type = $type;
|
||||
//$this->view->digest = $digest;
|
||||
//$this->view->content = $content;
|
||||
//$this->view->keywords = $keywords;
|
||||
//$this->view->url = $url;
|
||||
//$this->view->views = $views;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 查看一个文档。*/
|
||||
public function view($docID)
|
||||
{
|
||||
/* 查找文档信息。*/
|
||||
$doc = $this->doc->getById($docID);
|
||||
if(!$doc) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* 设置菜单。*/
|
||||
$libID = $doc->lib;
|
||||
$this->doc->setMenu($this->libs, $doc->lib);
|
||||
|
||||
/* 位置信息。*/
|
||||
$this->view->header->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->doc = $doc;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->actions = $this->loadModel('action')->getList('doc', $docID);
|
||||
$this->view->users = $this->user->getPairs('noclosed,nodeleted');
|
||||
$this->view->title = $doc->title;
|
||||
$this->view->moduleID = $doc->module;
|
||||
$this->view->productID = $doc->product;
|
||||
$this->view->projectID = $doc->project;
|
||||
//$this->view->type = $type;
|
||||
//$this->view->digest = $digest;
|
||||
//$this->view->content = $content;
|
||||
//$this->view->keywords = $keywords;
|
||||
//$this->view->url = $url;
|
||||
//$this->view->views = $views;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除文档。*/
|
||||
public function delete($docID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->doc->confirmDelete, inlink('delete', "docID=$docID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doc->delete(TABLE_DOC, $docID);
|
||||
die(js::locate($this->session->docList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 删除一个文件。*/
|
||||
public function deleteFile($fileID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec();
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* 字段列表。*/
|
||||
$lang->doc->common = '缺陷管理';
|
||||
$lang->doc->common = '文档视图';
|
||||
$lang->doc->id = '文档编号';
|
||||
$lang->doc->product = '所属产品';
|
||||
$lang->doc->product = '所属项目';
|
||||
@@ -48,13 +48,16 @@ $lang->doc->moduleOrder = '模块排序';
|
||||
$lang->doc->index = '首页';
|
||||
$lang->doc->create = '创建文档';
|
||||
$lang->doc->edit = '编辑文档';
|
||||
$lang->doc->delete = '删除文档';
|
||||
$lang->doc->browse = '文档列表';
|
||||
$lang->doc->view = '文档详情';
|
||||
$lang->doc->createLib = '创建文档库';
|
||||
$lang->doc->editLib = '编辑文档库';
|
||||
$lang->doc->deleteLib = '删除文档库';
|
||||
$lang->doc->libName = '文档库名称';
|
||||
|
||||
$lang->doc->systemLibs['product'] = '产品文档库';
|
||||
$lang->doc->systemLibs['project'] = '项目文档库';
|
||||
|
||||
$lang->doc->confirmDeleteLib = " 您确定删除该文档库吗?";
|
||||
$lang->doc->confirmDeleteLib = " 您确定删除该文档库吗?";
|
||||
$lang->doc->confirmDelete = " 您确定删除该文档吗?";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* 欄位列表。*/
|
||||
$lang->doc->common = '缺陷管理';
|
||||
$lang->doc->common = '文檔視圖';
|
||||
$lang->doc->id = '文檔編號';
|
||||
$lang->doc->product = '所屬產品';
|
||||
$lang->doc->product = '所屬項目';
|
||||
@@ -48,13 +48,16 @@ $lang->doc->moduleOrder = '模組排序';
|
||||
$lang->doc->index = '首頁';
|
||||
$lang->doc->create = '創建文檔';
|
||||
$lang->doc->edit = '編輯文檔';
|
||||
$lang->doc->delete = '刪除文檔';
|
||||
$lang->doc->browse = '文檔列表';
|
||||
$lang->doc->view = '文檔詳情';
|
||||
$lang->doc->createLib = '創建文檔庫';
|
||||
$lang->doc->editLib = '編輯文檔庫';
|
||||
$lang->doc->deleteLib = '刪除文檔庫';
|
||||
$lang->doc->libName = '文檔庫名稱';
|
||||
|
||||
$lang->doc->systemLibs['product'] = '產品文檔庫';
|
||||
$lang->doc->systemLibs['project'] = '項目文檔庫';
|
||||
|
||||
$lang->doc->confirmDeleteLib = " 您確定刪除該文檔庫嗎?";
|
||||
$lang->doc->confirmDeleteLib = " 您確定刪除該文檔庫嗎?";
|
||||
$lang->doc->confirmDelete = " 您確定刪除該文檔嗎?";
|
||||
|
||||
@@ -101,6 +101,18 @@ class docModel extends model
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 获取一个文档的详细信息。*/
|
||||
public function getById($docID)
|
||||
{
|
||||
$doc = $this->dao->select('*')
|
||||
->from(TABLE_DOC)
|
||||
->where('id')->eq((int)$docID)
|
||||
->fetch();
|
||||
if(!$doc) return false;
|
||||
$doc->files = $this->loadModel('file')->getByObject('doc', $docID);
|
||||
return $doc;
|
||||
}
|
||||
|
||||
/* 创建一个文档。*/
|
||||
public function create()
|
||||
{
|
||||
@@ -108,9 +120,9 @@ class docModel extends model
|
||||
$doc = fixer::input('post')
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', $now)
|
||||
->setDefault('product, project', 0)
|
||||
->specialChars('title, module') //type, digest, content, keyword
|
||||
->cleanInt('product, project')
|
||||
->setDefault('product, project, module', 0)
|
||||
->specialChars('title') //type, digest, content, keyword
|
||||
->cleanInt('product, project, module')
|
||||
->remove('files, labels')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_DOC)
|
||||
@@ -128,6 +140,29 @@ class docModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 更新文档信息。*/
|
||||
public function update($docID)
|
||||
{
|
||||
$oldDoc = $this->getById($docID);
|
||||
$now = helper::now();
|
||||
$doc = fixer::input('post')
|
||||
->cleanInt('product, project, module')
|
||||
->specialChars('title')
|
||||
->remove('files, labels')
|
||||
->setDefault('project,project, module', 0)
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->add('editedDate', $now)
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_DOC)->data($doc)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->doc->edit->requiredFields, 'notempty')
|
||||
->check('title', 'unique', "id != $docID")
|
||||
->where('id')->eq((int)$docID)
|
||||
->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldDoc, $doc);
|
||||
}
|
||||
|
||||
/* 获得某一个产品的文档列表。*/
|
||||
public function getProductDocs($productID)
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ $(document).ready(function()
|
||||
<?php
|
||||
$vars = "doc={$doc->id}";
|
||||
if(!common::printLink('doc', 'edit', $vars, $lang->edit)) echo $lang->edit;
|
||||
if(!common::printLink('doc', 'delete', $vars, $lang->delete)) echo $lang->delete;
|
||||
if(!common::printLink('doc', 'delete', $vars, $lang->delete, 'hiddenwin')) echo $lang->delete;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
79
trunk/module/doc/view/edit.html.php
Normal file
79
trunk/module/doc/view/edit.html.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of doc module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: edit.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script language='Javascript'>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".right a").colorbox({width:500, height:200, iframe:true, transition:'none'});
|
||||
$("#modulemenu a:contains('<?php echo $lang->doc->editLib;?>')").colorbox({width:500, height:200, iframe:true, transition:'none'});
|
||||
});
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->doc->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='select-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->title;?></th>
|
||||
<td><?php echo html::input('title', $title, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->type;?></th>
|
||||
<td><?php echo html::input('type', $type, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->digest;?></th>
|
||||
<td><?php echo html::input('digest', $digest, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->content;?></th>
|
||||
<td><?php echo html::textarea('content', $content, "rows='6' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->keywords;?></th>
|
||||
<td><?php echo html::input('keywords', $keywords, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->url;?></th>
|
||||
<td><?php echo html::input('url', $url, "class='text-1'");?></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->doc->files;?></th>
|
||||
<td><?php echo $this->fetch('file', 'buildform', 'fileCount=2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<?php echo html::submitButton() . html::resetButton() . html::hidden('lib', $libID);?>
|
||||
<?php echo html::hidden('product', $productID) . html::hidden('project', $projectID);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
74
trunk/module/doc/view/view.html.php
Normal file
74
trunk/module/doc/view/view.html.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The view of doc module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: view.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script language='Javascript'>
|
||||
/* 删除文件。*/
|
||||
function deleteFile(fileID)
|
||||
{
|
||||
if(!fileID) return;
|
||||
hiddenwin.location.href =createLink('doc', 'deleteFile', 'fileID=' + fileID);
|
||||
}
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".right a").colorbox({width:500, height:200, iframe:true, transition:'none'});
|
||||
$("#modulemenu a:contains('<?php echo $lang->doc->editLib;?>')").colorbox({width:500, height:200, iframe:true, transition:'none'});
|
||||
});
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $doc->title . $lang->colon . $lang->doc->view;?></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->product;?></th>
|
||||
<td><?php echo $doc->product;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->files;?></th>
|
||||
<td><?php
|
||||
foreach($doc->files as $file)
|
||||
{
|
||||
echo html::a($this->createLink('file', 'download', "fileID=$file->id"), $file->title, '_blank');
|
||||
echo html::commonButton('x', "onclick=deleteFile($file->id)");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->docList ? $this->session->docList : inlink('browse', "docID=$doc->id");
|
||||
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/footer.html.php';?>
|
||||
@@ -191,6 +191,19 @@ $lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
|
||||
/* 文档视图。*/
|
||||
$lang->resource->doc->index = 'index';
|
||||
|
||||
/* 文档。*/
|
||||
$lang->resource->doc->browse = 'browse';
|
||||
$lang->resource->doc->createLib = 'createLib';
|
||||
$lang->resource->doc->editLib = 'editLib';
|
||||
$lang->resource->doc->deleteLib = 'deleteLib';
|
||||
$lang->resource->doc->create = 'create';
|
||||
$lang->resource->doc->view = 'view';
|
||||
$lang->resource->doc->edit = 'edit';
|
||||
$lang->resource->doc->delete = 'delete';
|
||||
|
||||
/* 组织视图。*/
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
|
||||
@@ -191,6 +191,19 @@ $lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
|
||||
/* 文檔視圖。*/
|
||||
$lang->resource->doc->index = 'index';
|
||||
|
||||
/* 文檔。*/
|
||||
$lang->resource->doc->browse = 'browse';
|
||||
$lang->resource->doc->createLib = 'createLib';
|
||||
$lang->resource->doc->editLib = 'editLib';
|
||||
$lang->resource->doc->deleteLib = 'deleteLib';
|
||||
$lang->resource->doc->create = 'create';
|
||||
$lang->resource->doc->view = 'view';
|
||||
$lang->resource->doc->edit = 'edit';
|
||||
$lang->resource->doc->delete = 'delete';
|
||||
|
||||
/* 組織視圖。*/
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
|
||||
Reference in New Issue
Block a user