Changeset 561
- Timestamp:
- Sep 17, 2007 1:19:31 AM (6 years ago)
- Location:
- trunk/jpdd
- Files:
-
- 3 edited
-
class.dkg.row.php (modified) (2 diffs)
-
class.dkg.site.php (modified) (1 diff)
-
class.jpdd.person.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jpdd/class.dkg.row.php
r560 r561 97 97 $nonpeers = array_filter($nonpeers, $nonpeerlimitfunc); 98 98 } 99 if (count($peers) == 0 && 100 count($nonpeers) == 0) 101 return ''; 102 99 103 $ret = '<fieldset class="m2medit"><legend>'; 100 104 if (count($peers)) … … 112 116 <option value="">None</option> 113 117 '.join("\n", array_map(create_function('$h', "return '<option value=\"'.\$h->getID().'\">'.\$h->getTitle().'</option>';"), $nonpeers)).' 114 </select></label> 115 </fieldset> 116 ';118 </select></label>'; 119 120 $ret .= '</fieldset>'; 117 121 118 122 return $ret; -
trunk/jpdd/class.dkg.site.php
r560 r561 393 393 function getLogoutForm($followupURI = NULL) { 394 394 return '<form id="logout_form" class="logout" action="'.$this->Path("logout").'" method="post"> 395 '.($this->isAuthenticated() ? '<div class="salutation">Welcome,<br/>'.$this->_authenticated_user->get Title().$this->getAdditionalSalutation().'</div>':'').'395 '.($this->isAuthenticated() ? '<div class="salutation">Welcome,<br/>'.$this->_authenticated_user->getLinkedTitle().$this->getAdditionalSalutation().'</div>':'').' 396 396 <input class="submit" type="submit" value="Logout"/> 397 397 '.$this->getFormTokenHiddenInput().' -
trunk/jpdd/class.jpdd.person.php
r560 r561 28 28 function getSalutation() { 29 29 global $jpdd; 30 $wt = $this->getWorkshopText(); 31 if ('' == $wt) { 32 return 'You are not signed up for any workshop. Please <a href="'.$jpdd->Path('category').'">choose one</a>.'; 30 31 // if no workshops are set up at all, people should be able to 32 // apply to the workshop by indicating a preferred category: 33 $wc = $jpdd->getValueFromSQL('SELECT COUNT(*) AS foo FROM workshop WHERE event_id = '.$jpdd->getActiveEventID(), 'foo'); 34 if ($wc == 0) { 35 // FIXME: is this person already applied? if not, should they 36 // be able to make an application on their own? should we 37 // report the category their application is under? 38 39 // this person a liaison for this event? if so, direct them to their 40 $lc = $jpdd->getValueFromSQL('SELECT COUNT(*) AS foo FROM person_role JOIN role ON (role.id = role_id) WHERE person_id = '. 41 $this->getID().' AND event_id = '.$jpdd->getActiveEventID().' AND role.title = '.$jpdd->escStr('liaison'), 42 'foo'); 43 if ($lc > 0) { 44 // FIXME: present some sort of simplified reporting here? 45 // (like "all done")? provide direct links to liaison 46 // pages? 47 return 'Please check in on your organization'.($lc > 1 ? 's':'').' through the links below'; 48 } else { 49 return 'No workshops have been created yet. You will be notified when workshops have been created.'; 50 } 33 51 } else { 34 return 'You will be '.$wt; 52 $wt = $this->getWorkshopText(); 53 if ('' == $wt) { 54 return 'You are not signed up for any workshop. Please <a href="'.$jpdd->Path('category').'">choose one</a>.'; 55 } else { 56 return 'You will be '.$wt; 57 } 35 58 } 36 59 } … … 84 107 } 85 108 109 function canEditAffiliationsAndRoles() { 110 111 } 112 86 113 function getFormInnards() { 87 114 global $jpdd; 88 115 $emailerr = is_null($this->_email) ? NULL : $jpdd->isValid('e-mail',$this->_email); 89 116 $editroles = ''; 117 $editaffiliations = ''; 118 119 // we'll use editing roles as a decent proxy for being able to massage affiliations directly. 90 120 if ($jpdd->_authenticated_user->HasAnyOfThesePrivileges('Edit Roles')) { 91 121 … … 104 134 } 105 135 } 136 137 $editaffiliations = $this->getM2MEditView('organization', 'affiliation', 'Affiliated With', 'Add Affiliation'); 106 138 } 107 139 return '<div> … … 111 143 <label>Last name:<br/><input type="text" name="last_name" value="'.htmlentities($this->_last_name).'"/></label><br/> 112 144 <label>E-mail Address:<br/>'.(is_null($emailerr)?'':'<span class="error">'.$emailerr.'</span><br/>').'<input type="text" name="email" '.(is_null($emailerr)?'':'class="error" ').'value="'.htmlentities($this->_email).'"/></label><br/> 113 '.$ this->getM2MEditView('organization', 'affiliation', 'Affiliated With', 'Add Affiliation').'114 '.$this->getM2MEditView('workshop', 'audience', 'Attending', 'Sign up for', NULL, create_function('$x', ' return!$x->isFull();')).'145 '.$editaffiliations.' 146 '.$this->getM2MEditView('workshop', 'audience', 'Attending', 'Sign up for', NULL, create_function('$x', 'global $jpdd; $x->_event_id == $jpdd->getActiveEventID() && !$x->isFull();')).' 115 147 '.$editroles.' 116 148 </div>';
Note: See TracChangeset
for help on using the changeset viewer.

