Changeset 183


Ignore:
Timestamp:
Jan 30, 2007 10:31:21 PM (6 years ago)
Author:
dkg
Message:

JPDD: presenting the printouts better in the user interface.

File:
1 edited

Legend:

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

    r182 r183  
    9292        if ($this->_authenticated_user->hasAnyOfThesePrivileges('List Rooms')) 
    9393          $links['Rooms'] = 'room'; 
    94         if ($this->_authenticated_user->hasAllOfThesePrivileges('Update Workshops', 'Edit People', 'Edit Categories')) 
     94        if ($this->_authenticated_user->hasAllOfThesePrivileges('Update Workshops', 'Edit People', 'Edit Categories')) { 
    9595          $links['Review Signups'] = 'overview'; 
     96          $links['Get Printouts'] = 'printout'; 
     97        } 
    9698        if ($this->_authenticated_user->hasAllOfThesePrivileges('Send Broadcast')) 
    9799          $links['E-mail Alert'] = 'broadcast'; 
     
    371373          $pdfs = $this->getPDFFunctions(); 
    372374          if (in_array($this->_type, array_keys($pdfs))) { 
    373             if ($this->isAuthenticated() && $this->_authenticated_user->hasAllOfThesePrivileges('Edit People', 'Update Workshops')) { 
     375            if ($this->isAuthenticated() && $this->_authenticated_user->hasAllOfThesePrivileges('Edit People', 'Update Workshops', 'Edit Categories')) { 
    374376              $f = $pdfs[$this->_type]['function']; 
    375377              require_once('class.jpdd.pdf.php'); 
     
    378380            } else 
    379381              $this->permissionDenied('This printout is not for you.'); 
     382          } elseif ($this->isEmpty($this->_type)) { 
     383            return $this->getPDFLinkList(); 
    380384          } 
    381385        } 
     
    404408                   'table.pdf' => array('description' => 'pages for the entrance table', 
    405409                                        'function' => 'addTablePDFs')); 
     410    } 
     411 
     412    function getPDFLinkList() { 
     413      $z = $this->getPDFFunctions(); 
     414      return '<ul>'.join('', array_map(create_function('$t, $x', 'global $jpdd; return "<li><a href=\"".$jpdd->Path("printout", $t)."\">".$x["description"]."</a>\n";') , array_keys($z), $z)).'</ul>'; 
    406415    } 
    407416 
Note: See TracChangeset for help on using the changeset viewer.