|
From: <gbr...@us...> - 2003-09-05 14:09:29
|
Update of /cvsroot/phpwebsite-comm/modules/staffman/class
In directory sc8-pr-cvs1:/tmp/cvs-serv6243/class
Modified Files:
staffmanager.php
Log Message:
Added capability to view all members at once by button or URL
Index: staffmanager.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/staffman/class/staffmanager.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** staffmanager.php 31 Jul 2003 00:45:45 -0000 1.3
--- staffmanager.php 5 Sep 2003 14:08:21 -0000 1.4
***************
*** 8,15 ****
* Its function is to display a sortable list of items, and to provide an interface
* to the editing, viewing and deleting of individual items as specified in an
! * extenison of the PHPWS_Item class defined in core/Item.php. It does so by
* over-riding the standard functions _list(), _edit(), _view(), and _delete() defined in
* Manager.php, and adding an action() function to handle additional procedures, in
! * this case the addition of a new staffmember to the list, and the creation of a menu
* item to display the list.
*
--- 8,16 ----
* Its function is to display a sortable list of items, and to provide an interface
* to the editing, viewing and deleting of individual items as specified in an
! * extension of the PHPWS_Item class defined in core/Item.php. It does so by
* over-riding the standard functions _list(), _edit(), _view(), and _delete() defined in
* Manager.php, and adding an action() function to handle additional procedures, in
! * this case the addition of a new staffmember to the list, the viewing of on or all items,
! * and the creation by administrators of a menu item leading to the listing.
* item to display the list.
*
***************
*** 59,64 ****
$tags["CREATE_MENU_LINK_LABEL"] = $_SESSION["translate"]->it("Create Menu Link");
$tags["CREATE_MENU_LINK_HELP"] = $_SESSION["OBJ_help"]->show_link("staffman", "smAddMenuLink");
! /* and process the template templates/menu.tpl to produce the menu */
! $content = $GLOBALS["core"]->processTemplate($tags, "staffman", "menu.tpl");
/* add admin form of list */
$content .= $this->getList("admin", $_SESSION['translate']->it("Listing Staffmembers"));
--- 60,67 ----
$tags["CREATE_MENU_LINK_LABEL"] = $_SESSION["translate"]->it("Create Menu Link");
$tags["CREATE_MENU_LINK_HELP"] = $_SESSION["OBJ_help"]->show_link("staffman", "smAddMenuLink");
! $tags["VIEW_ALL_LABEL"] = $_SESSION['translate']->it("View All");
! $tags["VIEW_ALL_HELP"] = $_SESSION['OBJ_help']->show_link("staffman", "smViewAll");
! /* and process the template to produce the menu */
! $content = $GLOBALS["core"]->processTemplate($tags, "staffman", "amenu.tpl");
/* add admin form of list */
$content .= $this->getList("admin", $_SESSION['translate']->it("Listing Staffmembers"));
***************
*** 66,70 ****
} else { /* otherwise, display user format list */
! $content = $this->getList("user", $_SESSION['translate']->it("Listing Staffmembers"));
}
--- 69,76 ----
} else { /* otherwise, display user format list */
! $tags["VIEW_ALL_LABEL"] = $_SESSION['translate']->it("View All");
! $tags["VIEW_ALL_HELP"] = $_SESSION['OBJ_help']->show_link("staffman", "smViewAll");
! $content = $GLOBALS["core"]->processTemplate($tags, "staffman", "umenu.tpl");
! $content .= $this->getList("user", $_SESSION['translate']->it("Listing Staffmembers"));
}
***************
*** 125,129 ****
* Provides standard view function: displays a list item
* If called _view, is called directly by managerAction() via index.php
! * Note that managerAction only calls this function if there is an item to view
*
* @author George Brackett <gbr...@NO...>
--- 131,136 ----
* Provides standard view function: displays a list item
* If called _view, is called directly by managerAction() via index.php
! * Note that managerAction only calls this function if there is an item or
! * an entire list to view
*
* @author George Brackett <gbr...@NO...>
***************
*** 167,170 ****
--- 174,182 ----
$GLOBALS["CNT_staffman"]["content"] = $content;
$GLOBALS["CNT_staffman"]["title"] = $_SESSION['translate']->it("Staff Listing");
+ break;
+
+ case "aView": /* view all items in the list */
+ $_REQUEST["PHPWS_MAN_ITEMS"] = $this->_getIds(); //get array of all item ids
+ $this->_view(); // and display the corresponding items
break;
|