[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare SiteMgr - Web Content Management * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: class.Notifications_UI.inc.php 20295 2006-02-15 12:31:25Z $ */ 13 14 include_once (EGW_INCLUDE_ROOT . '/sitemgr/inc/class.generic_list_ui.inc.php'); 15 $GLOBALS['egw_info']['flags']['included_classes']['generic_list_ui'] = True; 16 17 class Notifications_UI extends generic_list_ui 18 { 19 20 var $site_bo; 21 var $site; 22 23 function Notifications_UI() 24 { 25 $common_ui =& CreateObject('sitemgr.Common_UI',True); 26 $this->bo=CreateObject("sitemgr.Notifications_BO"); 27 $this->site=False; 28 29 $this->generic_list_ui('sitemgr', 'Notifications_UI', 'sitemgr.notifications', 30 'sitemgr.notifications.edit', 'sitemgr.notifications.delete'); 31 } 32 33 function get_sel_fields($content,$template) 34 { 35 36 if ($template==$this->edit_template) { 37 //is site_id defined? 38 if ($this->limited) { 39 $res=array('all'=>lang('All languages'))+$this->bo->get_site_langs(); 40 } 41 return( 42 array( // the options for our selectboxes for states 43 'site_language' => $res 44 ) 45 ); 46 } 47 return array(); 48 } 49 50 function preprocess_content($content,$template) 51 { 52 $langs=$this->bo->get_site_langs(); 53 $content['multilingual']=(count($langs)==1); 54 55 if ($template==$this->list_template) { 56 foreach ((array)$content['entry'] as $key => $value) { 57 if (empty($content['entry'][$key]['cat_id'])) { 58 $content['entry'][$key]['cat_title']=lang('all categories'); 59 } 60 if (strcmp($content['entry'][$key]['site_language'],'all')==0) { 61 $content['entry'][$key]['site_language']=lang('all languages'); 62 } 63 $content['entry'][$key]['multilingual']=$content['multilingual']; 64 } 65 } 66 67 return $content; 68 } 69 70 71 function edit_elt($content='',$msg = '') 72 { 73 if (isset($content['messages'])) { 74 ExecMethod('sitemgr.NtfMessages_UI.list_all',$content); 75 } 76 else { 77 parent::edit_elt($content,$msg); 78 } 79 } 80 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |