Update of /cvsroot/phpwebsite-comm/modules/rolodex/class
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23030/class
Modified Files:
RDX_Forms.php Rolodex.php
Log Message:
more category suppport
Index: RDX_Forms.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RDX_Forms.php 31 Mar 2008 20:14:55 -0000 1.6
--- RDX_Forms.php 2 Apr 2008 20:08:52 -0000 1.7
***************
*** 207,210 ****
--- 207,212 ----
/* get the final content */
$this->rolodex->content = $pager->get();
+
+ // $this->rolodex->content .= Categories::getCategoryList('rolodex');
/* set the list/page title */
***************
*** 741,744 ****
--- 743,756 ----
+ function categories()
+ {
+
+ $tpl['CATLIST'] = Categories::getCategoryList('rolodex');
+
+ $this->rolodex->title = sprintf(dgettext('rolodex', '%s Categories'), PHPWS_Settings::get('rolodex', 'module_title'));
+ $this->rolodex->content = PHPWS_Template::process($tpl, 'rolodex', 'categories.tpl');
+ }
+
+
}
?>
\ No newline at end of file
Index: Rolodex.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Rolodex.php 31 Mar 2008 19:42:45 -0000 1.4
--- Rolodex.php 2 Apr 2008 20:08:52 -0000 1.5
***************
*** 273,276 ****
--- 273,288 ----
break;
+ case 'categories':
+ if (!PHPWS_Settings::get('rolodex', 'allow_anon') && !Current_User::getId()) {
+ $this->title = PHPWS_Settings::get('rolodex', 'module_title');
+ $this->content = dgettext('rolodex', 'Sorry, anonymous member viewing is not allowed. You will need to login to view this directory.');
+ } else {
+ PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php');
+ $this->forms = new Rolodex_Forms;
+ $this->forms->rolodex = & $this;
+ $this->forms->categories();
+ }
+ break;
+
case 'export':
PHPWS_Core::initModClass('rolodex', 'RDX_Member.php');
***************
*** 1055,1058 ****
--- 1067,1071 ----
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Other'), "rolodex", $vars) . "\n";
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'All'), "rolodex", array('uop'=>'list')) . "\n";
+ $alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Categories'), "rolodex", array('uop'=>'categories')) . "\n";
} elseif (@$_REQUEST['aop'] == "list_expired") {
$vars['aop'] = 'list_expired';
***************
*** 1060,1063 ****
--- 1073,1077 ----
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Other'), "rolodex", $vars) . "\n";
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'All'), "rolodex", array('aop'=>'list_expired')) . "\n";
+ $alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Categories'), "rolodex", array('uop'=>'categories')) . "\n";
} else {
$vars['uop'] = 'list';
***************
*** 1065,1068 ****
--- 1079,1083 ----
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Other'), "rolodex", $vars) . "\n";
$alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'All'), "rolodex", array('uop'=>'list')) . "\n";
+ $alpha[] .= PHPWS_Text::moduleLink(dgettext('rolodex', 'Categories'), "rolodex", array('uop'=>'categories')) . "\n";
}
|