* Finish task #64939.
This commit is contained in:
@@ -513,7 +513,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();
|
||||
|
||||
+13
-1
@@ -403,7 +403,19 @@ 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']->other = array('link' => "更多|design|other|", 'class' => 'dropdown dropdown-hover');
|
||||
$this->lang->waterfall->menu->design['subMenu']->other['dropMenu'] = new stdclass();
|
||||
$this->lang->waterfall->menu->design['subMenu']->all = array('link' => "{$this->lang->all}|design|browse|projectID=%s&productID=0&browseType=all");
|
||||
$count = 1;
|
||||
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);
|
||||
|
||||
@@ -141,10 +141,13 @@ class stage extends control
|
||||
public function setType()
|
||||
{
|
||||
$this->loadModel('custom');
|
||||
$lang = $this->app->getClientLang();
|
||||
if($_POST)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->custom->deleteItems("lang=all&module=stage§ion=typeList");
|
||||
if($data->lang != 'all') $this->custom->deleteItems("lang=all&module=stage§ion=typeList");
|
||||
$this->custom->deleteItems("lang={$data->lang}&module=stage§ion=typeList");
|
||||
|
||||
foreach($data->keys as $index => $key)
|
||||
{
|
||||
$value = $data->values[$index];
|
||||
@@ -154,9 +157,13 @@ class stage extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('stage', 'settype')));
|
||||
}
|
||||
|
||||
/* Check whether the current language has been customized. */
|
||||
$customLang = $this->custom->getItems("lang=all&module=stage§ion=typeList&vision={$this->config->vision}");
|
||||
if($customLang) $lang2Set = 'all';
|
||||
|
||||
$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 = isset($lang2Set) ? $lang2Set : $lang;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user