Changeset 1439


Ignore:
Timestamp:
Jan 13, 2014, 10:09:39 PM (4 years ago)
Author:
dkg
Message:

list propser and associated workshops in proposal list

File:
1 edited

Legend:

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

    r1438 r1439  
    240240    }
    241241
     242    function showList($items) {
     243      $ret = "<dl>\n";
     244      reset($items);
     245      while (list(,$item) = each($items)) {
     246        if ($item->showInList()) {
     247          $workshops = $item->getAssociatedWorkshops();
     248          $ws = '';
     249          if (count($workshops)) {
     250            $ws .= "<div>Workshop".(count($workshops) > 1 ? 's' : '')." based on this proposal:<ul>";
     251            while(list(,$workshop) = each($workshops)) {
     252              $ws .= '<li>'.$workshop->getLinkedTitle().'</li>';
     253            }
     254            $ws .= '</ul></div>';
     255          }
     256          $ret .= '<dt>'.$item->getLinkedTitle().'</dt>'."\n".
     257            '<dd><div>Proposed by: '.$item->getProposer()->getNameWithOrgs().'</div>'.$ws.
     258            $item->getDescription().'</dd>'."\n";
     259        }
     260      }
     261      $ret .= "</dl>\n";
     262      return $ret;
     263    }
    242264  }
    243265}
Note: See TracChangeset for help on using the changeset viewer.