* [task#133867,doing,1.5h] Preview project story.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace zin;
|
||||
|
||||
$fnGenerateFormRows = function () use ($lang)
|
||||
{
|
||||
$projects = $this->loadModel('project')->getPairsByProgram();
|
||||
|
||||
$this->app->loadLang('projectstory');
|
||||
$searchConditions = array();
|
||||
foreach($lang->projectstory->featureBar['story'] as $key => $label)
|
||||
{
|
||||
if($key == 'more')
|
||||
{
|
||||
foreach($lang->projectstory->moreSelects['story']['more'] as $moreKey => $moreLabel) $searchConditions[$moreKey] = $moreLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
$searchConditions[$key] = $label;
|
||||
}
|
||||
}
|
||||
|
||||
return array
|
||||
(
|
||||
formRow
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
set::width('1/2'),
|
||||
set::name('project'),
|
||||
set::label($lang->doc->project),
|
||||
set::items($projects)
|
||||
)
|
||||
),
|
||||
formRow
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
set::width('1/2'),
|
||||
set::name('search'),
|
||||
set::label($lang->doc->searchCondition),
|
||||
set::items($searchConditions)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
@@ -1101,4 +1101,32 @@ class docZen extends doc
|
||||
$this->view->cols = $cols;
|
||||
$this->view->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览项目研发需求列表。
|
||||
* Preview project story.
|
||||
*
|
||||
* @param string $view
|
||||
* @param string $idList
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function previewProjectStory(string $view, string $idList): void
|
||||
{
|
||||
$cols = $this->loadModel('datatable')->getSetting('product', 'browse');
|
||||
unset($cols['actions']);
|
||||
|
||||
$data = array();
|
||||
if(!empty($_POST) && $view === 'setting')
|
||||
{
|
||||
$data = $this->loadModel('story')->getExecutionStories((int)$this->post->project, 0, '', $this->post->search);
|
||||
}
|
||||
elseif($view === 'list')
|
||||
{
|
||||
$data = $this->loadModel('story')->getByList($idList);
|
||||
}
|
||||
|
||||
$this->view->cols = array_values($cols);
|
||||
$this->view->data = array_values($data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user