Changeset 1413


Ignore:
Timestamp:
Jan 4, 2014, 2:35:27 AM (4 years ago)
Author:
dkg
Message:

include link to proposal from workshop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.workshop.php

    r1410 r1413  
    286286      }
    287287
    288       if ($editor)
     288      if ($editor) {
    289289        $ret .= '<div class="stats">Min. Attendees: '.(int)($this->_min_attendees).'<br/>'.
    290290          'Max. Attendees: '.(int)($this->_max_attendees).'<br/>'.
    291           'Current Attendees: '.count($this->getM2MPeers('person','audience')).
    292           '</div>';
     291          'Current Attendees: '.count($this->getM2MPeers('person','audience'));
     292        $proposal = $this->getProposal();
     293        if (!is_null($proposal))
     294          $ret .= 'From proposal: '.$cat->getLinkedTitle().'<br/>';
     295        $ret .= '</div>';
     296      }
    293297      $cats = $this->getM2MPeers('category', 'workshop_category');
    294298      if (count($cats) > 0) {
     
    348352      $pdf->SetY($pdf->GetY() + 20);
    349353    }
     354    function getProposal() {
     355      if (is_null($this->_proposal_id))
     356        return null;
     357      global $jpdd;
     358      $jpdd->prepClass('proposal');
     359      $sql = 'SELECT * from proposal WHERE proposal_id = '.(int)$this->_proposal_id;
     360      return $jpdd->getSeriesFromSQL($sql, 'JPDD_Proposal');
     361    }
    350362
    351363    function getPDF($pdfname) {
Note: See TracChangeset for help on using the changeset viewer.