phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: notes/inc class.ui.inc.php,1.24,1.25


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: notes/inc class.ui.inc.php,1.24,1.25
Date: Wed, 25 Sep 2002 00:05:11 -0400

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

Modified Files:
        class.ui.inc.php 
Log Message:
update xsl version

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.ui.inc.php    23 Sep 2002 17:02:59 -0000      1.24
--- class.ui.inc.php    25 Sep 2002 04:05:06 -0000      1.25
***************
*** 40,44 ****
                        $this->t                        = 
$GLOBALS['phpgw']->template;
                        $this->tpl                      = 
CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw']->common->get_tpl_dir('notes'));
-       //              $this->tpl                      = 
CreateObject('etemplate.etemplate','notes.edit');
                        if (!$this->tpl)
                        {
--- 40,43 ----
***************
*** 109,158 ****
                }
  
-               /* function index($values = 0)
-               {
-                       // index for class etemplates
-                       //echo "<p>notes.ui.list_notes: content[nm][rows] = "; 
//_debug_array($content);
- 
-                       if (!is_array($values))
-                       {
-                               $values = array();
-                       }
- 
-                       if ($values['add'])
-                       {
-                               return $this->edit();
-                       }
-                       elseif (isset($values['nm']['rows']['edit']))
-                       {
-                               list($id) = each($values['nm']['rows']['edit']);
-                               return $this->edit($id);
-                       }
-                       elseif (isset($values['nm']['rows']['delete']))
-                       {
-                               list($id) = 
each($values['nm']['rows']['delete']);
-                               return $this->delete($id);
-                       }
-                       $this->tpl->read('notes.index');
- 
-                       $filter_list = array
-                       (
-                               'all'           => 'Show all',
-                               'public'        => 'Only yours',
-                               'private'       => 'Private'
-                       );
- 
-                       $values['nm'] = array
-                       (
-                               'start'                         => $this->start,
-                               'search'                        => 
$this->search,
-                               'filter'                        => 
$this->filter,
-                               'cat_id'                        => 
$this->cat_id,
-                               'get_rows'                      => 
'notes.bo.get_rows',
-                               'no_filter2'            => True,
-                               'options-filter'        => $filter_list
-                       );
-                       $this->tpl->exec('notes.ui.index',$values);
-               }*/
- 
                function index_old()
                {
--- 108,111 ----
***************
*** 283,289 ****
                function index()
                {
- 
-               /* index for class xslttemplates */
- 
                        $this->display_app_header();
  
--- 236,239 ----
***************
*** 402,470 ****
                }
  
-       /*      function edit($values=0)
-               {
-                       // edit for etemplates
-                       if (!is_array($values))
-                       {
-                               if (!$values)
-                               {
-                                       $values = 
get_var('id',array('POST','GET'));
-                               }
-                               if ($values > 0)
-                               {
-                                       $values = 
$this->bo->read_single($values);
-                               }
-                               else
-                               {
-                                       $values = array();
-                               }
-                       }
-                       else
-                       {
-                               if ($this->debug)
-                               {
-                                       echo '<p>edit: values = ' .  
_debug_array($values);
-                               }
- 
-                               if ($values['save'])
-                               {
-                                       $this->bo->save($values);
-                                       $this->index();
-                               }
-                               elseif($values['done'])
-                               {
-                                       $this->index();
-                               }
-                               elseif($values['delete'])
-                               {
-                                       $this->delete($values['id']);
-                               }
-                               return;
-                       }
- 
-                       if ($values['id'] <= 0)
-                       {
-                               $no_button = array
-                               (
-                                       'delete' => True
-                               );
-                               $header = 'Add note for ' . 
$GLOBALS['phpgw_info']['user']['fullname'];
-                       }
-                       else
-                       {
-                               $no_button = array
-                               (
-                                       'reset' => True
-                               );
-                               $header = 'Edit note for ' . 
$GLOBALS['phpgw_info']['user']['fullname'];
-                       }
- 
-                       $data = $values + array('header' => $header);
-                       
$this->tpl->exec('notes.ui.edit',$data,'',$no_button,array('id' => 
$values['id']));
-               } */
- 
                function edit()
                {
-                       // index for class xslttemplates
                        $note_id        = 
get_var('note_id',array('POST','GET'));
                        $values         = get_var('values',array('POST'));
--- 352,357 ----
***************
*** 472,476 ****
                        $this->display_app_header();
  
!                       $this->tpl->add_file('form');
  
                        if ($values['save'])
--- 359,363 ----
                        $this->display_app_header();
  
!                       
$this->tpl->add_file(array('form',$GLOBALS['phpgw']->common->get_tpl_dir('notes','default')
 . SEP . 'cat_select'));
  
                        if ($values['save'])
***************
*** 495,507 ****
                        $data = array
                        (
!                               'form_action'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&note_id=' . 
$note_id),
!                               'done_action'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.index'),
!                               'lang_content'  => lang('content'),
!                               'lang_access'   => lang('private'),
!                               'lang_save'             => lang('save'),
!                               'lang_done'             => lang('done'),
!                               'value_content' => 
$GLOBALS['phpgw']->strip_html($note['content']),
!                               'value_access'  => $note['access'],
!                               'message'               => $message
                        );
  
--- 382,398 ----
                        $data = array
                        (
!                               'form_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&note_id=' . 
$note_id),
!                               'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.index'),
!                               'lang_content'                  => 
lang('content'),
!                               'lang_category'                 => 
lang('category'),
!                               'lang_access'                   => 
lang('private'),
!                               'lang_save'                             => 
lang('save'),
!                               'lang_done'                             => 
lang('done'),
!                               'value_content'                 => 
$GLOBALS['phpgw']->strip_html($note['content']),
!                               'value_access'                  => 
$note['access'],
!                               'value_cat'                             => 
$note['cat'],
!                               'message'                               => 
$message,
!                               'lang_select_category'  => lang('select 
category'),
!                               'cat_list'                              => 
$this->cats->formatted_xslt_list(array('selected' => $note['cat'],'globals' => 
True))
                        );
  
***************
*** 511,516 ****
                        }
  
-                       //_debug_array($data);
- 
                        $this->tpl->set_var('form_data',$data);
  
--- 402,405 ----
***************
*** 575,581 ****
  
  
!               function delete($values=0)
                {
!                       // delete for etemplates
                        if (!is_array($values))
                        {
--- 464,473 ----
  
  
!               function delete()
                {
!                       // delete for xslttemplates
!                       $note_id        = 
get_var('note_id',array('POST','GET'));
!                       $values         = get_var('values',array('POST'));
! 
                        if (!is_array($values))
                        {
***************
*** 597,600 ****
--- 489,515 ----
                        $this->index();
                }
+ 
+               /*function delete($values=0)
+               {
+                       // delete for etemplates
+                       if (!is_array($values))
+                       {
+                               if (!$values)
+                               {
+                                       $values = 
get_var('id',array('POST','GET'));
+                               }
+                               if ($values > 0)
+                               {
+                                       $this->tpl->read('notes.delete');
+                                       
$this->tpl->exec('notes.ui.delete','','','',array('id' => $values));
+                                       return;
+                               }
+                       }
+                       elseif ($values['confirm'])
+                       {
+                               $this->bo->delete($values['id']);
+                       }
+                       $this->index();
+               } */
  
                function view()





reply via email to

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