zentaolist.projectstory.html.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace zin;
  3. $fnGenerateFormRows = function () use ($lang, $settings, $fnGenerateCustomSearch)
  4. {
  5. $projects = $this->loadModel('project')->getPairsByProgram();
  6. $project = isset($settings['project']) ? $settings['project'] : 0;
  7. $this->loadModel('projectstory');
  8. $searchConditions = array();
  9. foreach($lang->projectstory->featureBar['story'] as $key => $label)
  10. {
  11. if($key == 'more')
  12. {
  13. foreach($lang->projectstory->moreSelects['story']['more'] as $moreKey => $moreLabel) $searchConditions[$moreKey] = $moreLabel;
  14. }
  15. else
  16. {
  17. $searchConditions[$key] = $label;
  18. }
  19. }
  20. $searchConditions['customSearch'] = $lang->doc->customSearch;
  21. $searchConfig = $this->projectstory->buildSearchConfig((int)$project);
  22. return array
  23. (
  24. formRow
  25. (
  26. formGroup
  27. (
  28. set::width('1/2'),
  29. set::name('project'),
  30. set::label($lang->doc->project),
  31. set::items($projects),
  32. set::value($project)
  33. )
  34. ),
  35. formRow
  36. (
  37. formGroup
  38. (
  39. set::width('1/2'),
  40. set::name('condition'),
  41. set::label($lang->doc->searchCondition),
  42. set::items($searchConditions),
  43. set::value(isset($settings['condition']) ? $settings['condition'] : null)
  44. )
  45. ),
  46. $fnGenerateCustomSearch($searchConfig)
  47. );
  48. };