[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/class.uilookup.php, 1.1.1.2
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/class.uilookup.php, 1.1.1.2 |
Date: |
Sun, 20 Jun 2004 14:02:25 +0200 |
Update of /property
Modified Files:
Branch:
class.uilookup.php
date: 2004/06/20 12:02:25; author: sigurdne; state: Exp; lines: +127 -0
Log Message:
no message
=====================================================================
Index: property/class.uilookup.php
diff -u property/class.uilookup.php:1.1.1.1 property/class.uilookup.php:1.1.1.2
--- property/class.uilookup.php:1.1.1.1 Wed Jun 2 20:07:08 2004
+++ property/class.uilookup.php Sun Jun 20 12:02:25 2004
@@ -32,6 +32,7 @@
var $public_functions = array
(
'addressbook' => True,
+ 'vendor' => True,
'b_account' => True,
'location' => True,
'entity' => True,
@@ -201,6 +202,132 @@
return array('list_addressbook' => $data);
}
+ function vendor()
+ {
+
+ $this->cats =
CreateObject('phpgwapi_categories');
+ $this->cats->app_name = 'fm_vendor';
+
+ $this->bocommon->xsl_add_file(array('lookup',
+
'nextmatchs',
+
'search_field',
+
'cat_filter'));
+
+ $second_display =
$this->bocommon->get_var2('second_display',array('POST','GET'));
+ $column =
$this->bocommon->get_var2('column',array('POST','GET'));
+
+
+ $default_category =
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['default_vendor_category'];
+
+ if ($default_category && !$second_display)
+ {
+ $this->bo->cat_id = $default_category;
+ $this->cat_id = $default_category;
+ }
+
+ $vendor_list = $this->bo->read_vendor();
+
+ while (is_array($vendor_list) && list(,$vendor_entry) =
each($vendor_list))
+ {
+ $content[] = array
+ (
+ 'id' =>
$vendor_entry['id'],
+ 'vendor_name' =>
$vendor_entry['org_name'],
+ 'lang_select' =>
lang('Select'),
+ 'lang_select_statustext' =>
lang('Select this vendor')
+ );
+ }
+
+ $table_header[] = array
+ (
+ 'sort_name' =>
$this->bocommon->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'org_name',
+
'order' => $this->order,
+
'extra' => array('sid=cookie&op' =>
$this->currentapp.'.uilookup.vendor',
+
'cat_id' =>
$this->cat_id,
+
'column' =>
$column)
+
)),
+ 'lang_name' => lang('Name'),
+ 'sort_id' =>
$this->bocommon->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'id',
+
'order' => $this->order,
+
'extra' => array('sid=cookie&op' =>
$this->currentapp.'.uilookup.vendor',
+
'cat_id'
=>$this->cat_id,
+
'column' =>
$column)
+
)),
+ 'lang_id' => lang('ID'),
+ 'lang_select' => lang('Select')
+ );
+
+ $table_done[] = array
+ (
+ 'lang_done' =>
lang('Done'),
+ 'lang_done_statustext' => lang('Close this
window')
+ );
+
+ $link_select = array
+ (
+ 'sid=cookie&op' =>
$this->currentapp.'.uilookup.vendor',
+ 'second_display' => true,
+ 'order' => $this->order,
+ 'sort' => $this->sort,
+ 'cat_id' =>
$this->cat_id,
+ 'query' => $this->query,
+ 'filter' =>
$this->filter,
+ 'column' => $column
+ );
+
+ if($column)
+ {
+ $contact_id =$column;
+ $org_name =$column . '_org_name';
+ }
+ else
+ {
+ $contact_id ='vendor_id';
+ $org_name ='vendor_name';
+ }
+
+// $cat_data =
$this->cats->formatted_xslt_list(array('selected' => $this->cat_id,'globals' =>
True));
+ $data = array
+ (
+ 'allow_allrows'
=> false,
+ 'start_record'
=> $this->start,
+ 'record_limit'
=> 15, //$GLOBALS['phpgw_data']['user']['preferences']['common']['maxmatchs'],
+ 'num_records'
=> count($vendor_list),
+ 'all_records'
=> $this->bo->total_records,
+ 'link_url'
=> $this->bocommon->link('/index.php',$link_select),
+ 'img_path'
=>
dirname($GLOBALS['HTTP_SERVER_VARS']['PHP_SELF']).'/api/skins/default/images',
+ 'lang_no_cat'
=> lang('no category'),
+ 'lang_cat_statustext' =>
lang('Select the category the building belongs to. To do not use a category
select NO CATEGORY'),
+ 'select_name'
=> 'cat_id',
+ 'cat_list'
=> $cat_data['cat_list'],
+ 'select_action'
=> $this->bocommon->link('/index.php',$link_select),
+ 'filter_list'
=> $this->bocommon->xslt_filter(array('filter' => $this->filter,'yours' =>
'yes')),
+ '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'),
+ 'query'
=> $this->query,
+ 'lang_search'
=> lang('search'),
+ 'table_header_addressbook' =>
$table_header,
+ 'values_addressbook' =>
$content,
+ 'table_done'
=> $table_done,
+ 'contact_id'
=> $contact_id,
+ 'org_name'
=> $org_name
+ );
+
+ $appname
= lang('vendor');
+ $function_msg =
lang('list vendors');
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
+ return array('list_addressbook' => $data);
+ $this->save_sessiondata();
+ }
+
function b_account()
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/class.uilookup.php, 1.1.1.2,
nomail <=