This commit is contained in:
hufangzhou
2020-12-22 13:30:50 +08:00
13 changed files with 35 additions and 47 deletions
+9 -7
View File
@@ -71,15 +71,16 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class="c-date"> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class="c-type"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<th class="c-date"> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
<th class="c-type"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
<?php $style = $this->app->clientLang == 'en' ? "style='width:80px'" : '';?>
<th class="c-pri w-80px" <?php echo $style;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="c-name"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class="c-begin"> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
<th class="c-end"> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
<th class="c-status"><?php common::printOrderLink('status', $orderBy, $vars, $lang->todo->status);?></th>
<th class="c-actions-5"><?php echo $lang->actions;?></th>
<th class="c-name"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
<th class="c-assignedBy"><?php common::printOrderLink('assignedBy', $orderBy, $vars, $lang->todo->assignedBy);?></th>
<th class="c-begin"> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
<th class="c-end"> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
<th class="c-status"> <?php common::printOrderLink('status', $orderBy, $vars, $lang->todo->status);?></th>
<th class="c-actions-5"> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -98,6 +99,7 @@
<td class="c-type"><?php echo $lang->todo->typeList[$todo->type];?></td>
<td class="c-pri"><span title="<?php echo zget($lang->todo->priList, $todo->pri);?>" class='label-pri <?php echo 'label-pri-' . $todo->pri;?>' title='<?php echo zget($lang->todo->priList, $todo->pri, $todo->pri);?>'><?php echo zget($lang->todo->priList, $todo->pri)?></span></td>
<td class="c-name" title="<?php echo $todo->name;?>"><?php echo html::a($this->createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?></td>
<td class="c-assignedBy"><?php echo $todo->assignedBy;?></td>
<td class="c-begin"><?php echo $todo->begin;?></td>
<td class="c-end"><?php echo $todo->end;?></td>
<td class="c-status"><span class="status-todo status-<?php echo $todo->status;?>"><?php echo $lang->todo->statusList[$todo->status];?></span></td>
+10 -13
View File
@@ -768,33 +768,30 @@ class product extends control
*
* @param int $programID
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function all($programID = 0, $browseType = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function all($programID = 0, $browseType = 'noclosed', $orderBy = 'order_desc')
{
/* Load module and set session. */
$this->loadModel('program');
$this->lang->product->switcherMenu = $this->product->getSwitcher();
$this->session->set('productList', $this->app->getURI(true));
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Set language items. */
$this->lang->product->switcherMenu = $this->product->getSwitcher();
$program = $programID ? $this->program->getPGMByID($programID) : 0;
$programName = empty($program) ? '' : $program->name;
/* Init vars. */
$program = $programID ? $this->program->getPGMByID($programID) : 0;
$programName = empty($program) ? '' : $program->name;
$productStats = $this->product->getStats($orderBy, '', $browseType, '', 'story', $programID);
$this->view->title = $this->lang->product->common;
$this->view->position[] = $this->lang->product->common;
$this->view->productStats = $this->product->getStats($orderBy, $pager, $browseType, '', 'story', $programID);
$this->view->recTotal = count($productStats);
$this->view->productStats = $productStats;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->programTree = $this->program->getPGMTreeMenu($programID, 'product', '&browseType=' . $browseType);
$this->view->programID = $programID;
$this->view->program = $program;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
+1 -1
View File
@@ -151,9 +151,9 @@ $lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedB
$lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory;
$lang->product->featureBar['browse']['more'] = $lang->more;
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed;
$lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed'];
$lang->product->featureBar['all']['all'] = $lang->product->allProduct;
$lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe;
$lang->product->moreSelects['activestory'] = $lang->product->activeStory;
-2
View File
@@ -531,7 +531,6 @@ class productModel extends model
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_PRODUCT)->data($product)->autoCheck()
->batchCheck($this->config->product->create->requiredFields, 'notempty')
->checkIF(strlen($product->code) == 0, 'code', 'notempty') //the value of product code can be 0 or 00.00
->checkIF(!empty($product->name), 'name', 'unique')
->checkIF(!empty($product->name), 'code', 'unique')
->exec();
@@ -581,7 +580,6 @@ class productModel extends model
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_PRODUCT)->data($product)->autoCheck()
->batchCheck($this->config->product->edit->requiredFields, 'notempty')
->checkIF(strlen($product->code) == 0, 'code', 'notempty') //the value of product code can be 0 or 00.0
->check('name', 'unique', "id != $productID and deleted = '0'")
->check('code', 'unique', "id != $productID and deleted = '0'")
->where('id')->eq($productID)
+7 -5
View File
@@ -20,7 +20,8 @@
</div>
<div class="btn-toolbar pull-left">
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
<?php echo html::a(inlink("all", "programID=$programID&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link' id='{$key}Tab'");?>
<?php $recTotalLabel = $browseType == $key ? " <span class='label label-light label-badge'>{$recTotal}</span>" : '';?>
<?php echo html::a(inlink("all", "programID=$programID&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>" . $recTotalLabel, '', "class='btn btn-link' id='{$key}Tab'");?>
<?php endforeach;?>
</div>
<div class="btn-toolbar pull-right">
@@ -39,7 +40,7 @@
<?php $canOrder = common::hasPriv('product', 'updataOrder');?>
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
<table id="productList" class="table has-sort-head table-fixed">
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s";?>
<thead>
<tr>
<th class='c-id'>
@@ -51,7 +52,6 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
<th class='w-100px' title='<?php echo $lang->program->PGMCommon;?>'><?php echo $lang->program->PGMCommon;?></th>
<th class='w-100px' title='<?php echo $lang->product->activeStoriesTitle;?>'><?php echo $lang->product->activeStories;?></th>
<th class='w-100px' title='<?php echo $lang->product->changedStoriesTitle;?>'><?php echo $lang->product->changedStories;?></th>
<th class='w-100px' title='<?php echo $lang->product->draftStoriesTitle;?>'><?php echo $lang->product->draftStories;?></th>
@@ -63,6 +63,7 @@
<?php if($canOrder):?>
<th class='w-70px sort-default'><?php common::printOrderLink('order', $orderBy, $vars, $lang->product->updateOrder);?></th>
<?php endif;?>
<th class='c-actions w-60px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class="sortable" id="productTableList">
@@ -76,7 +77,6 @@
<?php endif;?>
</td>
<td class="c-name" title='<?php echo $product->name?>'><?php echo html::a($this->createLink('product', 'browse', 'product=' . $product->id), $product->name);?></td>
<td class='c-name' title='<?echo empty($programID) ? $product->programName : $programName;?>'><?php echo empty($programID) ? $product->programName : $programName;?></td>
<td class='text-center'><?php echo $product->stories['active'];?></td>
<td class='text-center'><?php echo $product->stories['changed'];?></td>
<td class='text-center'><?php echo $product->stories['draft'];?></td>
@@ -88,6 +88,9 @@
<?php if($canOrder):?>
<td class='c-actions sort-handler'><i class="icon icon-move"></i></td>
<?php endif;?>
<td class='c-actions'>
<?php common::printIcon('product', 'edit', "product=$product->id", $product, 'list', 'edit');?>
</td>
</tr>
<?php endforeach;?>
</tbody>
@@ -100,7 +103,6 @@
<?php echo html::submitButton($lang->edit, '', 'btn');?>
</div>
<?php endif;?>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
+3 -6
View File
@@ -29,10 +29,6 @@
<th><?php echo $lang->product->name;?></th>
<td><?php echo html::input('name', '', "class='form-control input-product-title' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
<td><?php echo html::input('code', '', "class='form-control input-product-code' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='form-control chosen'");?></td><td></td>
@@ -53,7 +49,8 @@
foreach($lang->product->typeList as $key => $type) $productTypeList[$key] = $type . zget($lang->product->typeTips, $key, '');
?>
<?php echo html::select('type', $productTypeList, 'normal', "class='form-control'");?>
</td><td></td>
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->product->storyConcept;?></th>
@@ -75,7 +72,7 @@
</tr>
<tr>
<th><?php echo $lang->product->acl;?></th>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, 'open', "onclick='setWhite(this.value);'", 'block'));?></td>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, 'private', "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="hidden" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
-4
View File
@@ -35,10 +35,6 @@
<th class='w-140px'><?php echo $lang->product->name;?></th>
<td class='w-p40-f'><?php echo html::input('name', $product->name, "class='form-control' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
<td><?php echo html::input('code', $product->code, "class='form-control' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $product->PO, "class='form-control chosen'");?></td><td></td>
-4
View File
@@ -159,10 +159,6 @@
<div class="detail-content">
<table class="table table-data data-basic">
<tbody>
<tr>
<th><?php echo $lang->product->line;?></th>
<td><em><?php echo zget($lines, $product->line);?></em></td>
</tr>
<tr>
<th><?php echo $lang->story->openedBy?></th>
<td><em><?php echo zget($users, $product->createdBy);?></em></td>