* add for doc/testcase/todo xuanxuan view page.
This commit is contained in:
@@ -168,10 +168,7 @@ class router extends baseRouter
|
||||
{
|
||||
parent::parsePathInfo();
|
||||
|
||||
if($this->get->display == 'card')
|
||||
{
|
||||
$this->viewType = 'xhtml';
|
||||
}
|
||||
if($this->get->display == 'card') $this->viewType = 'xhtml';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,9 +182,6 @@ class router extends baseRouter
|
||||
{
|
||||
parent::parseGET();
|
||||
|
||||
if($this->get->display == 'card')
|
||||
{
|
||||
$this->viewType = 'xhtml';
|
||||
}
|
||||
if($this->get->display == 'card') $this->viewType = 'xhtml';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* The view 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 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.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php echo css::internal($keTableCSS);?>
|
||||
<?php $browseLink = $this->session->docList ? $this->session->docList : inlink('browse');?>
|
||||
<style>body{padding:0px;}</style>
|
||||
<div class='xuanxuan-card'>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading strong'>
|
||||
<span class="label label-id"><?php echo $doc->id;?></span> <span class="text" title='<?php echo $doc->title;?>'><?php echo $doc->title;?></span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->doc->content;?></th>
|
||||
<td>
|
||||
<div class="detail-content article-content no-margin no-padding">
|
||||
<?php echo $doc->content;?>
|
||||
|
||||
<?php foreach($doc->files as $file):?>
|
||||
<?php if(in_array($file->extension, $config->file->imageExtensions)):?>
|
||||
<div class='file-image'>
|
||||
<img onload="setImageSize(this, 0)" src="<?php echo $this->createLink('file', 'read', "fileID={$file->id}");?>" alt="<?php echo $file->title?>">
|
||||
</div>
|
||||
<?php unset($doc->files[$file->id]);?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true'));?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($doc->productName):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->product;?></th>
|
||||
<td><?php echo $doc->productName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($doc->projectName):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->project;?></th>
|
||||
<td><?php echo $doc->projectName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->lib;?></th>
|
||||
<td><?php echo $lib->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $doc->moduleName ? $doc->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->addedDate;?></th>
|
||||
<td><?php echo $doc->addedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedBy;?></th>
|
||||
<td><?php echo zget($users, $doc->editedBy);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedDate;?></th>
|
||||
<td><?php echo $doc->editedDate;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -0,0 +1,250 @@
|
||||
<?php
|
||||
/**
|
||||
* The view file of case 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 Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package case
|
||||
* @version $Id: view.html.php 5000 2013-07-03 08:20:57Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php $browseLink = $app->session->caseList != false ? $app->session->caseList : $this->createLink('testcase', 'browse', "productID=$case->product");?>
|
||||
<style>body{padding:0px;}</style>
|
||||
<div class='xuanxuan-card'>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading strong'>
|
||||
<span class='label label-id'><?php echo $case->id;?></span>
|
||||
<span class='text' title='<?php echo $case->title;?>' style='color: <?php echo $case->color; ?>'><?php echo $case->title;?></span>
|
||||
<?php if($case->fromCaseID):?>
|
||||
<small><?php echo html::icon($lang->icons['testcase']) . " {$lang->testcase->fromCase}$lang->colon$case->fromCaseID";?></small>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->precondition;?></th>
|
||||
<td><?php echo nl2br($case->precondition);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->steps;?></th>
|
||||
<td>
|
||||
<table class='table table-condensed table-hover table-striped table-bordered' id='steps'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p70 text-left'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='text-left'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$stepId = $childId = 0;
|
||||
foreach($case->steps as $stepID => $step)
|
||||
{
|
||||
$stepClass = "step-{$step->type}";
|
||||
if($step->type == 'group' or $step->type == 'step')
|
||||
{
|
||||
$stepId++;
|
||||
$childId = 0;
|
||||
}
|
||||
if($step->type == 'step') $stepClass = 'step-group';
|
||||
echo "<tr class='step {$stepClass}'>";
|
||||
echo "<th class='step-id'>$stepId</th>";
|
||||
echo "<td class='text-left'><div class='input-group'>";
|
||||
if($step->type == 'item') echo "<span class='step-item-id'>{$stepId}.{$childId}</span>";
|
||||
echo nl2br(str_replace(' ', ' ', $step->desc)) . "</td>";
|
||||
echo "<td class='text-left'>" . nl2br(str_replace(' ', ' ', $step->expect)) . "</div></td>";
|
||||
echo "</tr>";
|
||||
$childId ++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $case->files, 'fieldset' => 'true'));?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan='2' class='text-left stong'><?php echo $lang->testcase->legendBasicInfo;?></th>
|
||||
</tr>
|
||||
<?php if($isLibCase):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->testcase->lib;?></th>
|
||||
<td><?php echo $libName;?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->testcase->product;?></th>
|
||||
<td><?php echo $productName;?></td>
|
||||
</tr>
|
||||
<?php if($this->session->currentProductType != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($modulePath))
|
||||
{
|
||||
echo "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase and $config->global->flow != 'onlyTest'):?>
|
||||
<tr class='nofixed'>
|
||||
<th><?php echo $lang->testcase->story;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->storyTitle)) echo "#$case->story:$case->storyTitle");
|
||||
if($case->story and $case->storyStatus == 'active' and $case->latestStoryVersion > $case->storyVersion)
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a($this->createLink('testcase', 'confirmStoryChange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->type;?></th>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->stage;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if($case->stage)
|
||||
{
|
||||
$stags = explode(',', $case->stage);
|
||||
foreach($stags as $stage)
|
||||
{
|
||||
if(empty($stage)) continue;
|
||||
isset($lang->testcase->stageList[$stage]) ? print($lang->testcase->stageList[$stage]) : print($stage);
|
||||
echo "<br />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->pri;?></th>
|
||||
<td><span class='label-pri label-pri-<?php echo $case->pri;?>' title='<?php echo zget($lang->testcase->priList, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->status;?></th>
|
||||
<td>
|
||||
<?php
|
||||
echo $lang->testcase->statusList[$case->status];
|
||||
if($case->version > $case->currentVersion and $from == 'testtask')
|
||||
{
|
||||
echo "(<span class='warning'>{$lang->testcase->changed}</span> ";
|
||||
echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id"), $lang->confirm, 'hiddenwin', "class='btn btn-mini btn-info'");
|
||||
echo ")";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunTime;?></th>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo $case->lastRunDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $this->app->loadLang('testtask')->testtask->lastRunResult;?></th>
|
||||
<td><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->keywords;?></th>
|
||||
<td><?php echo $case->keywords;?></td>
|
||||
</tr>
|
||||
<?php if(!$isLibCase):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->linkCase;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'view', "caseID=$linkCaseID", '', true), "#$linkCaseID $linkCaseTitle", '', "class='iframe' data-width='80%'") . '<br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($case->fromBug):?>
|
||||
<tr>
|
||||
<th colspan='2' class='text-left stong'><?php echo $lang->testcase->legendLinkBugs;?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->testcase->fromBug;?></th>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$case->fromBug", '', true), $case->fromBugTitle, '', "class='iframe' data-width='80%'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($case->toBugs):?>
|
||||
<tr>
|
||||
<th class='w-60px' valign="top"><?php echo $lang->testcase->toBug;?></th>
|
||||
<td>
|
||||
<?php
|
||||
foreach($case->toBugs as $bugID => $bugTitle)
|
||||
{
|
||||
echo '<p style="margin-bottom:0;">' . html::a($this->createLink('bug', 'view', "bugID=$bugID", '', true), $bugTitle, '', "class='iframe' data-width='80%'") . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th colspan='2' class='text-left stong'><?php echo $lang->testcase->legendOpenAndEdit;?></tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->testcase->openedBy;?></th>
|
||||
<td><?php echo $users[$case->openedBy] . $lang->at . $case->openedDate;?></td>
|
||||
</tr>
|
||||
<?php if($config->testcase->needReview or !empty($config->testcase->forceReview)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedBy;?></th>
|
||||
<td><?php $reviewedBy = explode(',', $case->reviewedBy); foreach($reviewedBy as $account) echo ' ' . $users[trim($account)]; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->reviewedDate;?></th>
|
||||
<td><?php if($case->reviewedBy) echo $case->reviewedDate;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->lblLastEdited;?></th>
|
||||
<td><?php if($case->lastEditedBy) echo $users[$case->lastEditedBy] . $lang->at . $case->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='page-actions'>
|
||||
<?php
|
||||
if(!$isLibCase)
|
||||
{
|
||||
common::printIcon('testtask', 'results', "runID=$runID&caseID=$case->id&version=$case->version", $case, 'button', '', '', 'results', false, "data-width='95%'");
|
||||
if($caseFails > 0) common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=$runID", $case, 'button', 'bug', '', 'iframe', '', "data-width='90%'");
|
||||
}
|
||||
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', '', '', 'iframe');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The view file of view method of todo 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 Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package todo
|
||||
* @version $Id: view.html.php 4955 2013-07-02 01:47:21Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if(!$todo->private or ($todo->private and $todo->account == $app->user->account)):?>
|
||||
<style>body{padding:0px;}</style>
|
||||
<div class='xuanxuan-card'>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading strong'>
|
||||
<span class="label label-id"><?php echo $todo->id?></span>
|
||||
<span class='text' title='<?php echo $todo->name;?>'><?php echo $todo->name;?></span>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='w-90px'>
|
||||
<?php
|
||||
echo $lang->todo->desc;
|
||||
if($todo->type == 'bug') common::printLink('bug', 'view', "id={$todo->idvalue}", ' BUG#' . $todo->idvalue);
|
||||
if($todo->type == 'task') common::printLink('task', 'view', "id={$todo->idvalue}", ' TASK#' . $todo->idvalue);
|
||||
if($todo->type == 'story') common::printLink('story', 'view', "id={$todo->idvalue}", ' STORY#' . $todo->idvalue);
|
||||
?>
|
||||
</th>
|
||||
<td><?php echo $todo->desc;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->pri;?></th>
|
||||
<td><span title="<?php echo zget($lang->todo->priList, $todo->pri);?>" class='label-pri <?php echo 'label-pri-' . $todo->pri;?>' title='<?php echo zget($lang->todo->priList, $todo->pri, $todo->pri);?>'><?php echo zget($lang->todo->priList, $todo->pri)?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->status;?></th>
|
||||
<td><span class="status-todo status-<?php echo $todo->status;?>"><span class="label label-dot"></span> <?php echo $lang->todo->statusList[$todo->status];?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->type;?></th>
|
||||
<td><?php echo $lang->todo->typeList[$todo->type];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->account;?></th>
|
||||
<td><?php echo zget($users, $todo->account);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->date;?></th>
|
||||
<td><?php echo $todo->date == '20300101' ? $lang->todo->periods['future'] : formatTime($todo->date, DT_DATE1);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<td><?php if(isset($times[$todo->begin])) echo $times[$todo->begin]; if(isset($times[$todo->end])) echo ' ~ ' . $times[$todo->end];?></td>
|
||||
</tr>
|
||||
<?php if(isset($todo->assignedTo)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->assignTo;?></th>
|
||||
<td><?php echo zget($users, $todo->assignedTo);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->assignTo . $lang->todo->date;?></th>
|
||||
<td><?php echo formatTime($todo->assignedDate, DT_DATE1);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('todoID', $todo->id);?>
|
||||
<?php else:?>
|
||||
<?php echo $lang->todo->thisIsPrivate;?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
Reference in New Issue
Block a user