* ajusted views of module 'group' & 'company'.

This commit is contained in:
Catouse
2014-04-02 17:38:57 +08:00
parent f27c705c00
commit f1183fed54
22 changed files with 340 additions and 277 deletions
+8 -5
View File
@@ -252,11 +252,14 @@ class common extends control
* @param string $type button|list
* @param string $icon
* @param string $target
* @param string $extraClass
* @param bool $onlyBody
* @param string $misc
* @static
* @access public
* @return void
*/
public static function printIcon($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '', $onlyBody = false)
public static function printIcon($module, $method, $vars = '', $object = '', $type = 'button', $icon = '', $target = '', $extraClass = '', $onlyBody = false, $misc = '')
{
if(isonlybody() and strpos($extraClass, 'showinonlybody') === false) return false;
@@ -316,23 +319,23 @@ class common extends control
{
if($method != 'edit' and $method != 'copy' and $method != 'delete')
{
echo html::a($link, "<i class='$class'></i> " . $title, $target, "class='btn $extraClass'", true);
echo html::a($link, "<i class='$class'></i> " . $title, $target, "class='btn $extraClass' $misc", true);
}
else
{
echo html::a($link, "<i class='$class'></i>", $target, "class='btn $extraClass' title='$title'", false);
echo html::a($link, "<i class='$class'></i>", $target, "class='btn $extraClass' title='$title' $misc", false);
}
}
else
{
echo html::a($link, "<i class='$class'></i>", $target, "class='btn-icon $extraClass' title='$title'", false);
echo html::a($link, "<i class='$class'></i>", $target, "class='btn-icon $extraClass' title='$title' $misc", false);
}
}
else
{
if($type == 'list')
{
echo "<button class='disabled btn-icon $extraClass'><i class='$class' title='$title'></i></button>";
echo "<button class='disabled btn-icon $extraClass'><i class='$class' title='$title' $misc></i></button>";
}
}
}
+4
View File
@@ -420,7 +420,10 @@ $lang->icons['dynamic'] = 'volume-up';
$lang->icons['build'] = 'tag';
$lang->icons['test'] = 'check';
$lang->icons['testtask']= 'check';
$lang->icons['group'] = 'group';
$lang->icons['team'] = 'group';
$lang->icons['company'] = 'building';
$lang->icons['dept'] = 'sitemap';
$lang->icons['usecase'] = 'usecase';
$lang->icons['testcase']= 'smile';
$lang->icons['result'] = 'flag-checkered';
@@ -456,5 +459,6 @@ $lang->icons['suspend'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
include (dirname(__FILE__) . '/menuOrder.php');
-4
View File
@@ -1,4 +0,0 @@
$(function()
{
if(onlybody != 'yes') $('#editCompany').colorbox({width:750, height:500, iframe:true, transition:'none'});
});
+88 -86
View File
@@ -13,96 +13,98 @@
<?php
include '../../common/view/header.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
js::set('deptID', $deptID);
js::set('confirmDelete', $lang->user->confirmDelete);
?>
<table class='cont-lt1'>
<tr><td colspan='3'><div id='querybox'><?php echo $searchForm?></div></td></tr>
<tr valign='top'>
<td class='side'>
<div class='box-title'><?php echo $lang->dept->common;?></div>
<div class='box-content'>
<?php echo $deptTree;?>
<div class='text-right'><?php common::printLink('dept', 'browse', '', $lang->dept->manage);?></div>
</div>
</td>
<td class='divider'></td>
<td>
<table class='table-1 tablesorter colored' 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('join', $orderBy, $vars, $lang->user->join);?></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-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<form action='<?php echo $this->createLink('user', 'batchEdit', "deptID=$deptID")?>' method='post' id='userListForm'>
<div id='featurebar'>
<div class='heading'><?php echo html::icon($lang->icons['company']);?> <?php echo $lang->company->browse;?></div>
<div id='querybox' class='show'><?php echo $searchForm?></div>
</div>
<div class='side'>
<button class='side-handle' data-id='companyTree'><i class='icon-caret-left'></i></button>
<header class='nobr'><?php echo html::icon($lang->icons['company']);?> <strong><?php echo $lang->dept->common;?></strong></header>
<div class='side-body'>
<?php echo $deptTree;?>
<div class='text-right'><?php common::printLink('dept', 'browse', '', $lang->dept->manage);?></div>
</div>
</div>
<div class='main'>
<form action='<?php echo $this->createLink('user', 'batchEdit', "deptID=$deptID")?>' method='post' id='userListForm'>
<table class='table table-condensed table-hover table-striped table-borderless tablesorter table-fixed' 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('join', $orderBy, $vars, $lang->user->join);?></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-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('user', 'batchEdit');
$canManageContacts = common::hasPriv('user', 'manageContacts');
?>
<?php foreach($users as $user):?>
<tr class='text-center'>
<td>
<?php
$canBatchEdit = common::hasPriv('user', 'batchEdit');
$canManageContacts = common::hasPriv('user', 'manageContacts');
if($canBatchEdit or $canManageContacts) echo "<input type='checkbox' name='users[]' value='$user->account'> ";
printf('%03d', $user->id);
?>
<?php foreach($users as $user):?>
<tr class='text-center'>
<td>
<?php
if($canBatchEdit or $canManageContacts) 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)) 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 echo $user->join;?></td>
<td><?php if($user->last) echo date('Y-m-d', $user->last);?></td>
<td><?php echo $user->visits;?></td>
<td class='a-left w-80px'>
<?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'))
{
$deleteURL = $this->createLink('user', 'delete', "userID=$user->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"userList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->user->delete}'");
}
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");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='12'>
<?php
if($canBatchEdit or $canManageContacts) echo html::selectAll() . html::selectReverse();
if($canBatchEdit) echo html::submitButton($lang->edit, 'onclick=batchEdit()');
if($canManageContacts) echo html::submitButton($lang->user->contacts->manage, 'onclick=manageContacts()');
$pager->show();
?>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
</td>
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $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 echo $user->join;?></td>
<td><?php if($user->last) echo date('Y-m-d', $user->last);?></td>
<td><?php echo $user->visits;?></td>
<td class='a-left w-80px'>
<?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'))
{
$deleteURL = $this->createLink('user', 'delete', "userID=$user->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"userList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->user->delete}' class='btn-icon'");
}
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");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='12'>
<div class='table-actions clearfix'>
<?php
if($canBatchEdit or $canManageContacts) echo "<div class='input-group'>" . html::selectAll() . html::selectReverse() . '</div>';
if($canBatchEdit) echo html::submitButton($lang->edit, 'onclick=batchEdit()', 'btn-default');
if($canManageContacts) echo html::submitButton($lang->user->contacts->manage, 'onclick=manageContacts()');
?>
</div>
<?php echo $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<script lanugage='javascript'>$('#dept<?php echo $deptID;?>').addClass('active');</script>
<?php include '../../common/view/footer.html.php';?>
+20 -16
View File
@@ -16,23 +16,27 @@
var browseType = '<?php echo $browseType;?>';
</script>
<div id='featurebar'>
<?php
echo '<span id="today">' . html::a(inlink('dynamic', "browseType=today"), $lang->action->dynamic->today) . '</span>';
echo '<span id="yesterday">' . html::a(inlink('dynamic', "browseType=yesterday"), $lang->action->dynamic->yesterday) . '</span>';
echo '<span id="twodaysago">' . html::a(inlink('dynamic', "browseType=twodaysago"), $lang->action->dynamic->twoDaysAgo) . '</span>';
echo '<span id="thisweek">' . html::a(inlink('dynamic', "browseType=thisweek"), $lang->action->dynamic->thisWeek) . '</span>';
echo '<span id="lastweek">' . html::a(inlink('dynamic', "browseType=lastweek"), $lang->action->dynamic->lastWeek) . '</span>';
echo '<span id="thismonth">' . html::a(inlink('dynamic', "browseType=thismonth"), $lang->action->dynamic->thisMonth) . '</span>';
echo '<span id="lastmonth">' . html::a(inlink('dynamic', "browseType=lastmonth"), $lang->action->dynamic->lastMonth) . '</span>';
echo '<span id="all">' . html::a(inlink('dynamic', "browseType=all"), $lang->action->dynamic->all) . '</span>';
echo "<span id='account'>" . html::select('account', $users, $account, 'onchange=changeUser(this.value)') . '</span>';
echo "<span id='product'>" . html::select('product', $products, $product, 'onchange=changeProduct(this.value)') . '</span>';
echo "<span id='project'>" . html::select('project', $projects, $project, 'onchange=changeProject(this.value)') . '</span>';
echo "<span id='bysearchTab'>" . html::a('#', '<i class="icon-search icon"></i>&nbsp;' . $lang->action->dynamic->search) . "</span>";
?>
<div class='heading'><?php echo html::icon($lang->icons['dynamic']);?></div>
<ul class='nav'>
<?php
echo '<li id="today">' . html::a(inlink('dynamic', "browseType=today"), $lang->action->dynamic->today) . '</li>';
echo '<li id="yesterday">' . html::a(inlink('dynamic', "browseType=yesterday"), $lang->action->dynamic->yesterday) . '</li>';
echo '<li id="twodaysago">' . html::a(inlink('dynamic', "browseType=twodaysago"), $lang->action->dynamic->twoDaysAgo) . '</li>';
echo '<li id="thisweek">' . html::a(inlink('dynamic', "browseType=thisweek"), $lang->action->dynamic->thisWeek) . '</li>';
echo '<li id="lastweek">' . html::a(inlink('dynamic', "browseType=lastweek"), $lang->action->dynamic->lastWeek) . '</li>';
echo '<li id="thismonth">' . html::a(inlink('dynamic', "browseType=thismonth"), $lang->action->dynamic->thisMonth) . '</li>';
echo '<li id="lastmonth">' . html::a(inlink('dynamic', "browseType=lastmonth"), $lang->action->dynamic->lastMonth) . '</li>';
echo '<li id="all">' . html::a(inlink('dynamic', "browseType=all"), $lang->action->dynamic->all) . '</li>';
echo "<li id='account'>" . html::select('account', $users, $account, 'onchange=changeUser(this.value) class="form-control"') . '</li>';
echo "<li id='product'>" . html::select('product', $products, $product, 'onchange=changeProduct(this.value) class="form-control"') . '</li>';
echo "<li id='project' style='margin-right: 10px;'>" . html::select('project', $projects, $project, 'onchange=changeProject(this.value) class="form-control"') . '</li>';
echo "<li id='bysearchTab'>" . html::a('#', '<i class="icon-search icon"></i>&nbsp;' . $lang->action->dynamic->search) . "</li>";
?>
</ul>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<table class='table-1 colored tablesorter fixed'>
<table class='table table-condensed table-hover table-striped table-borderless tablesorter table-fixed'>
<thead>
<tr class='colhead'>
<th class='w-150px'><?php echo $lang->action->date;?></th>
+11 -5
View File
@@ -11,11 +11,17 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table align='center' class='table-5'>
<caption><?php echo $lang->company->edit;?></caption>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='COMPANY'><?php echo html::icon($lang->icons['company']) . ' #' . $company->id;?></span>
<strong><?php echo $company->name;?></strong>
<small class='text-muted'> <?php echo $lang->company->edit;?> <?php echo html::icon($lang->icons['edit']);?></small>
</div>
</div>
<form class='form-condensed mw-500px pdb-20' method='post' target='hiddenwin'>
<table align='center' class='table table-form'>
<tr>
<th><?php echo $lang->company->name;?></th>
<th class='w-100px'><?php echo $lang->company->name;?></th>
<td><?php echo html::input('name', $company->name, "class='form-control'");?></td>
</tr>
<tr>
@@ -46,7 +52,7 @@
<th><?php echo $lang->company->guest;?></th>
<td><?php echo html::radio('guest', $lang->company->guestList, $company->guest);?></td>
</tr>
<tr><td colspan='2' class='text-center'><?php echo html::submitButton();?></td></tr>
<tr><td></td><td><?php echo html::submitButton();?></td></tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
+43 -36
View File
@@ -11,40 +11,47 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<table align='center' class='table-5'>
<caption><?php echo $lang->company->view;?></caption>
<tr>
<th><?php echo $lang->company->name;?></th>
<td><?php echo $company->name;?></td>
</tr>
<tr>
<th><?php echo $lang->company->phone;?></th>
<td><?php echo $company->phone;?></td>
</tr>
<tr>
<th><?php echo $lang->company->fax;?></th>
<td><?php echo $company->fax;?></td>
</tr>
<tr>
<th><?php echo $lang->company->address;?></th>
<td><?php echo $company->address;?></td>
</tr>
<tr>
<th><?php echo $lang->company->zipcode;?></th>
<td><?php echo $company->zipcode;?></td>
</tr>
<tr>
<th><?php echo $lang->company->website;?></th>
<td><?php echo $company->website;?></td>
</tr>
<tr>
<th><?php echo $lang->company->backyard;?></th>
<td><?php echo $company->backyard;?></td>
</tr>
<tr>
<th><?php echo $lang->company->guest;?></th>
<td><?php echo $lang->company->guestList[$company->guest];?></td>
</tr>
<tr><td colspan='2' class='text-center'><?php common::printLink('company', 'edit', '', '<i class="icon-pencil"></i> ' . $lang->edit, '', 'id="editCompany" class="btn"', true, true);?></td></tr>
</table>
<div class='container mw-600px'>
<div id='featurebar'>
<div class='heading'><?php echo html::icon($lang->icons['company']);?> <?php echo $lang->company->view;?></div>
<div class='btn-group pull-right'>
<?php common::printLink('company', 'edit', '', '<i class="icon-pencil"></i> ' . $lang->edit, '', 'id="editCompany" class="btn btn-primary iframe" data-width="580"', true, true);?>
</div>
</div>
<table class='table table-borderless table-data'>
<tr>
<th class='w-100px'><?php echo $lang->company->name;?></th>
<td><?php echo $company->name;?></td>
</tr>
<tr>
<th><?php echo $lang->company->phone;?></th>
<td><?php echo $company->phone;?></td>
</tr>
<tr>
<th><?php echo $lang->company->fax;?></th>
<td><?php echo $company->fax;?></td>
</tr>
<tr>
<th><?php echo $lang->company->address;?></th>
<td><?php echo $company->address;?></td>
</tr>
<tr>
<th><?php echo $lang->company->zipcode;?></th>
<td><?php echo $company->zipcode;?></td>
</tr>
<tr>
<th><?php echo $lang->company->website;?></th>
<td><?php echo $company->website;?></td>
</tr>
<tr>
<th><?php echo $lang->company->backyard;?></th>
<td><?php echo $company->backyard;?></td>
</tr>
<tr>
<th><?php echo $lang->company->guest;?></th>
<td><?php echo $lang->company->guestList[$company->guest];?></td>
</tr>
<tr><td colspan='2' class='text-center'></td></tr>
</table>
</div>
<?php include '../../common/view/footer.html.php';?>
+4 -1
View File
@@ -1 +1,4 @@
.table-1 input{margin-bottom:3px}
.table.table-form {width: auto;}
.table-form > tbody > tr > td .form-control {position: relative; z-index: 99}
.table-form > tbody > tr > td .form-control + .form-control {margin-top: -1px;}
.table-form > tbody > tr > td .form-control + .form-control:focus {z-index: 9999}
+67 -57
View File
@@ -12,62 +12,72 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<table class="cont-lt4">
<tr valign='top'>
<td class='side'>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'updateOrder');?>'>
<table class='table-1'>
<caption><?php echo $title;?></caption>
<tr>
<td>
<div id='main'><?php echo $depts;?></div>
<div class='text-center'><?php echo html::submitButton($lang->dept->updateOrder);?></div>
</td>
</tr>
</table>
</form>
</td>
<td class='divider'></td>
<td>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>'>
<table align='center' class='table-1'>
<caption><?php echo $lang->dept->manageChild;?></caption>
<tr>
<td width='10%'>
<nobr>
<?php
echo html::a($this->createLink('dept', 'browse'), $this->app->company->name);
echo $lang->arrow;
foreach($parentDepts as $dept)
{
echo html::a($this->createLink('dept', 'browse', "deptID=$dept->id"), $dept->name);
<div id='featurebar'>
<div class='heading'><?php echo html::icon($lang->icons['dept']);?> <?php echo $lang->dept->common;?></div>
</div>
<div class='main'>
<div class='row'>
<div class='col-sm-4'>
<div class='panel panel-sm'>
<div class='panel-heading'>
<?php echo html::icon($lang->icons['dept']);?> <strong><?php echo $title;?></strong>
</div>
<div class='panel-body'>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'updateOrder');?>'>
<div id='main'><?php echo $depts;?></div>
<div class='text-center'><?php echo html::submitButton($lang->dept->updateOrder);?></div>
</form>
</div>
</div>
</div>
<div class='col-sm-8'>
<div class='panel panel-sm'>
<div class='panel-heading'>
<i class='icon-sitemap'></i> <strong><?php echo $lang->dept->manageChild;?></strong>
</div>
<div class='panel-body'>
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>' class='form-condensed'>
<table class='table table-form'>
<tr>
<td>
<nobr>
<?php
echo html::a($this->createLink('dept', 'browse'), $this->app->company->name);
echo $lang->arrow;
}
?>
</nobr>
</td>
<td>
<?php
$maxOrder = 0;
foreach($sons as $sonDept)
{
if($sonDept->order > $maxOrder) $maxOrder = $sonDept->order;
echo html::input("depts[id$sonDept->id]", $sonDept->name) . '<br />';
}
for($i = 0; $i < DEPT::NEW_CHILD_COUNT ; $i ++) echo html::input("depts[]") . '<br />';
?>
</td>
</tr>
<tr>
<td></td>
<td>
<?php echo html::submitButton() . html::backButton() . html::hidden('maxOrder', $maxOrder);?>
<input type='hidden' value='<?php echo $deptID;?>' name='parentDeptID' />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
foreach($parentDepts as $dept)
{
echo html::a($this->createLink('dept', 'browse', "deptID=$dept->id"), $dept->name);
echo $lang->arrow;
}
?>
</nobr>
</td>
<td class='w-300px'>
<?php
$maxOrder = 0;
foreach($sons as $sonDept)
{
if($sonDept->order > $maxOrder) $maxOrder = $sonDept->order;
echo html::input("depts[id$sonDept->id]", $sonDept->name, "class='form-control'");
}
for($i = 0; $i < DEPT::NEW_CHILD_COUNT ; $i ++) echo html::input("depts[]", '', "class='form-control'");
?>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<?php echo html::submitButton() . html::backButton() . html::hidden('maxOrder', $maxOrder);?>
<input type='hidden' value='<?php echo $deptID;?>' name='parentDeptID' />
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
-1
View File
@@ -1 +0,0 @@
#users span{display:block; width:100px; float:left}
+2
View File
@@ -0,0 +1,2 @@
.group-item {display:block; width:100px; float:left}
.outer .table th {vertical-align: top;}
+1 -4
View File
@@ -1,4 +1 @@
.table-6 select{width:200px; height:200px}
#version {margin-left:10px;}
tr {border:1px solid #eee}
.tips {font-weight:normal}
.form-condensed select.form-control {height:250px}
+22 -22
View File
@@ -13,19 +13,24 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
<table align='center' class='table-1 tablesorter fixed' id='groupList'>
<caption class='caption-tl pb-10px'>
<div class='f-left'><?php echo $lang->group->browse;?></div>
<div class='text-right'><?php common::printIcon('group', 'create');?></div>
</caption>
<div id='featurebar'>
<div class='heading'><?php echo html::icon($lang->icons['group']);?> <?php echo $lang->group->browse;?></div>
<div class='actions'>
<?php common::printIcon('group', 'create', '', '', 'button', '', '', 'iframe', true, "data-width='550'");?>
<?php if(common::hasPriv('group', 'managePriv')):?>
<?php echo html::a(inlink('managePriv', 'type=byModule&onlybody=yes'), $lang->group->managePrivByModule, '', 'class="btn btn-primary iframe"');?>
<?php endif;?>
</div>
</div>
<table align='center' class='table table-condensed table-hover table-striped table-borderless tablesorter table-fixed' id='groupList'>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->group->id;?></th>
<th class='w-100px'><?php echo $lang->group->name;?></th>
<th><?php echo $lang->group->desc;?></th>
<th class='w-p60'><?php echo $lang->group->users;?></th>
<th class='w-120px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
<tr>
<th class='w-id'><?php echo $lang->group->id;?></th>
<th class='w-100px'><?php echo $lang->group->name;?></th>
<th><?php echo $lang->group->desc;?></th>
<th class='w-p60'><?php echo $lang->group->users;?></th>
<th class='w-120px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($groups as $group):?>
@@ -37,26 +42,21 @@
<td class='text-left' title='<?php echo $users;?>'><?php echo $users;?></td>
<td class='text-center'>
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
<?php common::printIcon('group', 'managepriv', "type=byGroup&param=$group->id", '', 'list');?>
<?php common::printIcon('group', 'managepriv', "type=byGroup&param=$group->id", '', 'list', 'lock');?>
<?php $lang->group->managemember = $lang->group->manageMember;?>
<?php common::printIcon('group', 'managemember', "groupID=$group->id", '', 'list');?>
<?php common::printIcon('group', 'edit', "groupID=$group->id", '', 'list');?>
<?php common::printIcon('group', 'copy', "groupID=$group->id", '', 'list');?>
<?php common::printIcon('group', 'managemember', "groupID=$group->id", '', 'list', 'group', '', 'iframe', yes);?>
<?php common::printIcon('group', 'edit', "groupID=$group->id", '', 'list', '', '', 'iframe', yes, "data-width='550'");?>
<?php common::printIcon('group', 'copy', "groupID=$group->id", '', 'list', '', '', 'iframe', yes, "data-width='550'");?>
<?php
if(common::hasPriv('group', 'delete'))
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"groupList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->group->delete}'");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"groupList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->group->delete}' class='btn-icon'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<?php if(common::hasPriv('group', 'managePriv')):?>
<tfoot>
<tr><td colspan='5' class='text-center'><?php echo html::linkButton($lang->group->managePrivByModule, inlink('managePriv', 'type=byModule'));?></td></tr>
</tfoot>
<?php endif;?>
</table>
<?php include '../../common/view/footer.html.php';?>
+13 -6
View File
@@ -11,17 +11,24 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table align='center' class='table-4'>
<caption><?php echo $lang->group->copy;?></caption>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='GROUP'><?php echo html::icon($lang->icons['group']);?></span>
<strong><?php echo $lang->group->copy;?></strong>
<small class='text-muted'> <?php echo html::icon($lang->icons['copy']);?></small>
</div>
</div>
<form class='form-condensed mw-500px pdb-20' method='post' target='hiddenwin'>
<table align='center' class='table table-form'>
<tr>
<th><?php echo $lang->group->name;?></th>
<th class='w-100px'><?php echo $lang->group->name;?></th>
<td><?php echo html::input('name', $group->name, "class='form-control'");?></td>
</tr>
</tr>
<tr>
<th><?php echo $lang->group->desc;?></th>
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='form-control'");?></td>
</tr>
</tr>
<tr>
<th><?php echo $lang->group->option;?></th>
<td><?php echo html::checkbox('options', $lang->group->copyOptions);?></td>
+10 -5
View File
@@ -11,16 +11,21 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table align='center' class='table-4 a-left'>
<caption><?php echo $lang->group->create;?></caption>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='GROUP'><?php echo html::icon($lang->icons['group']);?></span>
<strong><small><?php echo html::icon($lang->icons['create']);?></small> <?php echo $lang->group->create;?></strong>
</div>
</div>
<form class='form-condensed mw-500px pdb-20' method='post' target='hiddenwin' id='dataform'>
<table align='center' class='table table-form'>
<tr>
<th><?php echo $lang->group->name;?></th>
<th class='w-80px'><?php echo $lang->group->name;?></th>
<td><?php echo html::input('name', '', "class=form-control");?></td>
</tr>
<tr>
<th><?php echo $lang->group->desc;?></th>
<td><?php echo html::textarea('desc', '', "rows=5 class=area-1");?></textarea></td>
<td><?php echo html::textarea('desc', '', "rows=5 class=form-control");?></td>
</tr>
<tr><td colspan='2' class='text-center'><?php echo html::submitButton();?></td></tr>
</table>
+11 -4
View File
@@ -11,11 +11,18 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table align='center' class='table-4'>
<caption><?php echo $lang->group->edit;?></caption>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='GROUP'><?php echo html::icon($lang->icons['group']) . ' #' . $group->id;?></span>
<strong><?php echo $group->name;?></strong>
<small class='text-muted'> <?php echo $lang->group->edit;?> <?php echo html::icon($lang->icons['edit']);?></small>
</div>
</div>
<form class='form-condensed mw-500px pdb-20' method='post' target='hiddenwin' id='dataform'>
<table align='center' class='table table-form'>
<tr>
<th><?php echo $lang->group->name;?></th>
<th class='w-100px'><?php echo $lang->group->name;?></th>
<td><?php echo html::input('name', $group->name, "class='form-control'");?></td>
</tr>
<tr>
+13 -8
View File
@@ -11,16 +11,22 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table align='center' class='table-1 a-left'>
<caption><?php echo $group->name . $lang->colon . $lang->group->manageMember;?></caption>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='GROUP'><?php echo html::icon($lang->icons['group']) . ' #' . $group->id;?></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>
</div>
<form class='form-condensed pdb-20' method='post' target='hiddenwin'>
<table align='center' class='table table-form'>
<?php if($groupUsers):?>
<tr>
<th><?php echo $lang->group->inside;?><?php echo html::selectAll('group', 'checkbox', true);?> </th>
<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='w-p10 f-left'><?php echo '<span>' . html::checkbox('members', array($account => $realname), $account) . '</span>';?></div>
<?php if(($i % 8) == 0) echo "<div class='c-both'></div>"; $i ++;?>
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), $account);?></div>
<?php endforeach;?>
</td>
</tr>
@@ -29,8 +35,7 @@
<th><?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='w-p10 f-left'><?php echo '<span>' . html::checkbox('members', array($account => $realname), '') . '</span>';?></div>
<?php if(($i % 8) == 0) echo "<div class='c-both'></div>"; $i ++;?>
<div class='group-item'><?php echo html::checkbox('members', array($account => $realname), '');?></div>
<?php endforeach;?>
</td>
</tr>
+19 -12
View File
@@ -10,27 +10,34 @@
* @link http://www.zentao.net
*/
?>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table-6 a-center' align='center'>
<caption class='caption-tl'><?php echo $lang->group->managePriv . $lang->group->byModuleTips;?></caption>
<tr class='colhead'>
<th><?php echo $lang->group->module;?></th>
<th><?php echo $lang->group->method;?></th>
<th><?php echo $lang->group->common;?></th>
</tr>
<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>
</div>
<div class='actions'><div class='text text-info'><i class='icon-info-sign'></i> <?php echo $lang->group->byModuleTips; ?></div>&nbsp;&nbsp;</div>
</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><?php echo html::select('module', $modules, '', " size='10' onclick='setModuleActions(this.value)'");?></td>
<td id='actionBox'>
<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='$class {$module}Actions'");
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'");?></td>
<td><?php echo html::select('groups[]', $groups, '', "multiple='multiple' class='form-control'");?></td>
</tr>
<tr>
<td class='text-center' colspan='3'>
+1 -1
View File
@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<div class='container mw-600px'>
<div id='featurebar'>
<div class='heading'><i class='icon-user'></i> <?php echo $lang->my->profile;?></div>
<div class='heading'><?php echo html::icon($lang->icons['user']);?> <?php echo $lang->my->profile;?></div>
<div class='btn-group pull-right'>
<?php echo html::a($this->createLink('my', 'editprofile'), "<i class='icon-pencil'></i> " . $lang->user->editProfile, '', "class='btn btn-primary'");?>
</div>
+1 -1
View File
@@ -41,7 +41,7 @@ var moduleID = '<?php echo $moduleID;?>';
</div>
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
</div>
<div class='side' id='treebox'>
<div class='side' id='casesbox'>
<button class='side-handle' data-id='storyTree'><i class='icon-caret-left'></i></button>
<header class='nobr'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $productName;?></strong></header>
<div class='side-body'>
+1 -3
View File
@@ -390,8 +390,6 @@ function setOuterBox()
{
var height = $(window).height() - $('#header').height() - $('#footer').height() - 33;
$('#wrap .outer').css('min-height', height);
/* uncomment to ajust treebox height */
// $('#treebox').css('min-height', height - $('#featurebar').height() - 18);
}
$(window).resize(resetOuterHeight);
@@ -917,7 +915,7 @@ function setModal()
*/
function setTableBehavior()
{
$('#wrap .table:not(.table-data, .table-form) tbody tr:not(.actie-disabled) td').click(function(){$(this).closest('tr').toggleClass('active');});
$('#wrap .table:not(.table-data, .table-form, .active-disabled) tbody tr:not(.active-disabled) td').click(function(){$(this).closest('tr').toggleClass('active');});
$('#wrap .outer > .table, #wrap .outer > form > .table, #wrap .outer > .mian > .table, #wrap .outer > .mian > form > .table, #wrap .outer > .container > .table').not('.table-data, .table-form').addClass('table table-condensed table-hover table-striped table-borderless tablesorter');
}
+1
View File
@@ -23,6 +23,7 @@
/* paddings */
.pd-0 {padding: 0 !important}
.mg-0 {margin: 0 !important}
.pdb-20 {padding-bottom: 20px !important}
/* Style of text */
.text-latin {font-family: Arial;}