batchedit.max.html.hook.php 567 B

12345678910111213141516171819202122
  1. <?php
  2. namespace zin;
  3. if(helper::hasFeature('deliverable'))
  4. {
  5. global $lang, $app;
  6. $app->control->loadModel('project');
  7. $executions = data('executions');
  8. foreach($executions as $execution)
  9. {
  10. if($execution->status == 'closed' && !empty($execution->deliverable) && $app->control->project->checkUploadedDeliverable($execution->id)) $execution->hasDeliverable = true;
  11. }
  12. query('formBatchPanel')->each(function($node) use ($executions)
  13. {
  14. $data = array_values($executions);
  15. $node->setProp('data', $data);
  16. });
  17. }