- [misc] Remove unused view files.
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('moduleTree', $moduleTree);?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col' id='sidebar'>
|
||||
<div class='cell module-tree'>
|
||||
<div class="panel panel-sm with-list">
|
||||
<div class='panel-heading'><i class='icon-list'></i> <strong><?php echo $lang->dev->moduleList?></strong></div>
|
||||
<div id="moduleTree" class="menu-active-primary menu-hover-primary"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col main-content module-col'>
|
||||
<?php if($selectedModule):?>
|
||||
<div class='module-content'>
|
||||
<?php foreach($apis as $api):?>
|
||||
<div class='detail'>
|
||||
<?php
|
||||
$methodName = zget($api, 'name', '');
|
||||
$params = array();
|
||||
if(isset($api['param']))
|
||||
{
|
||||
foreach($api['param'] as $param) $params[] = "{$param['var']}=[{$param['var']}]";
|
||||
}
|
||||
$params = implode('&', $params);
|
||||
?>
|
||||
<div class='detail-title'>
|
||||
<?php
|
||||
echo !empty($api['post']) ? 'GET/POST' : 'GET';
|
||||
echo ' ' . $this->createLink($selectedModule, $methodName, $params, 'json');
|
||||
?>
|
||||
</div>
|
||||
<div class='detail-content'>
|
||||
<?php echo zget($api, 'desc', '');?>
|
||||
<table class='table table-bordered'>
|
||||
<tr>
|
||||
<th><?php echo $lang->dev->params?></th>
|
||||
<th><?php echo $lang->dev->type?></th>
|
||||
<th><?php echo $lang->dev->desc?></th>
|
||||
</tr>
|
||||
<?php if(isset($api['param'])):?>
|
||||
<?php foreach($api['param'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['var']?></td>
|
||||
<td><?php echo $param['type']?></td>
|
||||
<td><?php echo $param['desc']?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php else:?>
|
||||
<tr><td colspan="3"><?php echo $lang->dev->noParams?></td></tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php if(isset($config->dev->postParams[$selectedModule][$methodName])):?>
|
||||
<?php
|
||||
$this->app->loadLang($selectedModule);
|
||||
$this->app->loadConfig($selectedModule);
|
||||
?>
|
||||
<table class='table table-bordered'>
|
||||
<caption><?php echo $lang->dev->post;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->dev->params?></th>
|
||||
<th><?php echo $lang->dev->type?></th>
|
||||
<th><?php echo $lang->dev->desc?></th>
|
||||
</tr>
|
||||
<?php foreach($config->dev->postParams[$selectedModule][$methodName] as $paramName => $paramType):?>
|
||||
<tr>
|
||||
<td><?php echo $paramName?></td>
|
||||
<td><?php echo $paramType?></td>
|
||||
<?php
|
||||
$paramDesc = '';
|
||||
$listKey = $paramName . 'List';
|
||||
if(isset($lang->$selectedModule->$paramName)) $paramDesc .= $lang->$selectedModule->$paramName . ' ';
|
||||
if(isset($lang->$selectedModule->$listKey)) $paramDesc .= sprintf($lang->dev->paramRange, join(' | ', array_keys($lang->$selectedModule->$listKey)));
|
||||
if($paramType == 'date') $paramDesc .= $lang->dev->paramDate;
|
||||
if($paramName == 'color') $paramDesc .= $lang->dev->paramColor;
|
||||
if(isset($config->$selectedModule->$methodName->requiredFields) and strpos($config->$selectedModule->$methodName->requiredFields, $paramName) !== false) $paramDesc .= "<span class='red'>*{$lang->required}</span>";
|
||||
if($paramName == 'product') $paramDesc .= "<span class='red'>*{$lang->required}</span>";
|
||||
if($paramName == 'mailto') $paramDesc .= $lang->dev->paramMailto;
|
||||
?>
|
||||
<td><?php echo $paramDesc?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('tableTree', $tableTree);?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col' id='sidebar'>
|
||||
<div class='cell module-tree'>
|
||||
<div class="panel panel-sm with-list">
|
||||
<div class='panel-heading'><i class='icon-list'></i> <strong><?php echo $lang->dev->dbList?></strong></div>
|
||||
<div id="tableTree" class="menu-active-primary menu-hover-primary"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col main-content module-col'>
|
||||
<?php if($selectedTable):?>
|
||||
<div class='detail module-content'>
|
||||
<div class='detail-title'><?php echo $selectedTable?></div>
|
||||
<div class='detail-content'>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->dev->fields['id']?></th>
|
||||
<th><?php echo $lang->dev->fields['name']?></th>
|
||||
<th><?php echo $lang->dev->fields['desc']?></th>
|
||||
<th><?php echo $lang->dev->fields['type']?></th>
|
||||
<th><?php echo $lang->dev->fields['length']?></th>
|
||||
<th><?php echo $lang->dev->fields['null']?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $i = 1;?>
|
||||
<?php foreach($fields as $key => $field):?>
|
||||
<tr>
|
||||
<td><?php echo $i;?></td>
|
||||
<td><?php echo $key;?></td>
|
||||
<td><?php echo $field['name'];?></td>
|
||||
<td><?php echo $field['type'];?></td>
|
||||
<td><?php echo isset($field['options']['max']) ? $field['options']['max'] : '';?></td>
|
||||
<td><?php echo $field['null'];?></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The editor view file of dev module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package dev
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='text-center'>
|
||||
<?php
|
||||
echo $lang->dev->noteEditor;
|
||||
if(common::hasPriv('editor', 'turnon')) echo html::a($this->createLink('editor', 'turnon', 'status=1'), $lang->dev->switchList[1], '', "class='btn btn-primary'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,106 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The editor view file of dev module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package dev
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('type', $type); ?>
|
||||
<?php js::set('navTypes', $config->dev->navTypes); ?>
|
||||
<?php js::set('menuTree', $menuTree)?>
|
||||
<?php js::set('language', $language)?>
|
||||
<div id='mainMenu' class='clearfix menu-secondary'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="dropdown">
|
||||
<button class="btn" type="button" data-toggle="dropdown"><?php printf($lang->dev->language, $config->langs[str_replace('_', '-', $language)]);?> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php foreach($config->langs as $key => $value):?>
|
||||
<?php
|
||||
$key = str_replace('-', '_', $key);
|
||||
$active = $key == $language ? 'active' : '';
|
||||
?>
|
||||
<li class='<?php echo $active?>'><?php echo html::a(inlink('langItem', "type=$type&module=$module&method=$method&language=$key"), $value);?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php foreach($lang->dev->featureBar['langItem'] as $key => $label):?>
|
||||
<?php $active = $type == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php echo html::a(inlink('langItem', "type=$key&module=&method=&language=$language"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex main-box">
|
||||
<?php if(in_array($type, $config->dev->navTypes)):?>
|
||||
<div class="menu-tree">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input type="search" class="form-control search-input"/>
|
||||
<label class="input-control-icon-left search-icon flex align-center justify-center"><i class="icon icon-search"></i></label>
|
||||
</div>
|
||||
<div id="menuTree" class="menu-active-primary menu-hover-primary"></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<form class='main-form form-ajax flex-1' method='post' id="data-form-<?php echo $type?>">
|
||||
<div class="main-content">
|
||||
<div class="title-content flex">
|
||||
<?php if(str_replace('-', '_', $this->app->getClientLang()) != $language):?>
|
||||
<div class="title"><?php echo $lang->dev->currentLang;?> </div>
|
||||
<?php endif;?>
|
||||
<div class="title"><?php echo $lang->dev->defaultValue?></div>
|
||||
<div class="title title-input"><?php echo $lang->dev->modifyValue?></div>
|
||||
</div>
|
||||
<div class="form-item-content form-active-primary">
|
||||
<?php $isCurrentLang = str_replace('-', '_', $this->app->getClientLang()) == $language;?>
|
||||
<?php foreach($originalLangs as $langKey => $originalLang):?>
|
||||
<?php
|
||||
if(isset($config->custom->commonLang[$originalLang])) continue;
|
||||
$itemKey = "{$moduleName}_{$langKey}";
|
||||
if(!$isCurrentLang) $currentLangs[$langKey] = strtr($currentLangs[$langKey], $currentCommonLang);
|
||||
$defaultValue = $this->dev->parseCommonLang($originalLang);
|
||||
$customedLang = $this->dev->parseCommonLang(zget($customedLangs, $langKey, ''));
|
||||
$originalLang = strtr($originalLang, $config->custom->commonLang);
|
||||
?>
|
||||
<div data-id="<?php echo $itemKey?>" class="form-item flex <?php if(!$isCurrentLang):?>w-expand<?php endif;?>">
|
||||
<?php if(!$isCurrentLang):?>
|
||||
<div data-id="<?php echo $itemKey?>" class="label h-full" title="<?php echo $currentLangs[$langKey]?>"><?php echo $currentLangs[$langKey]?></div>
|
||||
<?php endif;?>
|
||||
<div data-id="<?php echo $itemKey?>" class="label h-full <?php if($language != 'zh-cn') echo 'lg'?>" title="<?php echo $originalLang?>"><?php echo $originalLang?></div>
|
||||
<div class="input-group flex">
|
||||
<i class="icon icon-angle-right text-primary"></i>
|
||||
<?php $originalLangChanged = $this->dev->isOriginalLangChanged($defaultValue, $customedLang);?>
|
||||
<?php if(($originalLangChanged and is_array($customedLang)) or (!$originalLangChanged and is_array($defaultValue))):?>
|
||||
<?php $foreachLang = $originalLangChanged ? $customedLang : $defaultValue;?>
|
||||
<?php foreach($foreachLang as $i => $subLang):?>
|
||||
<?php if(isset($config->custom->commonLang[$subLang])):?>
|
||||
<div class='input-group-addon flex-center' title=<?php echo $config->custom->commonLang[$subLang]?> ><?php echo $config->custom->commonLang[$subLang] . html::hidden("{$itemKey}[]", $subLang);?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$placeholder = $originalLangChanged ? '' : "placeholder='{$subLang}'";
|
||||
$customedSubLang = $subLang;
|
||||
if(!$originalLangChanged) $customedSubLang = empty($customedLang) ? '' : zget($customedLang, $i, '');
|
||||
echo html::input("{$itemKey}[]", $customedSubLang, "class='form-control shadow-primary-hover' $placeholder");
|
||||
?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php else:?>
|
||||
<?php echo html::input($itemKey, $customedLang, "class='form-control shadow-primary-hover' placeholder='{$originalLang}'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<?php echo html::submitButton(); ?>
|
||||
<?php echo html::a(inlink('resetLang', "type={$type}&module={$moduleName}&method={$method}&language={$language}"), $lang->restore, 'hiddenwin', "id='reset' class='btn btn-wide reset-btn'");?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,149 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
include 'header.html.php';
|
||||
js::set('confirmDelete', $lang->api->confirmDelete);
|
||||
?>
|
||||
<div class="main-row" id="mainContent">
|
||||
<div class='side-col' id='sidebar'>
|
||||
<div class='cell module-tree'>
|
||||
<div class="panel panel-sm with-list">
|
||||
<div class='panel-heading'><i class='icon-list'></i> <strong><?php echo $lang->dev->moduleList?></strong></div>
|
||||
<?php echo $moduleTree;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-col main-content module-col">
|
||||
<div class="main-col module-content">
|
||||
<div class="cell" id="content">
|
||||
<div class="no-padding">
|
||||
<div class="detail-title no-padding doc-title">
|
||||
<div class="http-method label"><?php echo $api->method;?></div>
|
||||
<div class="path" title="<?php echo $api->path;?>"><?php echo $api->path;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="title" title="<?php echo $api->title;?>"><?php echo $api->title;?></h2>
|
||||
<div class="desc"><?php echo $api->desc;?></div>
|
||||
<?php if($api->params['header']):?>
|
||||
<h3 class="title"><?php echo $lang->api->header;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['header'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>String</td>
|
||||
<td><?php echo $lang->api->boolList[$param['required']];?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->params['query']):?>
|
||||
<h3 class="title"><?php echo $lang->api->query;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th><?php echo $lang->api->req->type;?></th>
|
||||
<th><?php echo $lang->api->req->required;?></th>
|
||||
<th><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->params['query'] as $param):?>
|
||||
<tr>
|
||||
<td><?php echo $param['field'];?></td>
|
||||
<td>String</td>
|
||||
<td><?php echo $lang->api->boolList[$param['required']];?></td>
|
||||
<td><?php echo $param['desc'];?></td>
|
||||
<tr>
|
||||
<?php endforeach;
|
||||
;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
function parseTree($data, $typeList, $level = 0)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
$str = '<tr>';
|
||||
$field = '';
|
||||
for($i = 0; $i < $level; $i++) $field .= ' '. ($i == $level-1 ? '∟' : ' ') . ' ';
|
||||
$field .= $data['field'];
|
||||
$str .= '<td>' . $field . '</td>';
|
||||
$str .= '<td>' . zget($typeList, $data['paramsType'], '') . '</td>';
|
||||
$str .= '<td class="text-center">' . zget($lang->api->boolList, $data['required'], '') . '</td>';
|
||||
$str .= '<td>' . $data['desc'] . '</td>';
|
||||
$str .= '</tr>';
|
||||
if(isset($data['children']) && count($data['children']) > 0)
|
||||
{
|
||||
$level++;
|
||||
foreach($data['children'] as $item) $str .= parseTree($item, $typeList, $level);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
<?php if($api->params['params']):?>
|
||||
<h3 class="title"><?php echo $lang->api->params;?></h3>
|
||||
<table class="table table-data paramsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th class="w-50px"><?php echo $lang->api->req->type;?></th>
|
||||
<th class="w-50px text-center"><?php echo $lang->api->req->required;?></th>
|
||||
<th class="w-300px"><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php foreach($api->params['params'] as $item) echo parseTree($item, $typeList);?></tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->paramsExample):?>
|
||||
<h3 class="title"><?php echo $lang->api->paramsExample;?></h3>
|
||||
<pre><code><?php echo $api->paramsExample;?></code></pre>
|
||||
<?php endif;?>
|
||||
<?php if($api->response):?>
|
||||
<h3 class="title"><?php echo $lang->api->response;?></h3>
|
||||
<table class="table table-data">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->req->name;?></th>
|
||||
<th class="w-50px"><?php echo $lang->api->req->type;?></th>
|
||||
<th class="w-50px text-center"><?php echo $lang->api->req->required;?></th>
|
||||
<th class="w-300px"><?php echo $lang->api->req->desc;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($api->response as $item) echo parseTree($item, $typeList);?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php if($api->responseExample):?>
|
||||
<h3 class='title'><?php echo $lang->api->responseExample;?></h3>
|
||||
<pre><code><?php echo $api->responseExample;?></code></pre>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user