phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.6,1.7 class.ui.inc.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: notes/inc class.bo.inc.php,1.6,1.7 class.ui.inc.php,1.16,1.17
Date: Sat, 21 Sep 2002 18:01:36 -0400

Update of /cvsroot/phpgroupware/notes/inc
In directory subversions:/tmp/cvs-serv5965/inc

Modified Files:
        class.bo.inc.php class.ui.inc.php 
Log Message:
ported notes index to work with classes xmltool/xslttemplates

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.bo.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.bo.inc.php    18 Sep 2002 00:40:36 -0000      1.6
--- class.bo.inc.php    21 Sep 2002 22:01:33 -0000      1.7
***************
*** 194,198 ****
                                $notes[$i]['owner'] = 
$GLOBALS['phpgw']->accounts->id2name($notes[$i]['owner']);
                        }
- 
                        return $notes;
                }
--- 194,197 ----

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.ui.inc.php    17 Sep 2002 23:10:18 -0000      1.16
--- class.ui.inc.php    21 Sep 2002 22:01:34 -0000      1.17
***************
*** 1,3 ****
! <?php
        
/***************************************************************************\
        * phpGroupWare - Notes                                                  
    *
--- 1,3 ----
! /*<?php
        
/***************************************************************************\
        * phpGroupWare - Notes                                                  
    *
***************
*** 38,43 ****
                        $this->nextmatchs       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
!                       //$this->t                      = 
$GLOBALS['phpgw']->template;
!                       $this->tpl                      = 
CreateObject('etemplate.etemplate','notes.edit');
                        $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants('notes');
                        $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
--- 38,48 ----
                        $this->nextmatchs       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
!                       $this->t                        = 
$GLOBALS['phpgw']->template;
!                       $this->tpl                      = 
CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw']->common->get_tpl_dir('notes'));
! 
!                       if (!$this->tpl)
!                       {
!                               echo 'creating tpl failed';
!                       }
                        $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants('notes');
                        $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
***************
*** 103,107 ****
                }
  
!               function index($values = 0)
                {
                        //echo "<p>notes.ui.list_notes: content[nm][rows] = "; 
//_debug_array($content);
--- 108,112 ----
                }
  
!               /* function index($values = 0)
                {
                        //echo "<p>notes.ui.list_notes: content[nm][rows] = "; 
//_debug_array($content);
***************
*** 146,150 ****
                        );
                        $this->tpl->exec('notes.ui.index',$values);
!               }
  
                function index_old()
--- 151,155 ----
                        );
                        $this->tpl->exec('notes.ui.index',$values);
!               }*/
  
                function index_old()
***************
*** 272,275 ****
--- 277,334 ----
                        $this->t->pfp('out','notes_list_t');
                        $this->save_sessiondata();
+               }
+ 
+               function index()
+               {
+                       $this->display_app_header();
+ 
+                       $this->tpl->add_file('list');
+ 
+                       $this->tpl->set_var('app_header',lang('list notes'));
+ 
+                       $notes_list = 
$this->bo->read($this->start,$this->search,$this->filter,$this->cat_id);
+ 
+                       while (is_array($notes_list) && list(,$note) = 
each($notes_list))
+                       {
+                               $words = split(' 
',$GLOBALS['phpgw']->strip_html($note['content']));
+                               $first = "$words[0] $words[1] $words[2] 
$words[3] .....";
+ 
+                               $content[] = array
+                               (
+                                       'id'                    => $note['id'],
+                                       'first'                 => $first,
+                                       'date'                  => 
$note['date'],
+                                       'owner'                 => 
$note['owner'],
+                                       'link_view'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.view&note_id=' . 
$note['id']),
+                                       'link_edit'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.edit&note_id=' . 
$note['id']),
+                                       'link_delete'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.delete&note_id=' . 
$note['id']),
+                                       'text_view'             => lang('view'),
+                                       'text_edit'             => lang('edit'),
+                                       'text_delete'   => lang('delete')
+                               );
+                       }
+ 
+                       $table_header[] = array
+                       (
+                                                               'content'       
=> lang('content'),
+                                                               'date'          
=> lang('date'),
+                                                               'view'          
=> lang('view'),
+                                                               'edit'          
=> lang('edit'),
+                                                               'delete'        
=> lang('delete'),
+                                                               'id'            
=> lang('id'),
+                                                               'owner'         
=> lang('owner')
+                                                       );
+ 
+                       $data = array
+                       (
+                               'table_header' => $table_header,
+                               'values' => $content
+                       );
+ 
+                       //_debug_array($data);
+ 
+                       $this->tpl->set_var('list',$data);
+ 
+                       $this->tpl->pparse();
                }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]