Changeset 1393


Ignore:
Timestamp:
Sep 14, 2013, 1:21:40 AM (4 years ago)
Author:
dkg
Message:

sort roles by current event and past event

Location:
trunk/jpdd
Files:
2 edited

Legend:

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

    r935 r1393  
    8484        $dkg_site->executeSQL('DELETE FROM '.$jointable.' WHERE '.$this->getSingletonTable().'_id = '.$this->getID().' AND '.$peername.'_id IN ('.join(',', $ids).')');
    8585        }
    86     function getM2MPeerList($peername, $jointable, $title) {
    87       $peers = $this->getM2MPeers($peername, $jointable);
     86    function getM2MPeerList($peername, $jointable, $title, $whereextra = '') {
     87      $peers = $this->getM2MPeers($peername, $jointable, $whereextra);
    8888      if (count($peers))
    8989        return '<div>'.$title.':<ul>'."\n".join("\n", array_map(create_function('$o', 'return "<li>".$o->getLinkedTitle();'), $peers)).'</ul></div>';
  • trunk/jpdd/class.jpdd.person.php

    r1389 r1393  
    306306          // show privileges and email:
    307307          $ret .= 'e-mail: '.$this->getLinkedEmail().$this->getM2MPeerList('privilege', 'person_privilege', 'Privileges');
    308           $ret .= $this->getM2MPeerList('role', 'person_role', 'Roles');
     308          $ret .= $this->getM2MPeerList('role', 'person_role', 'Current Roles', 'AND event_id = '.$jpdd->getActiveEventID());
     309          $ret .= $this->getM2MPeerList('role', 'person_role', 'Past Roles', 'AND event_id != '.$jpdd->getActiveEventID());
    309310        }
    310311      }
Note: See TracChangeset for help on using the changeset viewer.