view.zentaomax.html.hook.php 969 B

1234567891011121314151617181920212223242526
  1. <?php
  2. $inIframe = isonlybody() ? '' : 'iframe';
  3. $html = '';
  4. if($story->source == 'meeting' and !empty($story->sourceNote))
  5. {
  6. $meeting = $this->loadModel('meeting')->getByID($story->sourceNote);
  7. $html = "<th>{$lang->story->meeting}</th>";
  8. $html .= '<td>';
  9. $html .= html::a($this->createLink('meeting', 'view', "meetingID=$meeting->id", '', true), $meeting->name, '', "class='$inIframe'");
  10. $html .= '</td>';
  11. }
  12. elseif($story->source == 'researchreport' and !empty($story->sourceNote))
  13. {
  14. $report = $this->loadModel('researchreport')->getByID($story->sourceNote);
  15. $html = "<th>{$lang->story->researchreport}</th>";
  16. $html .= '<td>';
  17. $html .= html::a($this->createLink('researchreport', 'view', "reportID=$report->id", '', true), $report->title, '', "class='$inIframe'");
  18. $html .= '</td>';
  19. }
  20. ?>
  21. <?php if(!empty($html)):?>
  22. <script>
  23. $('#sourceNoteBox').html(<?php echo json_encode($html);?>);
  24. </script>
  25. <?php endif;?>