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

This commit is contained in:
wangyidong
2019-02-22 14:06:17 +08:00
9 changed files with 20 additions and 15 deletions
+1
View File
@@ -1325,6 +1325,7 @@ class bugModel extends model
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi()
->beginIF($type != 'closedBy')->andWhere('status')->ne('closed')->fi()
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
+4 -4
View File
@@ -44,7 +44,7 @@ class doc extends control
$pager = new pager(0, 5, 1);
$this->lang->modulePageActions = $this->doc->setFastMenu($this->lang->doc->fast);
$this->lang->modulePageActions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$this->lang->modulePageActions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='45%'") : '';
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'index');
@@ -328,7 +328,7 @@ class doc extends control
$this->product->setMenu($this->product->getPairs(), $lib->product);
$this->lang->set('menugroup.doc', 'product');
if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), "<i class='icon icon-plus'></i> " . $this->lang->doc->create, '', "class='btn btn-primary'");
$this->lang->modulePageActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='45%'") : '';
}
elseif($this->from == 'project')
{
@@ -337,7 +337,7 @@ class doc extends control
$this->project->setMenu($this->project->getPairs('nocode'), $lib->project);
$this->lang->set('menugroup.doc', 'project');
if(common::hasPriv('doc', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('doc', 'create', "libID=$libID"), "<i class='icon icon-plus'></i> " . $this->lang->doc->create, '', "class='btn btn-primary'");
$this->lang->modulePageActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='45%'") : '';
}
else
{
@@ -803,7 +803,7 @@ class doc extends control
}
elseif($from == 'project')
{
$this->lang->modulePageActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "from=project&projectID=$objectID"), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$this->lang->modulePageActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='45%'") : '';
$this->lang->doc->menu = $this->lang->project->menu;
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
$this->project->setMenu($this->project->getPairs('nocode'), $objectID);
+1 -1
View File
@@ -1,5 +1,5 @@
.modal-dialog{width:75%}
form{margin-bottom:130px; padding-left:65px}
form{margin-bottom:100px; padding-left:65px}
table{width:90% !important}
#whiteListBox div.input-group {margin-bottom: 2px;}
+1 -1
View File
@@ -16,7 +16,7 @@ function toggleAcl(acl, type)
}
if(type == 'lib')
{
var libType = $('#type').val();
var libType = $('input[name="type"]').val();
var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : '';
$('#noticeAcl').html(notice);
}
+2 -2
View File
@@ -1,11 +1,11 @@
$(function()
{
$('#type').change(function()
$('input[name="type"]').change(function()
{
var libType = $(this).val();
changeByLibType(libType);
})
changeByLibType($('#type').val());
changeByLibType($('input[name="type"]').val());
toggleAcl($('[name=acl]').val(), 'lib');
});
+2 -2
View File
@@ -163,8 +163,8 @@ var browseType = '<?php echo $browseType;?>';
<td class="c-name"><?php echo html::a(inlink('view', "docID=$doc->id"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title);?></td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'm-d H:i');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'm-d H:i');?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
<td class="c-actions">
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
+7 -4
View File
@@ -23,23 +23,26 @@
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->doc->libType?></th>
<td><?php echo html::select('type', $libTypeList, $type, "class='form-control'")?></td>
<td colspan='2'><?php echo html::radio('type', $libTypeList, "product")?></td>
</tr>
<tr class='product'>
<th><?php echo $lang->doc->product?></th>
<td><?php echo html::select('product', $products, $type == 'product' ? $objectID : '', "class='form-control chosen' data-drop_direction='down'")?></td>
<td></td>
</tr>
<tr class='project hidden'>
<th><?php echo $lang->doc->project?></th>
<td><?php echo html::select('project', $projects, $type == 'project' ? $objectID : '', "class='form-control chosen' data-drop_direction='down'")?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->doclib->name?></th>
<td><?php echo html::input('name', '', "class='form-control'")?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->doclib->control;?></th>
<td>
<td colspan='2'>
<?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'")?>
<span class='text-warning' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib']['product']['open'];?></span>
</td>
@@ -47,7 +50,7 @@
</tr>
<tr id='whiteListBox' class='hidden'>
<th><?php echo $lang->doc->whiteList;?></th>
<td>
<td colspan='2'>
<div class='input-group'>
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
<?php echo html::select('groups[]', $groups, '', "class='form-control chosen' multiple")?>
@@ -59,7 +62,7 @@
</td>
</tr>
<tr>
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton();?></td>
<td class='text-center form-actions' colspan='3'><?php echo html::submitButton();?></td>
</tr>
</table>
</form>
+1
View File
@@ -1771,6 +1771,7 @@ class storyModel extends model
$stories = $this->dao->select('t1.*, t2.name as productTitle')->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->where('t1.deleted')->eq(0)
->beginIF($type != 'closedBy')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type != 'all')
->beginIF($type == 'assignedTo')->andWhere('assignedTo')->eq($account)->fi()
->beginIF($type == 'openedBy')->andWhere('openedBy')->eq($account)->fi()
+1 -1
View File
@@ -1671,7 +1671,7 @@ class taskModel extends model
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftjoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
->where('t1.deleted')->eq(0)
->beginIF($type == 'assignedTo')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type != 'closedBy')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type == 'finishedBy')
->andWhere('t1.finishedby', 1)->eq($account)
->orWhere('t1.finishedList')->like("%,{$account},%")