[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.uilocation.inc.php,1.15,1.16
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.uilocation.inc.php,1.15,1.16 class.solocation.inc.php,1.13,1.14 class.bolocation.inc.php,1.14,1.15 class.bocommon.inc.php,1.56,1.57 |
Date: |
Sun, 22 Jun 2003 05:23:05 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv31744/inc
Modified Files:
class.uilocation.inc.php class.solocation.inc.php
class.bolocation.inc.php class.bocommon.inc.php
Log Message:
no message
Index: class.uilocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uilocation.inc.php 20 Jun 2003 10:31:50 -0000 1.15
--- class.uilocation.inc.php 22 Jun 2003 09:23:03 -0000 1.16
***************
*** 32,43 ****
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
-
- $this->grants =
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
- $this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->bo =
CreateObject($this->currentapp.'.bolocation',True);
! $this->boproperty =
CreateObject($this->currentapp.'.boproperty');
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
! $this->socommon =
CreateObject($this->currentapp.'.socommon');
! $this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
$this->start =
$this->bo->start;
--- 32,44 ----
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bo =
CreateObject($this->currentapp.'.bolocation',True);
! $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
! $this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
!
! $this->acl2 =
CreateObject($this->currentapp.'.acl2');
! $this->acl_read =
$this->acl2->check('.location',1);
! $this->acl_add =
$this->acl2->check('.location',2);
! $this->acl_edit =
$this->acl2->check('.location',4);
! $this->acl_delete =
$this->acl2->check('.location',8);
$this->start =
$this->bo->start;
***************
*** 113,125 ****
if(!$lookup)
{
! $content[$j]['row'][$i]['statustext']
= lang('view the location');
! $content[$j]['row'][$i]['text']
= lang('view');
! $content[$j]['row'][$i++]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
. $location['location_code']);
! $content[$j]['row'][$i]['statustext']
= lang('edit the location');
! $content[$j]['row'][$i]['text']
= lang('edit');
! $content[$j]['row'][$i++]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
. $location['location_code']);
! $content[$j]['row'][$i]['statustext']
= lang('delete the location');
! $content[$j]['row'][$i]['text']
= lang('delete');
! $content[$j]['row'][$i++]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
. $location['location_code'] . '&type_id=' . $type_id);
}
$j++;
--- 114,139 ----
if(!$lookup)
{
! if($this->acl_read)
! {
!
$content[$j]['row'][$i]['statustext'] = lang('view the
location');
! $content[$j]['row'][$i]['text']
= lang('view');
! $content[$j]['row'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.view&location_code='
. $location['location_code']);
! $i++;
! }
!
! if($this->acl_edit)
! {
!
$content[$j]['row'][$i]['statustext'] = lang('edit the
location');
! $content[$j]['row'][$i]['text']
= lang('edit');
! $content[$j]['row'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&location_code='
. $location['location_code']);
! $i++;
! }
!
! if($this->acl_delete)
! {
!
$content[$j]['row'][$i]['statustext'] = lang('delete the
location');
! $content[$j]['row'][$i]['text']
= lang('delete');
! $content[$j]['row'][$i]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.delete&location_code='
. $location['location_code'] . '&type_id=' . $type_id);
! }
}
$j++;
***************
*** 177,189 ****
if(!$lookup)
{
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i++]['header'] =
lang('view');
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i++]['header'] =
lang('edit');
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i++]['header'] =
lang('delete');
}
else
--- 191,215 ----
if(!$lookup)
{
! if($this->acl_read)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('view');
! $i++;
! }
! if($this->acl_edit)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('edit');
! $i++;
! }
! if($this->acl_delete)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('delete');
! $i++;
! }
}
else
***************
*** 191,195 ****
$table_header[$i]['width']
= '5%';
$table_header[$i]['align']
= 'center';
! $table_header[$i++]['header'] =
lang('select');
}
--- 217,221 ----
$table_header[$i]['width']
= '5%';
$table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('select');
}
***************
*** 197,207 ****
//_debug_array($uicols);
!
! $table_add[] = array
! (
! 'lang_add' =>
lang('add'),
! 'lang_add_statustext' => lang('add a
location'),
! 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&type_id='
. $type_id)
! );
$link_data = array
--- 223,235 ----
//_debug_array($uicols);
! if($this->acl_add)
! {
! $table_add[] = array
! (
! 'lang_add'
=> lang('add'),
! 'lang_add_statustext' => lang('add a
location'),
! 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilocation.edit&type_id='
. $type_id)
! );
! }
$link_data = array
***************
*** 256,263 ****
'cat_list'
=> $this->bo->select_category_list('filter',$this->cat_id,$type_id),
'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'filter_name'
=> 'filter',
! 'filter_list'
=> $this->boproperty->get_filter_list('filter', $this->filter),
'lang_show_all'
=> lang('Show all'),
! 'lang_filter_statustext' =>
lang('Select the filter. To show all entries select SHOW ALL'),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_statustext' => lang('Submit
the search string'),
--- 284,291 ----
'cat_list'
=> $this->bo->select_category_list('filter',$this->cat_id,$type_id),
'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
! 'owner_name'
=> 'filter',
! 'owner_list'
=> $this->bo->get_owner_type_list('filter', $this->filter),
'lang_show_all'
=> lang('Show all'),
! 'lang_owner_statustext' =>
lang('Select the owner type. To show all entries select SHOW ALL'),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_statustext' => lang('Submit
the search string'),
***************
*** 290,293 ****
--- 318,326 ----
function edit()
{
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.index');
+ }
+
$location_code =
get_var('location_code',array('POST','GET'));
$location = split('-',$location_code);
***************
*** 520,524 ****
$edit_owner=True;
$lang_owner
= lang('Owner');
! $owner_list
= $this->bo->get_owner_list($values['owner_id']);
$lang_select_owner
= lang('Select owner');
$lang_owner_statustext
= lang('Select the owner');
--- 553,557 ----
$edit_owner=True;
$lang_owner
= lang('Owner');
! $owner_list
= $this->bo->get_owner_list('',$values['owner_id']);
$lang_select_owner
= lang('Select owner');
$lang_owner_statustext
= lang('Select the owner');
***************
*** 622,625 ****
--- 655,663 ----
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.index');
+ }
+
$location_code =
get_var('location_code',array('GET'));
$type_id =
get_var('type_id',array('GET',POST));
***************
*** 662,665 ****
--- 700,709 ----
function view()
{
+
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.index');
+ }
+
$location_code =
get_var('location_code',array('POST','GET'));
$location = split('-',$location_code);
***************
*** 769,773 ****
$edit_owner=True;
$lang_owner
= lang('Owner');
! $owner_list
= $this->bo->get_owner_list($values['owner_id']);
$lang_select_owner
= lang('Select owner');
$lang_owner_statustext
= lang('Select the owner');
--- 813,817 ----
$edit_owner=True;
$lang_owner
= lang('Owner');
! $owner_list
= $this->bo->get_owner_list('',$values['owner_id']);
$lang_select_owner
= lang('Select owner');
$lang_owner_statustext
= lang('Select the owner');
Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.solocation.inc.php 21 Jun 2003 22:32:31 -0000 1.13
--- class.solocation.inc.php 22 Jun 2003 09:23:03 -0000 1.14
***************
*** 31,34 ****
--- 31,49 ----
}
+
+ function get_owner_type_list()
+ {
+ $this->db->query("SELECT id,descr FROM
fm_owner_category ORDER BY descr ");
+
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $owner_type[$i]['id'] =
$this->db->f('id');
+ $owner_type[$i]['name'] =
stripslashes($this->db->f('descr'));
+ $i++;
+ }
+ return $owner_type;
+ }
+
function get_owner_list()
{
Index: class.bolocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.bolocation.inc.php 21 Jun 2003 22:32:31 -0000 1.14
--- class.bolocation.inc.php 22 Jun 2003 09:23:03 -0000 1.15
***************
*** 133,140 ****
! function get_owner_list($selected='')
{
$owners = $this->so->get_owner_list();
while (is_array($owners) && list(,$owner) =
each($owners))
--- 133,192 ----
! function get_owner_list($format='',$selected='')
{
+ switch($format)
+ {
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_select'));
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_filter'));
+ break;
+ }
+
$owners = $this->so->get_owner_list();
+
+ while (is_array($owners) && list(,$owner) =
each($owners))
+ {
+ $sel_owner = '';
+ if ($owner['id']==$selected)
+ {
+ $sel_owner = 'selected';
+ }
+
+ $owner_list[] = array
+ (
+ 'id' => $owner['id'],
+ 'name' => $owner['name'],
+ 'selected' => $sel_owner
+ );
+ }
+
+ for ($i=0;$i<count($owner_list);$i++)
+ {
+ if ($owner_list[$i]['selected'] != 'selected')
+ {
+ unset($owner_list[$i]['selected']);
+ }
+ }
+
+ return $owner_list;
+ }
+
+ function get_owner_type_list($format='',$selected='')
+ {
+
+ switch($format)
+ {
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('owner_select'));
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('owner_filter'));
+ break;
+ }
+
+ $owners = $this->so->get_owner_type_list();
while (is_array($owners) && list(,$owner) =
each($owners))
Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** class.bocommon.inc.php 19 Jun 2003 20:03:10 -0000 1.56
--- class.bocommon.inc.php 22 Jun 2003 09:23:03 -0000 1.57
***************
*** 692,696 ****
}
! if ($sub == admin_location &&
$this->acl2->check('.property',16))
{
$i++;
--- 692,696 ----
}
! if ($sub == admin_location &&
$this->acl2->check('.location',16))
{
$i++;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.uilocation.inc.php,1.15,1.16 class.solocation.inc.php,1.13,1.14 class.bolocation.inc.php,1.14,1.15 class.bocommon.inc.php,1.56,1.57,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.phpgw.inc.php,1.42.4.1,1.42.4.2 class.sessions.inc.php,1.104.4.12,1.104.4.13
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default owner_select.xsl,NONE,1.1 owner_filter.xsl,NONE,1.1 location.xsl,1.16,1.17
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.phpgw.inc.php,1.42.4.1,1.42.4.2 class.sessions.inc.php,1.104.4.12,1.104.4.13
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default owner_select.xsl,NONE,1.1 owner_filter.xsl,NONE,1.1 location.xsl,1.16,1.17
- Index(es):