Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `zt_release` ADD `marker` enum('0','1') NOT NULL default '0' AFTER `name`;
|
||||
ALTER TABLE `zt_doc` ADD `collector` text NOT NULL default '' AFTER `views`,
|
||||
ADD `visitedDate` text NOT NULL default '' AFTER `editedDate`;
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='mainContent'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-table'>
|
||||
<table class='table has-sort-head'>
|
||||
<?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
body{padding-bottom:0px;background-color:#fff;}
|
||||
#api p{margin: 5px 0 2px 0;}
|
||||
|
||||
@@ -1,42 +1,51 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div class='panel panel-sm' id='api'>
|
||||
<div class='panel-heading'><i class='icon-terminal'></i> <strong><?php echo $method->post ? 'GET/POST ' . $filePath : 'GET ' . $filePath?></strong></div>
|
||||
<div class='panel-body'>
|
||||
<?php echo "<h5>{$lang->api->position}</h5>"?>
|
||||
<?php echo '<code>' . sprintf($lang->api->startLine, $method->fileName, $method->startLine) . '</code>'?>
|
||||
<hr>
|
||||
<?php echo "<h5>{$lang->api->desc}</h5>"?>
|
||||
<?php echo '<pre>' . str_replace("\n", "<Br/>", $method->comment) . '</pre>'?>
|
||||
<hr>
|
||||
<?php echo "<h5>{$lang->api->debug}</h5>"?>
|
||||
<form method='post' id='apiForm' class='form-condensed'>
|
||||
<?php if($method->parameters):?>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($method->parameters as $param):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $param->name?></th>
|
||||
<td><?php echo html::input("$param->name", $param->isOptional() ? $param->getDefaultValue() : '', "class='form-control' autocomplete='off'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td align='center' colspan="2">
|
||||
<?php echo html::submitButton($lang->api->submit)?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<?php echo html::hidden('noparam', '0') . $lang->api->noParam . html::submitButton($lang->api->submit);?>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
<?php if($method->post) echo "<p>{$lang->api->post}</p>"?>
|
||||
<div id="result" class="hidden">
|
||||
<hr>
|
||||
<h5><?php echo $lang->api->url?>:</h5>
|
||||
<div class="url"></div>
|
||||
<h5><?php echo $lang->api->result?>:</h5>
|
||||
<p><?php echo $lang->api->status?>: <code class="status"></code></p>
|
||||
<p><?php echo $lang->api->data?>: <pre class="data"></pre></p>
|
||||
<div class='main-header'>
|
||||
<div class='heading'><i class='icon-terminal'></i> <strong><?php echo $method->post ? 'GET/POST ' . $filePath : 'GET ' . $filePath?></strong></div>
|
||||
</div>
|
||||
<div class='main-content'>
|
||||
<div class='cell'>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->api->position;?></div>
|
||||
<div class='detail-content'><code><?php printf($lang->api->startLine, $method->fileName, $method->startLine);?></code></div>
|
||||
</div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->api->desc;?></div>
|
||||
<div class='detail-content'><pre><?php echo str_replace("\n", "<br />", $method->comment);?></pre></div>
|
||||
</div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->api->debug;?></div>
|
||||
<div class='detail-content'>
|
||||
<form method='post' id='apiForm' class='form-condensed'>
|
||||
<?php if($method->parameters):?>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($method->parameters as $param):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $param->name?></th>
|
||||
<td><?php echo html::input("$param->name", $param->isOptional() ? $param->getDefaultValue() : '', "class='form-control' autocomplete='off'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td align='center' colspan="2">
|
||||
<?php echo html::submitButton($lang->api->submit)?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<?php echo html::hidden('noparam', '0') . $lang->api->noParam . html::submitButton($lang->api->submit);?>
|
||||
<?php endif;?>
|
||||
<?php if($method->post) echo "<p>{$lang->api->post}</p>"?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="result" class="detail hidden">
|
||||
<div class='detail-title'><?php echo $lang->api->url?>:</div>
|
||||
<div class='detail-content'>
|
||||
<div class="url"></div>
|
||||
<h5><?php echo $lang->api->result?>:</h5>
|
||||
<p><?php echo $lang->api->status?>: <code class="status"></code></p>
|
||||
<p><?php echo $lang->api->data?>: <pre class="data"></pre></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,25 +11,23 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['edit']);?></span>
|
||||
<strong><?php echo $lang->backup->change;?></strong>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->backup->change;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' style='padding:10px 5%'>
|
||||
<table class='w-p100'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control' autocomplete='off'");?>
|
||||
<strong class='input-group-addon'><?php echo $lang->day;?></strong>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form class='form-condensed' method='post' target='hiddenwin' style='padding: 30px 5%'>
|
||||
<table class='w-p100'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control' autocomplete='off'");?>
|
||||
<strong class='input-group-addon'><?php echo $lang->day;?></strong>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
<div class='btn-toolbar pull-right'><?php common::printIcon('backup', 'backup', 'reload=yes', '', 'button', 'cloud', 'hiddenwin', 'backup');?></div>
|
||||
</div>
|
||||
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<strong><?php echo $lang->backup->history?></strong>
|
||||
<span class='label label-info'><?php echo $lang->backup->restoreTip;?></span>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<?php echo $lang->backup->history?>
|
||||
<span class='label label-info'><?php echo $lang->backup->restoreTip;?></span>
|
||||
</h2>
|
||||
</div>
|
||||
<table class='table table-condensed table-bordered active-disabled table-fixed'>
|
||||
<thead>
|
||||
|
||||
@@ -875,6 +875,7 @@ class block extends control
|
||||
->orderBy($orderBy)
|
||||
->beginIF($this->viewType != 'json')->limit($num)->fi()
|
||||
->fetchAll('id');
|
||||
$projectIDList = array_keys($projects);
|
||||
|
||||
|
||||
/* Get tasks. */
|
||||
|
||||
@@ -307,38 +307,37 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
div>
|
||||
|
||||
php
|
||||
arams = "bugID=$bug->id";
|
||||
opyParams = "productID=$productID&branch=$bug->branch&extras=bugID=$bug->id";
|
||||
onvertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&bugID=$bug->id";
|
||||
|
||||
iv id="mainActions">
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
<div class="btn-toolbar">
|
||||
<?php if(!$bug->deleted):?>
|
||||
<?php
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true);
|
||||
common::printIcon('bug', 'assignTo', $params, $bug, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
|
||||
|
||||
if($this->config->global->flow != 'onlyTest') common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story']);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('bug', 'edit', $params, $bug);
|
||||
common::printIcon('bug', 'create', $copyParams, $bug, 'button', 'copy');
|
||||
common::printIcon('bug', 'delete', $params, $bug, 'button', '', 'hiddenwin');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printBack($browseLink);
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
$copyParams = "productID=$productID&branch=$bug->branch&extras=bugID=$bug->id";
|
||||
$convertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&bugID=$bug->id";
|
||||
?>
|
||||
<div id="mainActions">
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php if(!$bug->deleted):?>
|
||||
<div class='divider'></div>
|
||||
<?php
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true);
|
||||
common::printIcon('bug', 'assignTo', $params, $bug, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
|
||||
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
|
||||
|
||||
if($this->config->global->flow != 'onlyTest') common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story']);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('bug', 'edit', $params, $bug);
|
||||
common::printIcon('bug', 'create', $copyParams, $bug, 'button', 'copy');
|
||||
common::printIcon('bug', 'delete', $params, $bug, 'button', '', 'hiddenwin');
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -304,10 +304,7 @@ $lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library',
|
||||
/* 文档视图菜单设置。*/
|
||||
$lang->doc = new stdclass();
|
||||
$lang->doc->menu = new stdclass();
|
||||
|
||||
//$lang->doc->menu->list = array('link' => '%s', 'fixed' => true);
|
||||
//$lang->doc->menu->crumb = array('link' => '%s', 'fixed' => true);
|
||||
//$lang->doc->menu->create = array('link' => '<i class="icon-plus"></i> 添加文档库|doc|createLib', 'float' => 'right');
|
||||
//$lang->doc->menu->createLib = array('link' => '<i class="icon icon-folder-plus"></i> 添加文件夹|doc|createLib', 'float' => 'right');
|
||||
|
||||
/* 统计视图菜单设置。*/
|
||||
$lang->report = new stdclass();
|
||||
|
||||
@@ -310,27 +310,6 @@ class custom extends control
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax set homepage.
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $page
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxSetHomepage($module, $page = '')
|
||||
{
|
||||
if(empty($page))
|
||||
{
|
||||
$this->view->title = $this->lang->homepage;
|
||||
$this->view->module = $module;
|
||||
die($this->display());
|
||||
}
|
||||
|
||||
$account = $this->app->user->account;
|
||||
$this->loadModel('setting')->setItem("$account.$module.homepage", $page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom menu view
|
||||
*
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The setIndexPage view file of custom 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 custom
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<script>
|
||||
var result = confirm('<?php echo $this->lang->custom->notice->indexPage[$module];?>');
|
||||
$.get(createLink('custom', 'ajaxSetHomepage', 'module=<?php echo $module?>&page=' + (result ? 'index' : 'browse')), function(){location.reload(true)});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
+35
-22
@@ -37,6 +37,8 @@ class doc extends control
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->doc->setMenu();
|
||||
|
||||
$products = $this->doc->getLimitLibs('product');
|
||||
$projects = $this->doc->getLimitLibs('project');
|
||||
$customLibs = $this->doc->getLimitLibs('custom');
|
||||
@@ -90,20 +92,22 @@ class doc extends control
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$moduleID = ($browseType == 'bymodule' or $browseType == 'bymenu') ? (int)$param : 0;
|
||||
|
||||
$type = 'custom';
|
||||
$type = '';
|
||||
$productID = 0;
|
||||
$projectID = 0;
|
||||
if($libID)
|
||||
{
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if($lib->product or $lib->project) $type = $lib->product ? 'product' : 'project';
|
||||
$type = 'custom';
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if($lib->product or $lib->project)
|
||||
{
|
||||
$type = $lib->product ? 'product' : 'project';
|
||||
$productID = $lib->product;
|
||||
$projectID = $lib->project;
|
||||
}
|
||||
}
|
||||
if(empty($libID)) $type = 'product';
|
||||
|
||||
$this->libs = $this->doc->getLibs($type);
|
||||
if(empty($libID))
|
||||
{
|
||||
$libID = key($this->libs);
|
||||
$lib = $this->dao->select('*')->from(TABLE_DOCLIB)->where('id')->eq($libID)->orderBy('id')->fetch();
|
||||
}
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($from == 'product')
|
||||
@@ -122,20 +126,21 @@ class doc extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doc->setMenu($libID, $moduleID);
|
||||
$menuType = (!$type && in_array($browseType, array_keys($this->lang->doc->fastMenuList))) ? $browseType : $type;
|
||||
$this->doc->setMenu($menuType, $libID, $moduleID, $productID, $projectID);
|
||||
}
|
||||
$this->session->set('docList', $this->app->getURI(true));
|
||||
|
||||
/* Set header and position. */
|
||||
$this->view->title = $this->lang->doc->common . $this->lang->colon . $this->libs[$libID];
|
||||
$this->view->position[] = $this->libs[$libID];
|
||||
$this->view->title = $this->lang->doc->common . ($libID ? $this->lang->colon . $this->libs[$libID] : '');
|
||||
$this->view->position[] = $libID ? $this->libs[$libID] : '';
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Append id for secend sort. */
|
||||
if($browseType == 'bymenu' and strpos('editeddate_desc,addeddate_desc,visiteddate_desc', strtolower($orderBy)) === false) $orderBy = 'title_asc';
|
||||
if($browseType == 'bymenu' and strpos('editeddate_desc,addeddate_desc', strtolower($orderBy)) === false) $orderBy = 'title_asc';
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
/* Get docs by browse type. */
|
||||
@@ -166,7 +171,7 @@ class doc extends control
|
||||
}
|
||||
|
||||
$this->view->libID = $libID;
|
||||
$this->view->libName = $this->libs[$libID];
|
||||
$this->view->libName = $libID ? $this->libs[$libID] : '';
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->docs = $docs;
|
||||
$this->view->pager = $pager;
|
||||
@@ -308,8 +313,8 @@ class doc extends control
|
||||
die(js::locate($link, 'parent'));
|
||||
}
|
||||
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = $lib->product ? 'product' : ($lib->project ? 'project' : 'custom');
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = $lib->product ? 'product' : ($lib->project ? 'project' : 'custom');
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
@@ -328,7 +333,7 @@ class doc extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doc->setMenu($libID, $moduleID);
|
||||
$this->doc->setMenu($type, $libID, $moduleID, $lib->product, $lib->project);
|
||||
}
|
||||
|
||||
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->create;
|
||||
@@ -382,7 +387,7 @@ class doc extends control
|
||||
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = $lib->product ? 'product' : ($lib->project ? 'project' : 'custom');
|
||||
$this->doc->setMenu($libID, $doc->module);
|
||||
$this->doc->setMenu($type, $libID, $doc->module, $lib->product, $lib->project);
|
||||
|
||||
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
|
||||
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
|
||||
@@ -421,7 +426,7 @@ class doc extends control
|
||||
$type = $lib->product ? 'product' : ($lib->project ? 'project' : 'custom');
|
||||
|
||||
/* Set menu. */
|
||||
$this->doc->setMenu($doc->lib, $doc->module);
|
||||
$this->doc->setMenu($type, $doc->lib, $doc->module, $lib->product, $lib->project);
|
||||
|
||||
/* Update visitedDate and views for current doc.*/
|
||||
$this->doc->updateVisitData($docID);
|
||||
@@ -527,6 +532,7 @@ class doc extends control
|
||||
if(empty($customMenus))
|
||||
{
|
||||
if($type == 'remove') die(js::reload('parent'));
|
||||
$customMenus = array();
|
||||
$i = 0;
|
||||
foreach($this->lang->doc->menu as $name => $item)
|
||||
{
|
||||
@@ -539,6 +545,7 @@ class doc extends control
|
||||
}
|
||||
}
|
||||
|
||||
$customMenus = (array)$customMenus;
|
||||
foreach($customMenus as $i => $customMenu)
|
||||
{
|
||||
if(isset($customMenu->name) and $customMenu->name == "custom{$libID}") unset($customMenus[$i]);
|
||||
@@ -587,7 +594,7 @@ class doc extends control
|
||||
$this->view->title = $libName;
|
||||
$this->view->position[] = $libName;
|
||||
|
||||
$this->doc->setMenu($libID = 0, $moduleID = 0, $crumb);
|
||||
$this->doc->setMenu($type, $libID = 0, $moduleID = 0, $productID = 0, $projectID = 0, $crumb);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -648,19 +655,23 @@ class doc extends control
|
||||
$crumb .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID"), $object->name);
|
||||
$crumb .= $this->lang->doc->separator . ' ' . $this->lang->doclib->files;
|
||||
|
||||
$productID = 0;
|
||||
$projectID = 0;
|
||||
if($type == 'product')
|
||||
{
|
||||
$productID = $objectID;
|
||||
$lib = $this->product->getById($objectID);
|
||||
if(!$this->product->checkPriv($lib)) $this->accessDenied();
|
||||
}
|
||||
|
||||
if($type == 'project')
|
||||
{
|
||||
$projectID = $objectID;
|
||||
$lib = $this->project->getById($objectID);
|
||||
if(!$this->project->checkPriv($lib)) $this->accessDenied();
|
||||
}
|
||||
|
||||
$this->doc->setMenu($libID = 0, $moduleID = 0, $crumb);
|
||||
$this->doc->setMenu($type, $libID = 0, $moduleID = 0, $productID, $projectID, $crumb);
|
||||
}
|
||||
|
||||
/* Load pager. */
|
||||
@@ -734,7 +745,9 @@ class doc extends control
|
||||
$crumb = html::a(inlink('allLibs', "type=$type"), $type == 'product' ? $this->lang->productCommon : $this->lang->projectCommon) . $this->lang->doc->separator;
|
||||
if($this->productID and $type == 'project') $crumb = $this->doc->getProductCrumb($this->productID, $objectID);
|
||||
$crumb .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID"), $object->name);
|
||||
$this->doc->setMenu($libID = 0, $moduleID = 0, $crumb);
|
||||
$productID = $type == 'product' ? $objectID : 0;
|
||||
$projectID = $type == 'project' ? $objectID : 0;
|
||||
$this->doc->setMenu($type, $libID = 0, $moduleID = 0, $productID, $projectID, $crumb);
|
||||
}
|
||||
|
||||
$this->view->title = $object->name;
|
||||
|
||||
@@ -58,7 +58,7 @@ $lang->doc->myDoc = '我的文档';
|
||||
$lang->doc->myCollection = '我的收藏';
|
||||
|
||||
/* 方法列表。*/
|
||||
$lang->doc->index = '首页';
|
||||
$lang->doc->index = '文档主页';
|
||||
$lang->doc->create = '创建文档';
|
||||
$lang->doc->edit = '编辑文档';
|
||||
$lang->doc->delete = '删除文档';
|
||||
@@ -119,12 +119,12 @@ $lang->doc->browseTypeList['menu'] = '目录';
|
||||
$lang->doc->browseTypeList['tree'] = '树状图';
|
||||
$lang->doc->browseTypeList['card'] = '卡片';
|
||||
|
||||
$lang->doc->fastMenuList['editeddate'] = '最近更新';
|
||||
$lang->doc->fastMenuList['byediteddate'] = '最近更新';
|
||||
$lang->doc->fastMenuList['visiteddate'] = '最近访问';
|
||||
$lang->doc->fastMenuList['openedbyme'] = '我的文档';
|
||||
$lang->doc->fastMenuList['collectedbyme'] = '我的收藏';
|
||||
|
||||
$lang->doc->fastMenuIconList['editeddate'] = 'icon-folder-upload';
|
||||
$lang->doc->fastMenuIconList['byediteddate'] = 'icon-folder-upload';
|
||||
$lang->doc->fastMenuIconList['visiteddate'] = 'icon-folder-move';
|
||||
$lang->doc->fastMenuIconList['openedbyme'] = 'icon-folder-account';
|
||||
$lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
|
||||
|
||||
+154
-42
@@ -22,60 +22,162 @@ class docModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setMenu($libID = 0, $moduleID = 0, $crumb = '')
|
||||
public function setMenu($type = '', $libID = 0, $moduleID = 0, $productID = 0, $projectID = 0, $crumb = '')
|
||||
{
|
||||
$customMenuKey = $this->config->global->flow . '_doc';
|
||||
if(isset($this->config->customMenu->{$customMenuKey}))
|
||||
$selectHtml = "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= html::a(helper::createLink('doc', 'index'), $this->lang->doc->index, '', "class='btn'");
|
||||
$selectHtml .= '</div>';
|
||||
|
||||
if($type)
|
||||
{
|
||||
$customMenu = json_decode($this->config->customMenu->{$customMenuKey}, true);
|
||||
$menuLibIdList = array();
|
||||
foreach($customMenu as $i => $menu)
|
||||
$mainLib = in_array($type, array_keys($this->lang->doc->fastMenuList)) ? $this->lang->doc->fastMenuList[$type] : '';
|
||||
|
||||
if($libID)
|
||||
{
|
||||
if(strpos($menu['name'], 'custom') === 0)
|
||||
$lib = $this->getLibById($libID);
|
||||
if($this->checkPriv($lib))
|
||||
{
|
||||
$menuLibID = (int)substr($menu['name'], 6);
|
||||
if($menuLibID) $menuLibIdList[$i] = $menuLibID;
|
||||
$type = $lib->product ? 'product' : 'custom';
|
||||
$type = $lib->project ? 'project' : $type;
|
||||
}
|
||||
}
|
||||
|
||||
$productIdList = array();
|
||||
$projectIdList = array();
|
||||
if($menuLibIdList)
|
||||
$mainLib = $type == 'custom' ? $this->lang->doc->customAB : $mainLib;
|
||||
$mainLib = $type == 'product' ? $this->lang->productCommon : $mainLib;
|
||||
$mainLib = $type == 'project' ? $this->lang->projectCommon : $mainLib;
|
||||
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= "<div class='btn-group'>";
|
||||
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $mainLib . " <span class='caret'></span></a>";
|
||||
$selectHtml .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->fastMenuList as $key => $fastMenu)
|
||||
{
|
||||
$libs = $this->dao->select('id,name,product,project')->from(TABLE_DOCLIB)->where('id')->in($menuLibIdList)->fetchAll('id');
|
||||
foreach($libs as $lib)
|
||||
if($key == 'editedDate' or $key == 'visitedDate')
|
||||
{
|
||||
if($lib->product) $productIdList[] = $lib->product;
|
||||
if($lib->project) $projectIdList[] = $lib->project;
|
||||
$link = helper::createLink('doc', 'browse', "libID=0&browseTyp=bymenu&module=0&orderBy={$key}_desc");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink('doc', 'browse', "libID=0&browseTyp={$key}");
|
||||
}
|
||||
$selectHtml .= '<li>' . html::a($link, "<i class='icon {$this->lang->doc->fastMenuIconList[$key]}'></i> {$fastMenu}") . '</li>';
|
||||
}
|
||||
$products = $productIdList ? $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($productIdList)->fetchPairs('id', 'name') : array();
|
||||
$projects = $projectIdList ? $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchPairs('id', 'name') : array();
|
||||
foreach($menuLibIdList as $i => $menuLibID)
|
||||
$selectHtml .= "<li class='divider'></li>";
|
||||
$selectHtml .= '<li>' . html::a(helper::createLink('doc', 'allLibs', "type=product"), "<i class='icon icon-cube'></i> {$this->lang->productCommon}") . '</li>';
|
||||
$selectHtml .= '<li>' . html::a(helper::createLink('doc', 'allLibs', "type=project"), "<i class='icon icon-stack'></i> {$this->lang->projectCommon}") . '</li>';
|
||||
$selectHtml .= '<li>' . html::a(helper::createLink('doc', 'allLibs', "type=custom"), "<i class='icon icon-folder-o'></i> {$this->lang->doc->customAB}") . '</li>';
|
||||
$selectHtml .='</ul></div></div>';
|
||||
|
||||
if(strpos('product,project,custom', $type) !== false)
|
||||
{
|
||||
$lib = $libs[$menuLibID];
|
||||
$libName = '';
|
||||
if($lib->product) $libName = isset($products[$lib->product]) ? '[' . $products[$lib->product] . ']' : '';
|
||||
if($lib->project) $libName = isset($projects[$lib->project]) ? '[' . $projects[$lib->project] . ']' : '';
|
||||
$libName .= $lib->name;
|
||||
$customMenu[$i]['link'] = "{$libName}|doc|browse|libID={$menuLibID}";
|
||||
$allLibGroups = $this->getAllLibGroups();
|
||||
$currentGroups = $allLibGroups[$type];
|
||||
|
||||
if($type == 'custom') $currentLib = $libID ? $libID : key($currentGroups);
|
||||
if($type == 'product') $currentLib = $productID ? $productID : key($currentGroups);
|
||||
if($type == 'project') $currentLib = $projectID ? $projectID : key($currentGroups);
|
||||
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= "<div class='btn-group'>";
|
||||
$selectHtml .= '<a data-toggle="dropdown" class="btn">' . (is_array($currentGroups[$currentLib]) ? $currentGroups[$currentLib]['name'] : $currentGroups[$currentLib]) . ' <span class="caret"></span></a>';
|
||||
$selectHtml .='<ul class="dropdown-menu">';
|
||||
if($type == 'custom')
|
||||
{
|
||||
foreach($currentGroups as $groupID => $groupName)
|
||||
{
|
||||
if($type == 'custom')
|
||||
{
|
||||
$link = helper::createLink('doc', 'browse', "libID=$groupID");
|
||||
$icon = 'icon-folder-o';
|
||||
}
|
||||
elseif($type == 'product')
|
||||
{
|
||||
$link = helper::createLink('doc', 'objectLibs', "type=product&objectID=$groupID");
|
||||
$icon = 'icon-cube';
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink('doc', 'objectLibs', "type=project&objectID=$groupID");
|
||||
$icon = 'icon-stack';
|
||||
}
|
||||
|
||||
$active = $currentLib == $groupID ? "class='active'" : '';
|
||||
$selectHtml .= "<li $active>" . html::a(helper::createLink('doc', 'browse', "libID=$groupID"), "<i class='icon icon-folder-o'></i> {$groupName}") . '</li>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($currentGroups as $groupID => $libGroups)
|
||||
{
|
||||
$link = helper::createLink('doc', 'objectLibs', "type=$type&objectID=$groupID");
|
||||
$icon = $type == 'product' ? 'icon-cube' : 'icon-stack';
|
||||
|
||||
$active = $currentLib == $groupID ? "class='active'" : '';
|
||||
$selectHtml .= "<li $active>" . html::a($link, "<i class='icon {$icon}'></i> {$libGroups['name']}") . '</li>';
|
||||
}
|
||||
}
|
||||
$selectHtml .= '</ul></div></div>';
|
||||
}
|
||||
$this->config->customMenu->{$customMenuKey} = json_encode($customMenu);
|
||||
|
||||
$actions = '';
|
||||
$customMenuKey = $this->config->global->flow . '_doc';
|
||||
if(isset($this->config->customMenu->{$customMenuKey}))
|
||||
{
|
||||
$customMenu = json_decode($this->config->customMenu->{$customMenuKey}, true);
|
||||
$menuLibIdList = array();
|
||||
foreach($customMenu as $i => $menu)
|
||||
{
|
||||
if(strpos($menu['name'], 'custom') === 0)
|
||||
{
|
||||
$menuLibID = (int)substr($menu['name'], 6);
|
||||
if($menuLibID) $menuLibIdList[$i] = $menuLibID;
|
||||
}
|
||||
}
|
||||
|
||||
$productIdList = array();
|
||||
$projectIdList = array();
|
||||
if($menuLibIdList)
|
||||
{
|
||||
$libs = $this->dao->select('id,name,product,project')->from(TABLE_DOCLIB)->where('id')->in($menuLibIdList)->fetchAll('id');
|
||||
foreach($libs as $lib)
|
||||
{
|
||||
if($lib->product) $productIdList[] = $lib->product;
|
||||
if($lib->project) $projectIdList[] = $lib->project;
|
||||
}
|
||||
}
|
||||
$products = $productIdList ? $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($productIdList)->fetchPairs('id', 'name') : array();
|
||||
$projects = $projectIdList ? $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchPairs('id', 'name') : array();
|
||||
foreach($menuLibIdList as $i => $menuLibID)
|
||||
{
|
||||
$lib = $libs[$menuLibID];
|
||||
$libName = '';
|
||||
if($lib->product) $libName = isset($products[$lib->product]) ? '[' . $products[$lib->product] . ']' : '';
|
||||
if($lib->project) $libName = isset($projects[$lib->project]) ? '[' . $projects[$lib->project] . ']' : '';
|
||||
$libName .= $lib->name;
|
||||
$customMenu[$i]['link'] = "{$libName}|doc|browse|libID={$menuLibID}";
|
||||
}
|
||||
|
||||
foreach($customMenu as $menu)
|
||||
{
|
||||
if(isset($menu['link']))
|
||||
{
|
||||
list($menuLabel, $module, $method, $vars) = explode('|', $menu['link']);
|
||||
$actions .= html::a(helper::createLink($module, $method, $vars), $menuLabel, '', "class='btn btn-gray'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$actions .= html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary' data-toggle='modal'");
|
||||
if($libID) $actions .= html::a(helper::createLink('doc', 'create', "libID=$libID"), "<i class='icon icon-plus'></i> " . $this->lang->doc->create, '', "class='btn btn-primary' data-toggle='modal'");
|
||||
|
||||
$this->lang->modulePageActions = $actions;
|
||||
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
$selectHtml = "<a id='currentItem' data-lib-id='$libID' href=\"javascript:showLibMenu()\">{$this->lang->doclib->all} <span class='icon-caret-down'></span></a>";
|
||||
$selectHtml .= "<div id='dropMenu'>";
|
||||
$selectHtml .= "<i class='icon icon-spin icon-spinner'></i>";
|
||||
$selectHtml .= "<div id='libMenu'>";
|
||||
$selectHtml .= "<div id='libMenuHeading'><input id='searchLib' type='search' placeholder='{$this->lang->doc->searchDoc}' class='form-control'></div>";
|
||||
$selectHtml .= "<div id='libMenuGroups' class='clearfix'>";
|
||||
if($this->config->global->flow != 'onlyTask' and isset($this->lang->doc->libTypeList['product'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProductGroup'><div class='lib-menu-list-heading' data-type='product'>{$this->lang->doc->libTypeList['product']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
if($this->config->global->flow != 'onlyStory' and $this->config->global->flow != 'onlyTest' and isset($this->lang->doc->libTypeList['project'])) $selectHtml .= "<div class='lib-menu-group' id='libMenuProjectGroup'><div class='lib-menu-list-heading' data-type='project'>{$this->lang->doc->libTypeList['project']}<i class='icon icon-remove'></i></div><div class='lib-menu-project-done'>{$this->lang->project->statusList['done']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
$selectHtml .= "<div class='lib-menu-group' id='libMenuCustomGroup'><div class='lib-menu-list-heading' data-type='custom'>{$this->lang->doc->libTypeList['custom']}<i class='icon icon-remove'></i></div><div class='lib-menu-list clearfix'></div></div>";
|
||||
$selectHtml .= "</div></div></div>";
|
||||
common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml);
|
||||
common::setMenuVars($this->lang->doc->menu, 'crumb', $crumb ? $crumb : $this->getCrumbs($libID, $moduleID));
|
||||
//$selectHtml .= $crumb ? $crumb : $this->getCrumbs($libID, $moduleID);
|
||||
$this->lang->modulePageNav = $selectHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +311,7 @@ class docModel extends model
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in($docIdList)
|
||||
->orderBy($sort)
|
||||
->orderBy('editedDate_desc')
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -246,6 +348,16 @@ class docModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($browseType == 'visiteddate')
|
||||
{
|
||||
$docIdList = $this->getPrivDocs($libID, $moduleID);
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('id')->in($docIdList)
|
||||
->orderBy('visitedDate_desc')
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
elseif($browseType == "collectedbyme")
|
||||
{
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)
|
||||
@@ -596,7 +708,7 @@ class docModel extends model
|
||||
$this->config->doc->search['queryID'] = $queryID;
|
||||
$this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->loadModel('product')->getPairs('nocode') + array('all'=>$this->lang->doc->allProduct);
|
||||
$this->config->doc->search['params']['project']['values'] = array(''=>'') + $this->loadModel('project')->getPairs('nocode') + array('all'=>$this->lang->doc->allProject);
|
||||
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => $libs[$libID], 'all' => $this->lang->doclib->all);
|
||||
$this->config->doc->search['params']['lib']['values'] = array(''=>'', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
|
||||
|
||||
/* Get the modules. */
|
||||
$moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
@@ -853,7 +965,7 @@ class docModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
return array('product' => array_values($productOrderLibs), 'project' => array_values($projectOrderLibs), 'custom' => $customLibs);
|
||||
return array('product' => $productOrderLibs, 'project' => $projectOrderLibs, 'custom' => $customLibs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,17 +30,7 @@
|
||||
<a class="text-muted tree-toggle"><?php echo $lang->doc->fast;?></a>
|
||||
<ul>
|
||||
<?php foreach($lang->doc->fastMenuList as $type => $menu):?>
|
||||
<?php
|
||||
if($type == 'editedDate' or $type == 'visitedDate')
|
||||
{
|
||||
$link = $this->createLink('doc', 'browse', "libID=0&browseTyp=bymenu&module=0&orderBy={$type}_desc");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $this->createLink('doc', 'browse', "libID=0&browseTyp={$type}");
|
||||
}
|
||||
?>
|
||||
<li><?php echo html::a($link, "<i class='icon {$lang->doc->fastMenuIconList[$type]}'></i> {$menu}");?>
|
||||
<li><?php echo html::a($this->createLink('doc', 'browse', "libID=0&browseType={$type}"), "<i class='icon {$lang->doc->fastMenuIconList[$type]}'></i> {$menu}");?>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -12,48 +12,50 @@
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->entry->confirmDelete);?>
|
||||
<form id='ajaxForm' method='post'>
|
||||
<table id='entryList' class='table table-condensed table-hover table-striped tablesorter'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
|
||||
<th class='w-50px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->entry->id);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->entry->name);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->entry->code);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('key', $orderBy, $vars, $lang->entry->key);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('ip', $orderBy, $vars, $lang->entry->ip);?></th>
|
||||
<th><?php echo common::printOrderLink('desc', $orderBy, $vars, $lang->entry->desc);?></th>
|
||||
<th class='w-80px'><?php echo html::a('###', $lang->actions);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($entries as $id => $entry):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td title='<?php echo $entry->name;?>'><?php echo $entry->name;?></td>
|
||||
<td><?php echo $entry->code;?></td>
|
||||
<td title='<?php echo $entry->key;?>'><?php echo $entry->key;?></td>
|
||||
<td title='<?php echo $entry->ip;?>'><?php echo $entry->ip;?></td>
|
||||
<td title='<?php echo $entry->desc;?>'><?php echo $entry->desc;?></td>
|
||||
<td class='text-right'>
|
||||
<?php
|
||||
common::printIcon('entry', 'log', "entryID=$id", '', 'list', 'file-text-o');
|
||||
common::printIcon('entry', 'edit', "entryID=$id", '', 'list');
|
||||
if(common::hasPriv('entry', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('entry', 'delete', "entryID=$id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"entryList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->entry->delete}' class='btn-icon'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7'><?php $pager->show();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form id='ajaxForm' class='main-table' method='post'>
|
||||
<table id='entryList' class='table has-sort-head table-fix'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->entry->id);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('name', $orderBy, $vars, $lang->entry->name);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->entry->code);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('key', $orderBy, $vars, $lang->entry->key);?></th>
|
||||
<th class='w-200px'><?php common::printOrderLink('ip', $orderBy, $vars, $lang->entry->ip);?></th>
|
||||
<th><?php echo common::printOrderLink('desc', $orderBy, $vars, $lang->entry->desc);?></th>
|
||||
<th class='w-130px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($entries as $id => $entry):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td title='<?php echo $entry->name;?>'><?php echo $entry->name;?></td>
|
||||
<td><?php echo $entry->code;?></td>
|
||||
<td title='<?php echo $entry->key;?>'><?php echo $entry->key;?></td>
|
||||
<td title='<?php echo $entry->ip;?>'><?php echo $entry->ip;?></td>
|
||||
<td title='<?php echo $entry->desc;?>'><?php echo $entry->desc;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
common::printIcon('entry', 'log', "entryID=$id", '', 'list', 'file-text');
|
||||
common::printIcon('entry', 'edit', "entryID=$id", '', 'list');
|
||||
if(common::hasPriv('entry', 'delete'))
|
||||
{
|
||||
$deleteURL = $this->createLink('entry', 'delete', "entryID=$id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"entryList\",confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->entry->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($entries):?>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -12,56 +12,61 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div class='container mw-800px'>
|
||||
<div id="titlebar">
|
||||
<div class="heading">
|
||||
<strong><?php echo $lang->entry->api;?></strong>
|
||||
<small class="text-muted"> <?php echo $lang->entry->create;?></small>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<?php echo $lang->entry->api;?>
|
||||
<small class="text-muted"> <?php echo $lang->entry->create;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<form id='entryForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->entry->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' title='{$lang->entry->note->name}' placeholder='{$lang->entry->note->name}'");?></td>
|
||||
<td class='w-120px'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->code;?></th>
|
||||
<td><?php echo html::input('code', '', "class='form-control' title='{$lang->entry->note->code}' placeholder='{$lang->entry->note->code}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->key;?></th>
|
||||
<td><?php echo html::input('key', md5(rand()), "class='form-control' readonly='readonly'");?></td>
|
||||
<td><span class="help-inline"><?php echo html::a('javascript:void(0)', $lang->entry->createKey, '', 'onclick="createKey()" tabIndex="-1"')?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->ip;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('ip', '', "class='form-control' title='{$lang->entry->note->ip}' placeholder='{$lang->entry->note->ip}'");?>
|
||||
<div class='input-group-addon'>
|
||||
<label class="checkbox-inline"><input type="checkbox" id="allIP" name="allIP" value="1"><?php echo $lang->entry->note->allIP;?></label>
|
||||
<form id='entryForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->entry->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control' title='{$lang->entry->note->name}' placeholder='{$lang->entry->note->name}'");?></td>
|
||||
<td class='w-120px'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->code;?></th>
|
||||
<td><?php echo html::input('code', '', "class='form-control' title='{$lang->entry->note->code}' placeholder='{$lang->entry->note->code}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->key;?></th>
|
||||
<td><?php echo html::input('key', md5(rand()), "class='form-control' readonly='readonly'");?></td>
|
||||
<td><span class="help-inline"><?php echo html::a('javascript:void(0)', $lang->entry->createKey, '', 'onclick="createKey()" tabIndex="-1" class="btn"')?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->ip;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('ip', '', "class='form-control' title='{$lang->entry->note->ip}' placeholder='{$lang->entry->note->ip}'");?>
|
||||
<div class='input-group-addon'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type="checkbox" id="allIP" name="allIP" value="1" />
|
||||
<label for='allIP'><?php echo $lang->entry->note->allIP;?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='3' class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a($config->entry->help, $lang->entry->help, '_blank', "class='help'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='3' class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a($config->entry->help, $lang->entry->help, '_blank', "class='help'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<div class='container mw-800px'>
|
||||
<div id="titlebar">
|
||||
<div class="heading">
|
||||
<strong><?php echo $lang->entry->api;?></strong>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<?php echo $lang->entry->api;?>
|
||||
<small class="text-muted"> <?php echo $lang->entry->edit;?></small>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<form id='entryForm' method='post' class='ajaxForm'>
|
||||
<table class='table table-form'>
|
||||
@@ -29,12 +30,11 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->code;?></th>
|
||||
<td><?php echo html::input('code', $entry->code, "class='form-control' title='{$lang->entry->note->code}' placeholder='{$lang->entry->note->code}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->key;?></th>
|
||||
<td><?php echo html::input('key', $entry->key, "class='form-control' readonly='readonly'");?></td>
|
||||
<td><span class="help-inline"><?php echo html::a('javascript:void(0)', $lang->entry->createKey, '', 'onclick="createKey()" tabIndex="-1"')?></span></td>
|
||||
<td><span class="help-inline"><?php echo html::a('javascript:void(0)', $lang->entry->createKey, '', 'onclick="createKey()" tabIndex="-1" class="btn"')?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->ip;?></th>
|
||||
@@ -42,16 +42,17 @@
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('ip', $entry->ip, "class='form-control' title='{$lang->entry->note->ip}' placeholder='{$lang->entry->note->ip}'");?>
|
||||
<div class='input-group-addon'>
|
||||
<label class="checkbox-inline"><input type="checkbox" id="allIP" name="allIP" value="1"><?php echo $lang->entry->note->allIP;?></label>
|
||||
<div class='checkbox-primary'>
|
||||
<input type="checkbox" id="allIP" name="allIP" value="1" />
|
||||
<label for='allIP'><?php echo $lang->entry->note->allIP;?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->entry->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $entry->desc, "rows='3' class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
@@ -59,9 +60,9 @@
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::a($config->entry->help, $lang->entry->help, '_blank', "class='help'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,16 +11,11 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='featurebar'>
|
||||
<ul class='nav'>
|
||||
<li id='entry' class='active'><?php common::printLink('entry', 'browse', '', $lang->entry->common);?></li>
|
||||
<li id='webhook'><?php common::printLink('webhook', 'browse', '', $lang->entry->webhook);?></li>
|
||||
</ul>
|
||||
<div class='actions'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php common::printIcon('entry', 'create', '', '', 'button', '', '', 'btn-primary');?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php common::printLink('entry', 'browse', '', "<span class='text'>{$lang->entry->common}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printIcon('entry', 'create', '', '', 'button', '', '', 'btn-primary');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,42 +11,47 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="titlebar">
|
||||
<div class="heading">
|
||||
<strong><?php echo html::a(inlink('browse'), $lang->entry->common);?></strong>
|
||||
<small class="text-muted"> <?php echo $entry->name;?> </small>
|
||||
<small class="text-muted"> <?php echo $lang->entry->log;?></small>
|
||||
<div id="mainMenu" class='clearfix'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php common::printLink('entry', 'browse', '', "<span class='text'>{$lang->entry->common}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group' id='createActionMenu'>
|
||||
<?php common::printLink('admin', 'log', '', "<i class='icon icon-cog'> </i>" . $lang->entry->setting, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('admin', 'log', '', "<i class='icon icon-cog'></i> " . $lang->entry->setting, '', "class='btn btn-primary'");?>
|
||||
<?php echo html::backButton();?>
|
||||
</div>
|
||||
</div>
|
||||
<table id='logList' class='table table-condensed table-hover table-striped tablesorter table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "id={$entry->id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->entry->id);?></th>
|
||||
<th class='w-160px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->entry->date);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->entry->url);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($logs as $id => $log):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td><?php echo $log->date;?></td>
|
||||
<td class='text' title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3'><?php $pager->show();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<h2>
|
||||
<?php echo $entry->name;?>
|
||||
<span class='label label-info'><?php echo $lang->entry->log;?></span>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<table id='logList' class='main-table table has-sort-head table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "id={$entry->id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->entry->id);?></th>
|
||||
<th class='w-160px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->entry->date);?></th>
|
||||
<th><?php common::printOrderLink('url', $orderBy, $vars, $lang->entry->url);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($logs as $id => $log):?>
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td><?php echo $log->date;?></td>
|
||||
<td class='text' title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($logs):?>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='box-title'><?php echo "$path@$revision";?></div>
|
||||
<div class='box-content'><xmp><?php echo $code;?></xmp></div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo "$path@$revision";?></div>
|
||||
<div class='detail-content'><xmp><?php echo $code;?></xmp></div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php $catLink = $this->git->buildURL('cat', $path, $revision);?>
|
||||
<div class='box-title'><?php echo html::a($catLink, "$path@$revision");?></div>
|
||||
<div class='box-content'><xmp><?php echo $diff;?></xmp></div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo html::a($catLink, "$path@$revision");?></div>
|
||||
<div class='detail-content'><xmp><?php echo $diff;?></xmp></div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.group-item {display:block; width:100px; float:left}
|
||||
.outer .table th {vertical-align: top;}
|
||||
.col-side {width: 192px;}
|
||||
.group-item {display:block; width:100px; float:left;margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||
.table th {vertical-align: top;}
|
||||
.table-form>tbody>tr>th{width:120px !important;}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
.form-condensed select.form-control {height:250px}
|
||||
#featurebar > .nav > li > a > .icon-home {display: none}
|
||||
.table-bymodule select.form-control {height:250px}
|
||||
.group-item {display:block; width:200px; float:left; font-size: 14px}
|
||||
.outer .table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd}
|
||||
@-moz-document url-prefix(){.outer .table.table-form tbody > tr:last-child td, .outer .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd}}
|
||||
.checkbox-inline {display: inline-block !important; padding-left: 0px;}
|
||||
.table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd}
|
||||
@-moz-document url-prefix(){.table.table-form tbody > tr:last-child td, .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd}}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
$(function()
|
||||
{
|
||||
$('.check-all input[type=checkbox]').change(function()
|
||||
{
|
||||
var checked = $(this).prop('checked');
|
||||
$(this).parents('tr').find('input[type=checkbox]').prop('checked', checked);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11,56 +11,67 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix' title='GROUP'><?php echo html::icon($lang->icons['group']);?> <strong><?php echo $group->id;?></strong></span>
|
||||
<strong><?php echo $group->name;?></strong>
|
||||
<small class='text-muted'> <?php echo $lang->group->manageMember;?> <?php echo html::icon($lang->icons['manage']);?></small>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id' title='GROUP'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->group->manageMember;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row-table row-table-swap'>
|
||||
<div class="col-side">
|
||||
<div class='side-body'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['company']);?> <strong><?php echo $lang->dept->common;?></strong></div>
|
||||
<div class='panel-body'><?php echo $deptTree;?></div>
|
||||
<div class='main-row'>
|
||||
<div class="side-col col-3">
|
||||
<div class='side-body'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['company']);?> <strong><?php echo $lang->dept->common;?></strong></div>
|
||||
<?php echo $deptTree;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-main">
|
||||
<form class='form-condensed pdb-20' method='post' target='hiddenwin'>
|
||||
<table align='center' class='table table-form'>
|
||||
<?php if($groupUsers):?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->group->inside;?><?php echo html::selectAll('group', 'checkbox', true);?> </th>
|
||||
<td id='group' class='f-14px pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($groupUsers as $account => $realname):?>
|
||||
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), $account);?></div>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->group->outside;?><?php echo html::selectAll('other','checkbox');?> </th>
|
||||
<td id='other' class='f-14px pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($otherUsers as $account => $realname):?>
|
||||
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), '');?></div>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center'>
|
||||
<?php
|
||||
echo html::submitButton();
|
||||
echo html::linkButton($lang->goback, $this->createLink('group', 'browse'));
|
||||
echo html::hidden('foo'); // Just a var, to make sure $_POST is not empty.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<div class="main-col">
|
||||
<form class='pdb-20' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<?php if($groupUsers):?>
|
||||
<tr>
|
||||
<th class='w-130px'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
<input type='checkbox' id='allInsideChecker' checked />
|
||||
<label class='text-right' for='allInsideChecker'><?php echo $lang->group->inside;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<td id='group' class='pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($groupUsers as $account => $realname):?>
|
||||
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), $account);?></div>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
<input type='checkbox' id='allOutSideChecker'>
|
||||
<label class='text-right' for='allOutSideChecker'><?php echo $lang->group->outside;?></label>
|
||||
</div>
|
||||
</th>
|
||||
<td id='other' class='pv-10px'><?php $i = 1;?>
|
||||
<?php foreach($otherUsers as $account => $realname):?>
|
||||
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), '');?></div>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center'>
|
||||
<?php
|
||||
echo html::submitButton();
|
||||
echo html::linkButton($lang->goback, $this->createLink('group', 'browse'));
|
||||
echo html::hidden('foo'); // Just a var, to make sure $_POST is not empty.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -10,41 +10,42 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><i class='icon-lock'></i></span>
|
||||
<strong><small class='text-muted'><i class='icon-cog'></i></small> <?php echo $lang->group->managePriv ;?></strong>
|
||||
<small class='text-muted'> <?php echo $lang->group->byModuleTips; ?></small>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<?php echo $lang->group->managePriv ;?>
|
||||
<small class='text-muted'> <?php echo $lang->group->byModuleTips; ?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<form class='table-bymodule pdb-20' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='text-center'>
|
||||
<td class='strong'><?php echo $lang->group->module;?></td>
|
||||
<td class='strong'><?php echo $lang->group->method;?></td>
|
||||
<td class='strong'><?php echo $lang->group->common;?></td>
|
||||
</tr>
|
||||
<tr class='text-top'>
|
||||
<td class='w-p30'><?php echo html::select('module', $modules, '', " size='10' onclick='setModuleActions(this.value)' class='form-control'");?></td>
|
||||
<td class='w-p30' id='actionBox'>
|
||||
<?php
|
||||
$class = '';
|
||||
foreach($actions as $module => $moduleActions)
|
||||
{
|
||||
echo html::select('actions[]', $moduleActions, '', "multiple='multiple' class='form-control $class {$module}Actions'");
|
||||
$class = 'hidden';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo html::select('groups[]', $groups, '', "multiple='multiple' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='3'>
|
||||
<?php echo html::submitButton('', "onclick='setNoChecked()'", 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide btn-gray');?>
|
||||
<?php echo html::hidden('foo'); // Just make $_POST not empty..?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form class='form-condensed pdb-20' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr class='text-center'>
|
||||
<td class='strong'><?php echo $lang->group->module;?></td>
|
||||
<td class='strong'><?php echo $lang->group->method;?></td>
|
||||
<td class='strong'><?php echo $lang->group->common;?></td>
|
||||
</tr>
|
||||
<tr valign='top'>
|
||||
<td class='w-p30'><?php echo html::select('module', $modules, '', " size='10' onclick='setModuleActions(this.value)' class='form-control'");?></td>
|
||||
<td class='w-p30' id='actionBox'>
|
||||
<?php
|
||||
$class = '';
|
||||
foreach($actions as $module => $moduleActions)
|
||||
{
|
||||
echo html::select('actions[]', $moduleActions, '', "multiple='multiple' class='form-control $class {$module}Actions'");
|
||||
$class = 'hidden';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo html::select('groups[]', $groups, '', "multiple='multiple' class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='3'>
|
||||
<?php echo html::submitButton('', "onclick='setNoChecked()'", 'btn btn-wide btn-primary');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide btn-gray');?>
|
||||
<?php echo html::hidden('foo'); // Just make $_POST not empty..?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -50,19 +50,6 @@ class product extends control
|
||||
public function index($locate = 'auto', $productID = 0, $status = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
if($this->config->global->flow == 'onlyTest') $this->locate($this->createLink($this->moduleName, 'build'));
|
||||
|
||||
if($this->app->user->account == 'guest' or commonModel::isTutorialMode()) $this->config->product->homepage = 'index';
|
||||
if(!isset($this->config->product->homepage))
|
||||
{
|
||||
if($this->products and $this->app->getViewType() != 'mhtml') die($this->fetch('custom', 'ajaxSetHomepage', "module=product"));
|
||||
|
||||
$this->config->product->homepage = 'index';
|
||||
$this->fetch('custom', 'ajaxSetHomepage', "module=product&page=index");
|
||||
}
|
||||
|
||||
$homepage = $this->config->product->homepage;
|
||||
if($homepage == 'browse' and $locate == 'auto') $locate = 'yes';
|
||||
|
||||
if($locate == 'yes') $this->locate($this->createLink($this->moduleName, 'browse'));
|
||||
|
||||
if($this->app->getViewType() != 'mhtml') unset($this->lang->product->menu->index);
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
<div class="detail-content article-content">
|
||||
<p><span class="text-limit" data-limit-size="40"><?php echo $product->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
|
||||
<p>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->product->typeList, $product->type);?></span>
|
||||
<span class="label label-success label-outline"><?php echo zget($lang->product->statusList, $product->status);?></span>
|
||||
<span class="label label-primary label-outline" title='<?php echo $lang->product->type;?>'><?php echo zget($lang->product->typeList, $product->type);?></span>
|
||||
<span class="label label-success label-outline" title='<?php echo $lang->product->status;?>'><?php echo zget($lang->product->statusList, $product->status);?></span>
|
||||
<?php if($product->deleted):?>
|
||||
<span class='label label-danger label-outline'><?php echo $lang->product->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
@@ -210,9 +210,10 @@
|
||||
<?php
|
||||
$params = "product=$product->id";
|
||||
$browseLink = $this->session->productList ? $this->session->productList : inlink('browse', "productID=$product->id");
|
||||
common::printBack($browseLink);
|
||||
if(!$product->deleted)
|
||||
{
|
||||
ob_start();
|
||||
echo "<div class='divider'></div>";
|
||||
if($product->status != 'closed')
|
||||
{
|
||||
common::printIcon('product', 'close', "productID=$product->id", $product, 'button', '', '', 'iframe text-danger', true);
|
||||
@@ -221,15 +222,10 @@
|
||||
|
||||
common::printIcon('product', 'edit', $params, $product);
|
||||
common::printIcon('product', 'delete', $params, $product, 'button', '', 'hiddenwin');
|
||||
common::printRPN($browseLink);
|
||||
|
||||
$actionLinks = ob_get_contents();
|
||||
ob_end_clean();
|
||||
echo $actionLinks;
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printRPN($browseLink);
|
||||
common::printBack($browseLink);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -39,17 +39,6 @@ class project extends control
|
||||
*/
|
||||
public function index($locate = 'auto', $projectID = 0)
|
||||
{
|
||||
if($this->app->user->account == 'guest' or commonModel::isTutorialMode()) $this->config->project->homepage = 'index';
|
||||
if(!isset($this->config->project->homepage))
|
||||
{
|
||||
if($this->projects and $this->app->viewType != 'mhtml') die($this->fetch('custom', 'ajaxSetHomepage', "module=project"));
|
||||
|
||||
$this->config->project->homepage = 'index';
|
||||
$this->fetch('custom', 'ajaxSetHomepage', "module=project&page=index");
|
||||
}
|
||||
|
||||
$homepage = $this->config->project->homepage;
|
||||
if($homepage == 'browse' and $locate == 'auto') $locate = 'yes';
|
||||
if($locate == 'yes') $this->locate($this->createLink('project', 'task'));
|
||||
|
||||
if($this->app->viewType != 'mhtml') unset($this->lang->project->menu->index);
|
||||
|
||||
@@ -203,30 +203,23 @@
|
||||
<?php
|
||||
$params = "project=$project->id";
|
||||
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$project->id");
|
||||
common::printBack($browseLink);
|
||||
if(!$project->deleted)
|
||||
{
|
||||
ob_start();
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'activate', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'putoff', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
echo '</div>';
|
||||
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'edit', $params, $project);
|
||||
common::printIcon('project', 'delete', $params, $project, 'button', '', 'hiddenwin');
|
||||
echo '</div>';
|
||||
common::printRPN($browseLink);
|
||||
|
||||
$actionLinks = ob_get_contents();
|
||||
ob_end_clean();
|
||||
echo $actionLinks;
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printRPN($browseLink);
|
||||
common::printBack($browseLink);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -20,19 +20,7 @@ class qa extends control
|
||||
public function index($locate = 'auto', $productID = 0)
|
||||
{
|
||||
$this->products = $this->loadModel('product')->getPairs('nocode');
|
||||
if($this->app->user->account == 'guest' or commonModel::isTutorialMode()) $this->config->qa->homepage = 'index';
|
||||
if(!isset($this->config->qa->homepage))
|
||||
{
|
||||
if($this->products and $this->app->viewType != 'mhtml') die($this->fetch('custom', 'ajaxSetHomepage', "module=qa"));
|
||||
|
||||
$this->config->qa->homepage = 'index';
|
||||
$this->fetch('custom', 'ajaxSetHomepage', "module=qa&page=index");
|
||||
}
|
||||
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=qa")));
|
||||
|
||||
$homepage = $this->config->qa->homepage;
|
||||
if($homepage == 'browse' and $locate == 'auto') $locate = 'yes';
|
||||
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
|
||||
|
||||
if($this->app->viewType != 'mhtml') unset($this->lang->qa->menu->index);
|
||||
|
||||
@@ -335,9 +335,10 @@
|
||||
<div id="mainActions">
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php if(!$task->deleted):?>
|
||||
<div class='divider'></div>
|
||||
<?php
|
||||
common::printBack($browseLink);
|
||||
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer);
|
||||
common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
|
||||
|
||||
Reference in New Issue
Block a user