|
From: Verdon V. <ve...@us...> - 2008-06-10 17:15:39
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25102/class Modified Files: RDX_Forms.php RDX_Member.php RDX_Mypage.php Rolodex.php Log Message: tweaks and fixes to prepare for release Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RDX_Forms.php 2 Apr 2008 20:08:52 -0000 1.7 --- RDX_Forms.php 10 Jun 2008 17:15:12 -0000 1.8 *************** *** 165,168 **** --- 165,173 ---- $pager->db->addWhere('rolodex_member.privacy', 1, '<='); } + + /* unset the browseLetter if a search is being done */ + if (isset($_REQUEST['search'])) { + unset($_REQUEST['browseLetter']); + } /* if the alpha click list is being used */ *************** *** 500,504 **** $form->addText('contact_email', $member->contact_email); $form->setSize('contact_email', 40); ! $form->setLabel('contact_email', dgettext('rolodex', 'Contact e-mail')); $form->addText('website', $member->website); --- 505,509 ---- $form->addText('contact_email', $member->contact_email); $form->setSize('contact_email', 40); ! $form->setLabel('contact_email', sprintf(dgettext('rolodex', 'Contact e-mail (or leave empty to use %s)'), $member->getDisplay_email())); $form->addText('website', $member->website); *************** *** 746,749 **** --- 751,755 ---- { + $tpl['ALPHA_CLICK'] = $this->rolodex->alpha_click(); $tpl['CATLIST'] = Categories::getCategoryList('rolodex'); Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Rolodex.php 2 Apr 2008 20:08:52 -0000 1.5 --- Rolodex.php 10 Jun 2008 17:15:12 -0000 1.6 *************** *** 100,104 **** } } else { ! $this->loadForm('edit'); } break; --- 100,104 ---- } } else { ! $this->loadForm('edit_member'); } break; *************** *** 353,357 **** } } else { ! $this->loadForm('edit'); } break; --- 353,357 ---- } } else { ! $this->loadForm('edit_member'); } break; *************** *** 865,868 **** --- 865,869 ---- if (isset($errors)) { $this->message = implode('<br />', $errors); + $this->loadForm('edit_member'); return false; } else { Index: RDX_Mypage.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Mypage.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RDX_Mypage.php 31 Mar 2008 19:42:45 -0000 1.3 --- RDX_Mypage.php 10 Jun 2008 17:15:12 -0000 1.4 *************** *** 53,58 **** --- 53,65 ---- $vars2['uop'] = 'list'; $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Browse members'), 'rolodex', $vars2); + $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Categories'), "rolodex", array('uop'=>'categories')); $tpl['CONTENT'] = implode(' | ', $links); $tpl['CONTENT'] .= Rolodex_Mypage::searchForm(); + if ($result > 0) { + PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); + if (Rolodex_Member::isDataVisible('privacy_export')) { + $tpl['CONTENT'] .= '<br />' . PHPWS_Text::moduleLink(dgettext('rolodex', 'Export records to csv'), 'rolodex', array('uop'=>'export')); + } + } } Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RDX_Member.php 31 Mar 2008 19:42:45 -0000 1.4 --- RDX_Member.php 10 Jun 2008 17:15:12 -0000 1.5 *************** *** 452,455 **** --- 452,475 ---- + function getDisplay_email($print=false, $icon=false) + { + if (empty($this->contact_email)) { + $user = new PHPWS_User($this->user_id); + $email = $user->email; + } else { + $email = $this->contact_email; + } + if ($print) { + if ($icon) { + return sprintf('<a class="email" href="mailto:%s"><img src="images/mod/rolodex/email.png" alt="%s" title="%s" /></a>', $email, dgettext('rolodex', 'Email'), dgettext('rolodex', 'Email')); + } else { + return '<a href="mailto:' . $email . '" />' . $this->getDisplay_name() . '</a>'; + } + } else { + return $email; + } + } + + function setWebsite($website) { *************** *** 1017,1020 **** --- 1037,1041 ---- $vars2['uop'] = 'list'; $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Browse members'), 'rolodex', $vars2); + $links[] = PHPWS_Text::moduleLink(dgettext('rolodex', 'Categories'), "rolodex", array('uop'=>'categories')); if($links) *************** *** 1082,1086 **** if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL'] = $this->getContact_email(true); $tpl['CONTACT_EMAIL_LABEL'] = dgettext('rolodex', 'E-mail'); } --- 1103,1107 ---- if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL'] = $this->getDisplay_email(true); $tpl['CONTACT_EMAIL_LABEL'] = dgettext('rolodex', 'E-mail'); } *************** *** 1232,1236 **** $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL_LINK'] = $this->getContact_email(true, true); } if ($this->isDataVisible('privacy_web')) { --- 1253,1257 ---- $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { ! $tpl['CONTACT_EMAIL_LINK'] = $this->getDisplay_email(true, true); } if ($this->isDataVisible('privacy_web')) { *************** *** 1595,1599 **** } */ ! $content .= '"' . $this->getContact_email() . '",'; $content .= '"' . $this->getWebsite() . '",'; $content .= '"' . $this->getDay_phone() . '",'; --- 1616,1620 ---- } */ ! $content .= '"' . $this->getDisplay_email() . '",'; $content .= '"' . $this->getWebsite() . '",'; $content .= '"' . $this->getDay_phone() . '",'; |