Merge branch 'sprint/max42_mayue_task#64939' into 'master'

Sprint/max42 mayue task#64939

See merge request easycorp/zentaopms!5010
This commit is contained in:
王怡栋
2022-08-18 05:54:12 +00:00
4 changed files with 28 additions and 10 deletions
+1 -1
View File
@@ -514,7 +514,7 @@ if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = arr
if($config->systemMode == 'new')
{
$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting');
$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design');
}
$lang->admin->menu->allModel['subMenu'] = new stdclass();
+10 -1
View File
@@ -403,7 +403,16 @@ class designModel extends model
*/
public function setMenu($projectID, $products, $productID = 0)
{
if($this->app->rawMethod != 'browse') unset($this->lang->waterfall->menu->design['subMenu']->bysearch);
/* Show custom design types. */
$this->lang->waterfall->menu->design['subMenu'] = new stdclass();
$this->lang->waterfall->menu->design['subMenu']->all = array('link' => "{$this->lang->all}|design|browse|projectID=%s&productID=0&browseType=all");
foreach(array_filter($this->lang->design->typeList) as $key => $value)
{
$this->lang->waterfall->menu->design['subMenu']->$key = array('link' => "{$value}|design|browse|projectID=%s&productID=0&browseType={$key}");
}
if($this->app->rawMethod == 'browse') $this->lang->waterfall->menu->design['subMenu']->bysearch = array('link' => '<a href="javascript:;" class="querybox-toggle"><i class="icon-search icon"></i> ' . $this->lang->searchAB . '</a>');
if(empty($products) || !$productID) return '';
$currentProduct = $this->loadModel('product')->getById($productID);
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
+9 -6
View File
@@ -133,30 +133,33 @@ class stage extends control
}
/**
* Set type.
* Custom settings stage type.
*
* @param string lang2Set
* @access public
* @return void
*/
public function setType()
public function setType($lang2Set = '')
{
$this->loadModel('custom');
$lang = $this->app->getClientLang();
if($_POST)
{
$data = fixer::input('post')->get();
$this->custom->deleteItems("lang=all&module=stage&section=typeList");
$this->custom->deleteItems("lang={$data->lang}&module=stage&section=typeList");
foreach($data->keys as $index => $key)
{
$value = $data->values[$index];
if(!$value or !$key) continue;
$this->custom->setItem("all.stage.typeList.{$key}", $value);
}
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('stage', 'settype')));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('stage', 'settype', "lang2Set=$data->lang")));
}
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->setType;
$this->view->position[] = $this->lang->stage->common;
$this->view->position[] = $this->lang->stage->setType;
$this->view->currentLang = $lang;
$this->view->lang2Set = !empty($lang2Set) ? $lang2Set : $lang;
$this->display();
}
+8 -2
View File
@@ -64,8 +64,14 @@ EOT;
</tr>
<?php endforeach;?>
<tr>
<td></td>
<td colspan='2' class='form-actions'><?php echo html::submitButton() . html::backButton();?></td>
<td colspan='3' class='text-center form-actions'>
<?php
$appliedTo = array($currentLang => $lang->custom->currentLang, 'all' => $lang->custom->allLang);
echo html::radio('lang', $appliedTo, $lang2Set);
echo html::submitButton();
if(common::hasPriv('custom', 'restore')) echo html::linkButton($lang->custom->restore, $this->createLink('custom', 'restore', "module=stage&field=typeList"), 'hiddenwin', '', 'btn btn-wide');
?>
</td>
</tr>
</tbody>
</table>