Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2018-04-19 14:31:11 +08:00
21 changed files with 369 additions and 262 deletions
+5 -9
View File
@@ -319,15 +319,11 @@ $lang->report->notice->help = 'Note: Report is generated from search results. Pl
/* 组织结构视图菜单设置。*/
$lang->company = new stdclass();
$lang->company->menu = new stdclass();
$lang->company->menu->name = array('link' => '%s' . $lang->arrow, 'fixed' => true);
$lang->company->menu->browseUser = array('link' => 'User|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => 'Department|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => 'Group|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => 'Company|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = 'Dynamic|company|dynamic|';
$lang->company->menu->addGroup = array('link' => '<i class="icon-group"></i>&nbsp;Add Group|group|create', 'float' => 'right');
$lang->company->menu->batchAddUser = array('link' => '<i class="icon-plus-sign"></i>&nbsp;Batch Add|user|batchCreate|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->addUser = array('link' => '<i class="icon-plus"></i>&nbsp;Add User|user|create|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->browseUser = array('link' => 'User|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => 'Department|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => 'Group|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => 'Company|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = 'Dynamic|company|dynamic|';
$lang->dept = new stdclass();
$lang->group = new stdclass();
+5 -9
View File
@@ -307,15 +307,11 @@ $lang->report->notice->help = '注:统计报表的数据,来源于列表页
/* 组织结构视图菜单设置。*/
$lang->company = new stdclass();
$lang->company->menu = new stdclass();
$lang->company->menu->name = array('link' => '%s' . $lang->arrow, 'fixed' => true);
$lang->company->menu->browseUser = array('link' => '用户|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => '部门|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => '权限|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => '公司|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = '动态|company|dynamic|';
$lang->company->menu->addGroup = array('link' => '<i class="icon-group"></i>&nbsp;添加分组|group|create', 'float' => 'right');
$lang->company->menu->batchAddUser = array('link' => '<i class="icon-plus-sign"></i>&nbsp;批量添加|user|batchCreate|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->addUser = array('link' => '<i class="icon-plus"></i>&nbsp;添加用户|user|create|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->browseUser = array('link' => '用户|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => '部门|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => '权限|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => '公司|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = '动态|company|dynamic|';
$lang->dept = new stdclass();
$lang->group = new stdclass();
+5 -9
View File
@@ -307,15 +307,11 @@ $lang->report->notice->help = '註:統計報表的數據,來源於列表頁
/* 組織結構視圖菜單設置。*/
$lang->company = new stdclass();
$lang->company->menu = new stdclass();
$lang->company->menu->name = array('link' => '%s' . $lang->arrow, 'fixed' => true);
$lang->company->menu->browseUser = array('link' => '用戶|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => '部門|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => '權限|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => '公司|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = '動態|company|dynamic|';
$lang->company->menu->addGroup = array('link' => '<i class="icon-group"></i>&nbsp;添加分組|group|create', 'float' => 'right');
$lang->company->menu->batchAddUser = array('link' => '<i class="icon-plus-sign"></i>&nbsp;批量添加|user|batchCreate|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->addUser = array('link' => '<i class="icon-plus"></i>&nbsp;添加用戶|user|create|dept=%s', 'subModule' => 'user', 'float' => 'right');
$lang->company->menu->browseUser = array('link' => '用戶|company|browse', 'subModule' => 'user');
$lang->company->menu->dept = array('link' => '部門|dept|browse', 'subModule' => 'dept');
$lang->company->menu->browseGroup = array('link' => '權限|group|browse', 'subModule' => 'group');
$lang->company->menu->view = array('link' => '公司|company|view', 'alias' => 'edit');
$lang->company->menu->dynamic = '動態|company|dynamic|';
$lang->dept = new stdclass();
$lang->group = new stdclass();
+1
View File
@@ -79,6 +79,7 @@ class company extends control
$this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->company->browse->search);
$this->view->deptTree = $this->dept->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createMemberLink'));
$this->view->parentDepts = $this->dept->getParents($deptID);
$this->view->dept = $this->dept->getById($deptID);
$this->view->orderBy = $orderBy;
$this->view->deptID = $deptID;
$this->view->pager = $pager;
-4
View File
@@ -1,7 +1,3 @@
function batchEdit()
{
$('#userListForm').attr('action', createLink('user', 'batchEdit', 'dept=' + deptID));
}
$(function()
{
setTimeout(function(){fixedTfootAction('#userListForm')}, '100');
+103 -85
View File
@@ -15,96 +15,114 @@ include '../../common/view/header.html.php';
js::set('deptID', $deptID);
js::set('confirmDelete', $lang->user->confirmDelete);
?>
<div id='titlebar'>
<div class='heading'><?php echo html::icon($lang->icons['company']);?> <?php echo $lang->company->browse;?></div>
<div id='mainMenu' class='clearfix'>
<div id='sidebarHeader'>
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
<div class="title">
<?php echo empty($dept->name) ? $lang->dept->common : $dept->name;?>
<?php if($deptID) echo html::a(inlink('browse', "deptID=0"), "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");?>
</div>
</div>
<div class='btn-toolbar pull-left'>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->user->search;?></a>
</div>
<div class='btn-toolbar pull-right'>
<?php common::printIcon('group', 'create');?>
<?php common::printLink('user', 'batchCreate', "dept={$deptID}", "<i class='icon icon-plus'> </i>" . $lang->user->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('user', 'create', "dept={$deptID}", "<i class='icon icon-plus'> </i>" . $lang->user->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='querybox' class='show'><?php echo $searchForm?></div>
<div class='side'>
<a class='side-handle' data-id='companyTree'><i class='icon-caret-left'></i></a>
<div class='side-body'>
<div class='panel panel-sm'>
<div class='panel-heading nobr'><?php echo html::icon($lang->icons['dept']);?> <strong><?php echo $lang->dept->common;?></strong></div>
<div class='panel-body'>
<?php echo $deptTree;?>
<div class='text-right'><?php common::printLink('dept', 'browse', '', $lang->dept->manage);?></div>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<div class='cell'>
<?php echo $deptTree;?>
<div class='text-center'>
<?php common::printLink('dept', 'browse', '', $lang->dept->manage, '', "class='btn btn-info btn-wide'");?>
</div>
</div>
</div>
</div>
<div class='main'>
<script>setTreeBox();</script>
<form action='<?php echo $this->createLink('user', 'batchEdit', "deptID=$deptID")?>' method='post' id='userListForm'>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='userList'>
<thead>
<tr class='colhead'>
<?php $vars = "param=$param&type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='w-id'><?php common::printorderlink('id', $orderBy, $vars, $lang->idAB);?></th>
<th><?php common::printorderlink('realname', $orderBy, $vars, $lang->user->realname);?></th>
<th><?php common::printOrderLink('account', $orderBy, $vars, $lang->user->account);?></th>
<th><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
<th><?php common::printOrderLink('email', $orderBy, $vars, $lang->user->email);?></th>
<th><?php common::printOrderLink('gender', $orderBy, $vars, $lang->user->gender);?></th>
<th><?php common::printOrderLink('phone', $orderBy, $vars, $lang->user->phone);?></th>
<th><?php common::printOrderLink('qq', $orderBy, $vars, $lang->user->qq);?></th>
<th><?php common::printOrderLink('last', $orderBy, $vars, $lang->user->last);?></th>
<th><?php common::printOrderLink('visits', $orderBy, $vars, $lang->user->visits);?></th>
<th class='w-90px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('user', 'batchEdit');
?>
<?php foreach($users as $user):?>
<tr class='text-center'>
<td class='cell-id'>
<?php
if($canBatchEdit) echo "<input type='checkbox' name='users[]' value='$user->account'> ";
printf('%03d', $user->id);
?>
</td>
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
<td><?php echo $user->account;?></td>
<td><?php echo $lang->user->roleList[$user->role];?></td>
<td><?php echo html::mailto($user->email);?></td>
<td><?php if(isset($lang->user->genderList[$user->gender])) echo $lang->user->genderList[$user->gender];?></td>
<td><?php echo $user->phone;?></td>
<td><?php if($user->qq) echo html::a("tencent://message/?uin=$user->qq", $user->qq);?></td>
<td><?php if($user->last) echo date('Y-m-d', $user->last);?></td>
<td><?php echo $user->visits;?></td>
<td class='text-left'>
<?php
common::printIcon('user', 'edit', "userID=$user->id&from=company", '', 'list');
if(strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete'))
{
echo html::a($this->createLink('user', 'delete', "userID=$user->id"), '<i class="icon-trash"></i>', '', "title='{$lang->user->delete}' class='btn-icon iframe'");
}
if((strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) < $this->config->user->lockMinutes * 60)
{
common::printIcon('user', 'unlock', "userID=$user->account", '', 'list', '', "hiddenwin");
}
if($user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin");
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='11'>
<div class='table-actions clearfix'>
<?php
if($canBatchEdit) echo html::selectButton();
if($canBatchEdit) echo html::submitButton($lang->edit, 'onclick=batchEdit()', 'btn btn-default');
?>
<div class='main-col'>
<div class="cell" id="queryBox"></div>
<form class='main-table table-user' data-ride='table' action='<?php echo $this->createLink('user', 'batchEdit', "deptID=$deptID")?>' method='post' id='userListForm'>
<?php $canBatchEdit = common::hasPriv('user', 'batchEdit');?>
<table class='table has-sort-head' id='userList'>
<thead>
<tr>
<?php $vars = "param=$param&type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='c-id'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printorderlink('realname', $orderBy, $vars, $lang->user->realname);?></th>
<th><?php common::printOrderLink('account', $orderBy, $vars, $lang->user->account);?></th>
<th><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
<th><?php common::printOrderLink('email', $orderBy, $vars, $lang->user->email);?></th>
<th><?php common::printOrderLink('gender', $orderBy, $vars, $lang->user->gender);?></th>
<th><?php common::printOrderLink('phone', $orderBy, $vars, $lang->user->phone);?></th>
<th><?php common::printOrderLink('qq', $orderBy, $vars, $lang->user->qq);?></th>
<th><?php common::printOrderLink('last', $orderBy, $vars, $lang->user->last);?></th>
<th><?php common::printOrderLink('visits', $orderBy, $vars, $lang->user->visits);?></th>
<th class='w-90px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($users as $user):?>
<tr>
<td class='cell-id'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary">
<input type='checkbox' name='users[]' value='<?php echo $user->id;?>'/>
<label></label>
</div>
<?php endif;?>
<?php printf('%03d', $user->id);?>
</td>
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
<td><?php echo $user->account;?></td>
<td><?php echo $lang->user->roleList[$user->role];?></td>
<td><?php echo html::mailto($user->email);?></td>
<td><?php if(isset($lang->user->genderList[$user->gender])) echo $lang->user->genderList[$user->gender];?></td>
<td><?php echo $user->phone;?></td>
<td><?php if($user->qq) echo html::a("tencent://message/?uin=$user->qq", $user->qq);?></td>
<td><?php if($user->last) echo date('Y-m-d', $user->last);?></td>
<td><?php echo $user->visits;?></td>
<td class='c-actions'>
<div class='more'>
<?php if(true or $user->ranzhi) common::printIcon('user', 'unbind', "userID=$user->account", '', 'list', 'unlink', "hiddenwin", 'btn-link');?>
</div>
<?php
common::printIcon('user', 'edit', "userID=$user->id&from=company", '', 'button');
if(strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete'))
{
echo html::a($this->createLink('user', 'delete', "userID=$user->id"), '<i class="icon-trash"></i>', '', "title='{$lang->user->delete}' class='btn btn-link iframe'");
}
if((strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked)) < $this->config->user->lockMinutes * 60)
{
common::printIcon('user', 'unlock', "userID=$user->account", '', 'button', '', "hiddenwin");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($users):?>
<div class='table-footer'>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->edit);?>
</div>
<?php echo $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</form>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
</div>
</div>
<script lanugage='javascript'>$('#dept<?php echo $deptID;?>').addClass('active');</script>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -17,7 +17,7 @@ $lang->dept->parent = "上级部门";
$lang->dept->manager = "负责人";
$lang->dept->name = "部门名称";
$lang->dept->browse = "部门维护";
$lang->dept->manage = "维护部门结构";
$lang->dept->manage = "维护部门";
$lang->dept->updateOrder = "更新排序";
$lang->dept->add = "添加部门";
$lang->dept->dragAndSort = "拖动排序";
+1 -1
View File
@@ -17,7 +17,7 @@ $lang->dept->parent = "上級部門";
$lang->dept->manager = "負責人";
$lang->dept->name = "部門名稱";
$lang->dept->browse = "部門維護";
$lang->dept->manage = "維護部門結構";
$lang->dept->manage = "維護部門";
$lang->dept->updateOrder = "更新排序";
$lang->dept->add = "添加部門";
$lang->dept->dragAndSort = "拖動排序";
+1
View File
@@ -2,3 +2,4 @@
.branch-list > li {float: left; list-style: none; width: 50%; margin: 5px 0;}
.data-basic.table-data tbody > tr > th {width: 80px;}
.block-release .panel-body, .block-dynamic .panel-body {height: 224px; overflow: auto;}
.block-release .panel-body .release-line > li > a > .info{min-height: 18px;}
+3 -2
View File
@@ -14,7 +14,8 @@
<div id="sidebarHeader">
<?php echo html::commonButton('<i class="icon icon-caret-left"></i>', '', 'btn btn-icon btn-sm btn-info sidebar-toggle');?>
<div class="title">
<?php echo $lang->product->line;?>
<?php echo $line ? zget($lines, $line) : $lang->product->line;?>
<?php if($line) echo html::a(inlink('all', "productID={$productID}&line=&status={$status}"), "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");?>
</div>
</div>
<div class="btn-toolbar pull-left">
@@ -117,7 +118,7 @@
</table>
<?php if($productStats):?>
<div class="table-footer">
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
<?php if($canBatchEdit):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->edit);?>
+1 -1
View File
@@ -24,7 +24,7 @@
if($moduleID)
{
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
echo html::a($removeLink, "<i class='icon icon-remove'></i>", '', "class='text-muted'");
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
</div>
+5 -1
View File
@@ -1287,6 +1287,9 @@ class project extends control
/* Set menu. */
$this->project->setMenu($this->projects, $project->id);
$actions = $this->dao->select('*')->from(TABLE_ACTION)->where('project')->eq("$projectID")->orderBy('date_desc')->limit(6)->fetchAll();
if($actions) $this->loadModel('action')->transformActions($actions);
$this->view->title = $this->lang->project->view;
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->view->title;
@@ -1295,8 +1298,9 @@ class project extends control
$this->view->products = $products;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
$this->view->actions = $actions;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->builds = $this->loadModel('build')->getProjectBuilds((int)$projectID);
$this->display();
}
+3 -1
View File
@@ -1 +1,3 @@
.outer .main-side > fieldset {padding-right: 0px;}
.data-basic > tbody > tr > th{width: 80px;}
.block-release .panel-body, .block-dynamic .panel-body {height: 224px; overflow: auto;}
.block-release .panel-body .release-line > li > a > .info{min-height: 18px;}
+5
View File
@@ -29,6 +29,8 @@ $lang->project->PO = 'PO';
$lang->project->PM = 'PM';
$lang->project->QD = 'QA Manager';
$lang->project->RD = 'Release Manager';
$lang->project->qa = 'Test';
$lang->project->release = 'Release';
$lang->project->acl = 'Access Control';
$lang->project->teamname = 'Team Name';
$lang->project->order = "Sort {$lang->projectCommon}";
@@ -106,6 +108,7 @@ $lang->project->groupTask = 'View by Group';
$lang->project->story = 'Stories';
$lang->project->bug = 'Bugs';
$lang->project->dynamic = 'Dynamic';
$lang->project->latestDynamic = 'Latest Dynamic';
$lang->project->build = 'Builds';
$lang->project->testtask = 'Test Tasks';
$lang->project->burn = 'Burndown';
@@ -141,6 +144,8 @@ $lang->project->tree = 'Tree';
$lang->project->storyKanban = 'Story Kanban';
$lang->project->storySort = 'Sort Story';
$lang->project->importPlanStory = 'Create ' . $lang->projectCommon . ' success!\nImport the stories with the plan?';
$lang->project->iteration = 'Iteration';
$lang->project->iterationInfo = 'Iteration %s times';
/* 分组浏览。*/
$lang->project->allTasks = 'All';
+6
View File
@@ -22,6 +22,7 @@ $lang->project->to = '至';
$lang->project->days = '可用工作日';
$lang->project->day = '天';
$lang->project->workHour = '工时';
$lang->project->totalHours = '可用工时';
$lang->project->status = $lang->projectCommon . '状态';
$lang->project->desc = $lang->projectCommon . '描述';
$lang->project->owner = '负责人';
@@ -29,6 +30,8 @@ $lang->project->PO = $lang->productCommon . '负责人';
$lang->project->PM = $lang->projectCommon . '负责人';
$lang->project->QD = '测试负责人';
$lang->project->RD = '发布负责人';
$lang->project->qa = '测试';
$lang->project->release = '发布';
$lang->project->acl = '访问控制';
$lang->project->teamname = '团队名称';
$lang->project->order = $lang->projectCommon . '排序';
@@ -106,6 +109,7 @@ $lang->project->groupTask = '分组浏览任务';
$lang->project->story = '需求列表';
$lang->project->bug = 'Bug列表';
$lang->project->dynamic = '动态';
$lang->project->latestDynamic = '最新动态';
$lang->project->build = '版本列表';
$lang->project->testtask = '测试任务';
$lang->project->burn = '燃尽图';
@@ -141,6 +145,8 @@ $lang->project->tree = '树状图';
$lang->project->storyKanban = '需求看板';
$lang->project->storySort = '需求排序';
$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入计划关联的相关需求?';
$lang->project->iteration = '版本迭代';
$lang->project->iterationInfo = '迭代%s次';
/* 分组浏览。*/
$lang->project->allTasks = '所有';
+22 -17
View File
@@ -12,26 +12,31 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['project']);?> <strong><?php echo $project->id;?></strong></span>
<strong><?php echo html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?></strong>
<small class='text-muted'> <?php echo $lang->project->start;?> <?php echo html::icon($lang->icons['start']);?></small>
</div>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<small><?php echo $lang->arrow . $lang->project->start;?></small>
</h2>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<form class='load-indicator main-form' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='text-left'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton($lang->project->start) . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
<tbody>
<tr>
<th><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton($lang->project->start) . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</tbody>
</table>
</form>
<div class='main'><?php include '../../common/view/action.html.php';?></div>
<hr class='small' />
<div class='main'>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+190 -117
View File
@@ -11,15 +11,197 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['project']);?> <strong><?php echo $project->id;?></strong></span>
<strong><?php echo $project->name;?></strong>
<?php if($project->deleted):?>
<span class='label label-danger'><?php echo $lang->project->deleted;?></span>
<?php endif; ?>
<div class="main-row">
<div class="col-8 main-col">
<div class="row">
<div class="col-sm-6">
<div class="panel block-release">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->iteration;?> <span class="label label-badge label-light"><?php echo sprintf($lang->project->iterationInfo, count($builds));?></span></div>
</div>
<div class="panel-body">
<div class="release-path">
<ul class="release-line">
<?php foreach($builds as $build):?>
<?php $icon = !empty($build->flag) ? "<i class='icon icon-flag'></i>" : '';?>
<li class="<?php echo end($build)->id == $build->id ? 'active' : '';?>">
<a href="<?php echo $this->createLink('build', 'view', "buildID={$build->id}");?>">
<span class="title"><?php echo $build->name;?></span>
<span class="date"><?php echo $build->date;?></span>
<span class="info"><?php echo $build->desc;?></span>
</a>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="panel block-dynamic">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->latestDynamic;?></div>
<nav class="panel-actions nav nav-default">
<li><a href="<?php echo $this->createLink('project', 'dynamic', "projectID=$project->id&type=all")?>" title="<?php echo $lang->more;?>">MORE</i></a></li>
</nav>
</div>
<div class="panel-body">
<ul class="timeline timeline-tag-left">
<?php $i = 1;?>
<?php foreach($actions as $action):?>
<?php $i++;?>
<li <?php if($i % 3 == 0) echo "class='active'";?>>
<div>
<span class="timeline-tag"><?php echo $action->date;?></span>
<span class="timeline-text"><?php echo zget($users, $action->actor) . ' ' . $action->actionLabel . $action->objectLabel . ' ' . html::a($action->objectLink, $action->objectName);?></span>
</div>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
</div>
<div class="col-sm-12">
<?php $blockHistory = true;?>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
</div>
<div class="col-4 side-col">
<div class="row">
<div class="col-sm-12">
<div class="cell">
<div class="detail">
<h2 class="detail-title"><span class="label-id"><?php echo $project->id;?></span> <span class="label label-light label-outline"><?php echo $project->code;?></span> <?php echo $project->name;?></h2>
<div class="detail-content article-content">
<p>
<span class="text-limit" data-limit-size="40"><?php echo $project->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>
<?php if($project->deleted):?>
<span class='label label-danger label-outline'><?php echo $lang->project->deleted;?></span>
<?php endif; ?>
<span class="label label-primary label-outline"><?php echo zget($lang->project->typeList, $project->type);?></span>
<?php if(isset($project->delay)):?>
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
<?php else:?>
<span class="label label-success label-outline"><?php echo zget($lang->project->statusList, $project->status);?></span>
<?php endif;?>
</p>
</div>
</div>
<div class='detail'>
<div class='detail-title'><strong><?php echo $lang->project->lblStats;?></strong></div>
<div class="detail-content">
<table class='table table-data data-stats'>
<tbody>
<tr>
<th><?php echo $lang->project->totalHours;?></th>
<td><em><?php echo $project->totalHours;?></em></td>
<th><?php echo $lang->project->totalEstimate;?></th>
<td><em><?php echo $project->totalEstimate;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalConsumed;?></th>
<td><em><?php echo $project->totalConsumed;?></em></td>
<th><?php echo $lang->project->totalLeft;?></th>
<td><em><?php echo $project->totalLeft;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php if($this->config->global->flow != 'onlyTask'):?>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->owner;?></strong></div>
<div class="detail-content">
<table class="table table-data">
<tbody>
<tr>
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->projectCommon;?></th>
<td><em><?php echo zget($users, $project->PM);?></em></td>
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->productCommon;?></th>
<td><em><?php echo zget($users, $project->PO);?></em></td>
</tr>
<tr>
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->project->qa;?></th>
<td><em><?php echo zget($users, $project->QD);?></em></td>
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->project->release;?></th>
<td><em><?php echo zget($users, $project->RD);?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php endif;?>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->basicInfo;?></strong></div>
<div class="detail-content">
<table class="table table-data data-basic">
<tbody>
<tr>
<th><?php echo $lang->project->beginAndEnd;?></th>
<td><em><?php echo $project->begin . ' ~ ' . $project->end;?></em></td>
<tr>
<th><?php echo $lang->project->days;?></th>
<td><em><?php echo $project->days;?></em></td>
</tr>
<?php if($this->config->global->flow != 'onlyTask'):?>
<tr>
<th><?php echo $lang->project->products;?></th>
<td>
<em>
<?php
foreach($products as $productID => $product)
{
if($product->type !== 'normal')
{
$branchName = isset($branchGroups[$productID][$product->branch]) ? '/' . $branchGroups[$productID][$product->branch] : '';
echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$product->branch"), $product->name . $branchName);
}
else
{
echo html::a($this->createLink('product', 'browse', "productID=$productID"), $product->name);
}
echo '<br />';
}
?>
</em>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td><em><?php echo $lang->project->aclList[$project->acl];?></em></td>
</tr>
<?php if($project->acl == 'custom'):?>
<tr>
<th><?php echo $lang->project->whitelist;?></th>
<td>
<em>
<?php
$whitelist = explode(',', $project->whitelist);
foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
?>
</em>
</td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='actions'>
</div>
<div id="mainActions">
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
$params = "project=$project->id";
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$project->id");
@@ -50,113 +232,4 @@
}
?>
</div>
</div>
<div class='row-table'>
<div class='col-main'>
<div class='main'>
<fieldset>
<legend><?php echo $lang->project->desc;?></legend>
<div class='content'>
<?php echo $project->desc;?>
<div>
<label><?php echo $lang->project->lblStats?></label>
<?php printf($lang->project->stats, $project->totalHours, $project->totalEstimate, $project->totalConsumed, $project->totalLeft, 10)?>
</div>
</div>
</fieldset>
<?php include '../../common/view/action.html.php';?>
<div class='actions'> <?php if(!$project->deleted) echo $actionLinks;?></div>
</div>
</div>
<div class='col-side'>
<div class='main main-side'>
<fieldset>
<legend><?php echo $lang->project->basicInfo?></legend>
<table class='table table-data table-condensed table-borderless'>
<tr>
<th class='w-110px text-right strong'><?php echo $lang->project->name;?></th>
<td><?php echo $project->name;?></td>
</tr>
<tr>
<th><?php echo $lang->project->code;?></th>
<td><?php echo $project->code;?></td>
</tr>
<tr>
<th><?php echo $lang->project->beginAndEnd;?></th>
<td><?php echo $project->begin . ' ~ ' . $project->end;?></td>
</tr>
<tr>
<th><?php echo $lang->project->days;?></th>
<td><?php echo $project->days;?></td>
</tr>
<tr>
<th><?php echo $lang->project->type;?></th>
<td><?php echo $lang->project->typeList[$project->type];?></td>
</tr>
<tr>
<th><?php echo $lang->project->status;?></th>
<?php if(isset($project->delay)):?>
<td class='delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='<?php echo $project->status;?>'><?php $lang->show($lang->project->statusList, $project->status);?></td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->project->PM;?></th>
<td><?php echo zget($users, $project->PM, $project->PM);?></td>
</tr>
<?php if($this->config->global->flow != 'onlyTask'):?>
<tr>
<th><?php echo $lang->project->PO;?></th>
<td><?php echo zget($users, $project->PO, $project->PO);?></td>
</tr>
<tr>
<th><?php echo $lang->project->QD;?></th>
<td><?php echo zget($users, $project->QD, $project->QD);?></td>
</tr>
<tr>
<th><?php echo $lang->project->RD;?></th>
<td><?php echo zget($users, $project->RD, $project->RD);?></td>
</tr>
<tr>
<th><?php echo $lang->project->products;?></th>
<td>
<?php
foreach($products as $productID => $product)
{
if($product->type !== 'normal')
{
$branchName = isset($branchGroups[$productID][$product->branch]) ? '/' . $branchGroups[$productID][$product->branch] : '';
echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$product->branch"), $product->name . $branchName);
}
else
{
echo html::a($this->createLink('product', 'browse', "productID=$productID"), $product->name);
}
echo '<br />';
}
?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td><?php echo $lang->project->aclList[$project->acl];?></td>
</tr>
<?php if($project->acl == 'custom'):?>
<tr>
<th><?php echo $lang->project->whitelist;?></th>
<td>
<?php
$whitelist = explode(',', $project->whitelist);
foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
?>
</td>
</tr>
<?php endif;?>
</table>
</fieldset>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+9 -5
View File
@@ -395,11 +395,13 @@ class user extends control
{
if(strtolower($_POST['account']) == 'guest')
{
die(js::error(str_replace('ID ', '', sprintf($this->lang->user->error->reserved, $_POST['account']))));
$this->send(array('result' => 'fail', 'message' => str_replace('ID ', '', sprintf($this->lang->user->error->reserved, $_POST['account']))));
}
$this->user->create();
if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($this->createLink('company', 'browse'), 'parent'));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('company', 'browse')));
}
$groups = $this->dao->select('id, name, role')->from(TABLE_GROUP)->fetchAll();
$groupList = array('' => '');
@@ -485,8 +487,10 @@ class user extends control
if(!empty($_POST))
{
$this->user->update($userID);
if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse'), 'parent'));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$link = $this->session->userList ? $this->session->userList : $this->createLink('company', 'browse');
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
}
$user = $this->user->getById($userID, 'id');
+1
View File
@@ -67,6 +67,7 @@ $lang->user->relogin = "Login Again";
$lang->user->asGuest = "Guest";
$lang->user->goback = "Back";
$lang->user->deleted = '(Deleted)';
$lang->user->search = 'Search';
$lang->user->profile = 'Profile';
$lang->user->project = $lang->projectCommon;
+1
View File
@@ -67,6 +67,7 @@ $lang->user->relogin = "重新登录";
$lang->user->asGuest = "游客访问";
$lang->user->goback = "返回前一页";
$lang->user->deleted = '(已删除)';
$lang->user->search = '搜索';
$lang->user->profile = '档案';
$lang->user->project = $lang->projectCommon;
+1
View File
@@ -67,6 +67,7 @@ $lang->user->relogin = "重新登錄";
$lang->user->asGuest = "遊客訪問";
$lang->user->goback = "返回前一頁";
$lang->user->deleted = '(已刪除)';
$lang->user->search = '搜索';
$lang->user->profile = '檔案';
$lang->user->project = $lang->projectCommon;