Changeset 184
- Timestamp:
- Jan 30, 2007 11:22:21 PM (6 years ago)
- Location:
- trunk/jpdd
- Files:
-
- 2 edited
-
class.jpdd.category.php (modified) (1 diff)
-
class.jpdd.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jpdd/class.jpdd.category.php
r117 r184 17 17 } 18 18 19 function showList($items ) {19 function showList($items, $onlyopen = false) { 20 20 $ret = ''; 21 21 reset($items); 22 22 while (list(,$item) = each($items)) { 23 23 $wshops = $item->getM2MPeers('workshop', 'workshop_category', 'Workshops'); 24 if ($onlyopen) 25 $wshops = array_filter($wshops, create_function('$x', 'return !$x->isFull();')); 24 26 if (count($wshops)) { 25 27 $ret .= '<div class="array"><div class="array-title">'.$item->getLinkedTitle('title')."</div>\n<ul>\n"; -
trunk/jpdd/class.jpdd.php
r183 r184 146 146 147 147 function getAllowedActions() { 148 return array_merge(parent::getAllowedActions(), array('signup', 'printout', 'overview' ));148 return array_merge(parent::getAllowedActions(), array('signup', 'printout', 'overview', 'open')); 149 149 } 150 150 … … 196 196 197 197 198 // fudged from JPDD_Category::getList() 199 function getOpenWorkshops() { 200 $cats = $this->getAll('category'); 201 $ret = ''; 202 reset($cats); 203 while (list(,$cat) = each($cats)) { 204 $wshops = $cat->getM2MPeers('workshop', 'workshop_category', 'Workshops'); 205 $wshops = array_filter($wshops, create_function('$x', 'return !$x->isFull();')); 206 if (count($wshops)) { 207 $ret .= '<div class="array"><div class="array-title">'.$cat->getLinkedTitle('title')."</div>\n"; 208 $ret .= join('', array_map(create_function('$w', 'return "<h2>".$w->getLinkedTitle()."</h2>\n".$w->getPresentersWithOrgs()."<div class=\"workshop-blurb\">".$w->getDescription()."</div>\n</li>\n";'), $wshops)); 209 $ret .= "</div>\n"; 210 } 211 } 212 return $ret; 213 } 214 198 215 function getUnaffiliatedAccounts() { 199 216 $sql = 'SELECT person.* FROM person LEFT JOIN affiliation ON (person.id = affiliation.person_id) WHERE organization_id IS NULL AND person.pass IS NOT NULL ORDER BY last_name, first_name'; … … 337 354 if ($this->_action == 'signup') { 338 355 return $this->handleSignup(); 356 } elseif ($this->_action == 'open') { 357 return $this->getOpenWorkshops(); 339 358 } elseif ($this->_action == 'printout') { 340 359 $pdf = NULL; … … 381 400 $this->permissionDenied('This printout is not for you.'); 382 401 } elseif ($this->isEmpty($this->_type)) { 383 return $this->getPDFLinkList(); 402 if ($this->isAuthenticated() && $this->_authenticated_user->hasAllOfThesePrivileges('Edit People', 'Update Workshops', 'Edit Categories')) 403 return $this->getPDFLinkList(); 404 else 405 $this->permissionDenied('This printout is not for you.'); 384 406 } 385 407 } … … 404 426 'door.pdf' => array('description' => 'printouts for the doors', 405 427 'function' => 'addDoorPDFs'), 406 'signup.pdf' => array('description' => ' signupsheets for the workshops',428 'signup.pdf' => array('description' => 'attendance sheets for the workshops', 407 429 'function' => 'addSignupPDFs'), 408 430 'table.pdf' => array('description' => 'pages for the entrance table',
Note: See TracChangeset
for help on using the changeset viewer.

