Revision: 21041 http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=21041 Author: sigurdne Date: 2010-02-24 21:50:06 +0000 (Wed, 24 Feb 2010) Log Message: ----------- Feature: More on local admin, support form, typos ans not used params 4746:4909
Modified Paths: -------------- people/sigurdne/modules/phpgwapi/trunk/inc/class.acl.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.contacts_sql.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.custom_fields.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.locations.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.preferences.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.sbox.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.setup_process.inc.php people/sigurdne/modules/phpgwapi/trunk/inc/class.xslttemplates.inc.php people/sigurdne/modules/phpgwapi/trunk/setup/tables_update.inc.php people/sigurdne/modules/phpgwapi/trunk/templates/base/css/base.css people/sigurdne/modules/phpgwapi/trunk/templates/base/datatable.xsl people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.acl.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.acl.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.acl.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -537,11 +537,11 @@ while($this->_db->next_record()) { - $_acl_account = $this->_db->f('acl_account'); - $_acl_rights = $this->_db->f('acl_rights'); - $_acl_grantor = $this->_db->f('acl_grantor'); - $_acl_type = $this->_db->f('acl_type'); - $_location_id = $this->_db->f('location_id'); + $_acl_account = (int) $this->_db->f('acl_account'); + $_acl_rights = (int) $this->_db->f('acl_rights'); + $_acl_grantor = (int) $this->_db->f('acl_grantor'); + $_acl_type = (int) $this->_db->f('acl_type'); + $_location_id = (int) $this->_db->f('location_id'); //avoid doubled set of rights // if(!$test[$_acl_account][$_acl_grantor][$_acl_type][$_location_id]) @@ -577,7 +577,7 @@ } // $test[$_acl_account][$_acl_grantor][$_acl_type][$_location_id] = true; } - +//_debug_array($unique_data); $sql = 'DELETE FROM phpgw_acl' . " WHERE acl_account = {$acct_id}"; $this->_db->query($sql, __LINE__, __FILE__); Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.contacts_sql.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.contacts_sql.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.contacts_sql.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -15,34 +15,34 @@ * @see sql_builder */ phpgw::import_class('phpgwapi.sql_builder'); - + /** * Include SQL criteria * @see phpgwapi_sql_criteria */ phpgw::import_class('phpgwapi.sql_criteria'); - + /** * Include SQL entity * @see sql_entity */ phpgw::import_class('phpgwapi.sql_entity'); - + /** * All categories */ define('PHPGW_CONTACTS_CATEGORIES_ALL', -3); - + /** * All records */ define('PHPGW_CONTACTS_ALL', 1); - + /** * Only current user's records */ define('PHPGW_CONTACTS_MINE', 2); - + /** * Only current user's private records */ @@ -66,6 +66,7 @@ var $total_records = 0; var $grants; protected $global_lock = false; + protected $local_lock = false; /** * All exporteds fields * @@ -104,11 +105,11 @@ 'per_prefix' => 'prefix', 'per_suffix' => 'suffix', 'per_birthday' => 'birthday', - 'per_pubkey' => 'public key', - 'per_title' => 'title', - 'per_department' => 'department', - 'per_sound' => 'sound', - 'per_active' => 'active', + 'per_pubkey' => 'public key', + 'per_title' => 'title', + 'per_department' => 'department', + 'per_sound' => 'sound', + 'per_active' => 'active', // 'per_name' => 'full name', // 'sel_cat_id' => 'categories', 'org_name' => 'company name', @@ -609,7 +610,7 @@ /** * @var bool $trans is internal for transaction * @access private - */ + */ var $trans = False; function contacts_($session=True) @@ -646,7 +647,7 @@ function read_sessiondata() { $data = $GLOBALS['phpgw']->session->appsession('session_data','phpgwapi'); - + if (!is_array($data) ) { $data = array(); @@ -883,10 +884,12 @@ */ function read($start=0,$limit=0,$fields='',$query='',$filter='',$sort='',$order='', $lastmod=-1) { + throw new Exception('deprecated method called (contatcts_sql::read)'); + foreach($fields as $field) { // we need search for a this communication media - if(@array_key_exists($field, $comm_old)) + if(@array_key_exists($field, $this->comm_old)) { $comms[] = array($field, 'comm_descr'); unset($fields[$field]); @@ -1279,7 +1282,7 @@ { $orgs[] = $this->db->Record; } - + return $orgs; } @@ -1312,14 +1315,14 @@ * @return array Asociative array with id and all data that we requested */ function get_people_by_organizations($organizations_id, $criteria='', $action=PHPGW_SQL_RUN_SQL) - { + { $data = array('my_person_id', 'per_first_name', 'per_last_name', 'my_addr_id', 'my_preferred'); $this->request($data); - + $this->criteria(array('my_org_id' => $organizations_id)); $this->criteria($criteria); return $this->get_query($action, __LINE__, __FILE__); @@ -1393,9 +1396,9 @@ { $this->criteria($criteria); } - + $locations = array(); - + $entries = $this->get_records(__LINE__, __FILE__); if ( is_array($entries) && count($entries) ) { @@ -1779,7 +1782,7 @@ $contact_name = $this->get_records_by_field($field_name, __LINE__, __FILE__); return $contact_name[0]; } - + function get_name_of_person_id($person_id) { $this->request(array('per_full_name')); @@ -2154,7 +2157,7 @@ /** * Allow edit location information of an contact - * + * * @param integer $id Contact location Id that want to be edited. * @param array $data Information for contact * @param integer $action PHPGW_SQL_RETURN_SQL | PHPGW_SQL_RUN_SQL depending what we want @@ -2176,7 +2179,7 @@ /** * Allow edit all location information of an contact - * + * * @param integer $contact_id Contact Id that want to be edited. * @param array $data Information for contact * @param integer $action PHPGW_SQL_RETURN_SQL | PHPGW_SQL_RUN_SQL depending what we want @@ -2198,7 +2201,7 @@ /** * Allow edit communication information of an contact - * + * * @param integer $id Contact comm Id that want to be edited. * @param array $data Information for contact * @param integer $action PHPGW_SQL_RETURN_SQL | PHPGW_SQL_RUN_SQL depending what we want @@ -2220,7 +2223,7 @@ /** * Allow edit other information of an contact - * + * * @param integer $id Contact other Id that want to be edited. * @param array $data Information for contact * @param integer $action PHPGW_SQL_RETURN_SQL | PHPGW_SQL_RUN_SQL depending what we want @@ -2377,7 +2380,7 @@ { $owner = (int) $GLOBALS['phpgw_info']['user']['account_id']; } - + if ( !isset($principal['preferred_org']) ) { $principal['preferred_org'] = ''; @@ -2387,14 +2390,14 @@ { $principal['preferred_address'] = ''; } - + if ( $this->db->Transaction ) { $this->global_lock = true; } else { - $this->lock_table($this->contact->table); + $this->lock_table($this->contact->table, '', true); } $this->contact->insert(array @@ -2424,6 +2427,7 @@ { foreach($comms as $comm) { + $comm['comm_preferred'] = isset($comm['comm_preferred']) && $comm['comm_preferred'] ? $comm['comm_preferred'] : 'N'; $this->add_communication_media($comm, $cid, PHPGW_SQL_RUN_SQL); $this->unlock_table(); } @@ -2477,10 +2481,10 @@ if ( $this->db->Transaction ) { $this->global_lock = true; - } + } else { - $this->lock_table($this->org->table); + $this->lock_table($this->org->table, '', true); } } @@ -2510,10 +2514,10 @@ if ( $this->db->Transaction ) { $this->global_lock = true; - } + } else { - $this->lock_table($this->person->table); + $this->lock_table($this->person->table, '', true); } } @@ -2571,9 +2575,9 @@ } else { - $this->lock_table($this->relations->table); + $this->lock_table($this->relations->table, '', true); + } } - } $sql[] = $this->_add($data,'relations', 'my_org_id', $cid, $action); $this->unlock_table(); } @@ -2618,9 +2622,9 @@ } else { - $this->lock_table($this->relations->table); + $this->lock_table($this->relations->table, '', true); + } } - } $sql[] = $this->_add($data,'relations', 'my_person_id', $cid, $action); $this->unlock_table(); } @@ -2648,9 +2652,9 @@ } else { - $this->lock_table($this->location->table); + $this->lock_table($this->location->table, '', true); + } } - } if(count($addr[0]) == 0) { $location['addr_preferred'] = 'Y'; @@ -2682,15 +2686,15 @@ $this->comm = createObject('phpgwapi.contact_comm'); if ($action == PHPGW_SQL_RUN_SQL) { - if ( $this->db->Transaction ) + if ( $this->db->Transaction && !$this->local_lock) { $this->global_lock = true; } else { - $this->lock_table($this->comm->table); + $this->lock_table($this->comm->table, '', true); + } } - } $comm['comm_creatby'] = $this->get_user_id(); $comm['comm_modby'] = $this->get_user_id(); @@ -2721,16 +2725,16 @@ } else { - $this->lock_table($this->note->table); + $this->lock_table($this->note->table, '', true); + } } - } $note['note_creatby'] = $this->get_user_id(); $note['note_modby'] = $this->get_user_id(); $note['note_creaton'] = $this->get_mkdate(); $note['note_modon'] = $this->get_mkdate(); - unset($comm['key_note_id']); + //unset($comm['key_note_id']); return $this->_add($note,'note','note_contact_id',$cid,$action); } @@ -2754,9 +2758,9 @@ } else { - $this->lock_table($this->others->table); + $this->lock_table($this->others->table, '', true); + } } - } unset($others['key_other_id']); @@ -2929,7 +2933,7 @@ } else { - $this->lock_table($relations->table); + $this->lock_table($relations->table, '', true); } $criteria = $relations->entity_criteria(phpgwapi_sql_criteria::token_and(phpgwapi_sql_criteria::_equal('my_org_id', $org_id), @@ -3189,7 +3193,7 @@ $this->request('cat_id'); $this->criteria(array('contact_id' => $person_id)); $cats = $this->get_records_by_field('cat_id', __LINE__, __FILE__); - + if($cats[0]) { $cats_array = explode(',', $cats[0]); @@ -3392,7 +3396,7 @@ $this->request('contact_id'); $this->request($data); $this->criteria(array('my_person_id' => $person_id)); - return $this->get_query($aciton, __LINE__, __FILE__); + return $this->get_query($action, __LINE__, __FILE__); } /** @@ -3491,7 +3495,7 @@ $this->request('my_person_id'); $this->criteria(array('my_org_id' => $org_id, 'my_person_id' => $person_id)); - + $contact = $this->get_records(__LINE__, __FILE__); if($contact[0]['my_org_id']==0) { @@ -3500,10 +3504,10 @@ else { return TRUE; - } + } } - + /** * Decide if contacts are user or not, and retrieve its data. * @@ -3682,7 +3686,7 @@ } if( isset($search_fields['comm_media']) - && is_array($search_fielss['comm_media']) + && is_array($search_fields['comm_media']) && count($search_fields['comm_media']) > 0) { $search_fields_comms = $search_fields['comm_media']; @@ -3749,7 +3753,7 @@ $records = $this->get_records(__LINE__, __FILE__); if(is_array($records)) { - foreach($records as $key => $value) + foreach($records as $value) { $info[] = $value['contact_id']; } @@ -3935,7 +3939,7 @@ } else { - $this->lock_table($this->relations->table); + $this->lock_table($this->relations->table, '', true); } $data['my_creaton'] = $this->get_mkdate(); @@ -3955,11 +3959,11 @@ function copy_people_by_organizations($organization_id, $new_organization_id) { $records = $this->get_people_by_organizations($organization_id); - + if(is_array($records)) { foreach($records as $data) - { + { if(!$this->exist_org_person_relation($new_organization_id, $data['my_person_id'])) { $this->relations = createObject('phpgwapi.contact_org_person'); @@ -3969,7 +3973,7 @@ } else { - $this->lock_table($this->relations->table); + $this->lock_table($this->relations->table, '', true); } $data['my_creaton'] = $this->get_mkdate(); @@ -4017,19 +4021,19 @@ */ function display_name($field) { - if ( isset($this->contact_fields['showable']) + if ( isset($this->contact_fields['showable']) && isset($this->contact_fields['showable'][$field]) ) { return lang($this->contact_fields['showable'][$field]); } - if ( isset($this->contact_fields['retreivable']) + if ( isset($this->contact_fields['retreivable']) && isset($this->contact_fields['retreivable'][$field]) ) { return lang($this->contact_fields['retrievable'][$field]); } - if ( isset($this->contact_fields['catalogs']) + if ( isset($this->contact_fields['catalogs']) && isset($this->contact_fields['catalogs'][$field]) ) { return lang($this->contact_fields['catalogs'][$field]); @@ -4075,13 +4079,17 @@ return $this->db->get_last_insert_id($this->$entity->table, $this->$entity->real_field($field)); } - function lock_table($table, $action=PHPGW_SQL_RUN_SQL) + function lock_table($table, $action=PHPGW_SQL_RUN_SQL, $local_lock = false) { if ( ( !isset($this->locked[$table]) || !$this->locked[$table] ) && $action == PHPGW_SQL_RUN_SQL) { $this->db->lock($table); $this->locked[$table] = TRUE; + if($local_lock) + { + $this->local_lock = true; + } } } @@ -4092,16 +4100,25 @@ */ function unlock_table() { + if(!$this->global_lock && $this->db->Transaction) + { + $this->db->transaction_commit(); + $this->locked = NULL; + } + +/* $this->ldebug('unlock_table', array($this->locked), 'dump'); if(count($this->locked)) { $this->ldebug('unlock_table', array('count' => count($this->locked))); if ( !$this->global_lock ) { - $this->db->unlock(); + $this->db->unlock(); } $this->locked = NULL; } + +*/ } /** @@ -4114,7 +4131,7 @@ */ function slice_old_fields($fields, $data_type) { - foreach ($comm_old as $old_field => $value) + foreach ($this->comm_old as $old_field => $value) { if($fields[$old_field]) { @@ -4254,7 +4271,7 @@ $person = $this->get_principal_persons_data($id); - $time = gettimeofday(); + //$time = gettimeofday(); $uid = $person[0]['contact_id'].':'.$person[0]['per_full_name']; $dn = 'uid=' . utf8_encode($uid).',' . $GLOBALS['phpgw_info']['server']['ldap_contact_context']; @@ -4575,7 +4592,7 @@ $cid = $contact['contact_id']; $ret = array(); $ret['contact_id'] = $cid; - + $this->edit_contact($cid, $contact, PHPGW_SQL_RUN_SQL); if ($GLOBALS['phpgw']->db->adodb->ErrorMsg()) $ret['edit_contact'] = false; @@ -4594,7 +4611,7 @@ { $ret_comm = array(); $ret['comm'] =& $ret_comm; - + $old_comms_media = $this->get_comm_contact_data($cid); if(is_array($old_comms_media) && (count($old_comms_media) > 0)) { @@ -4603,7 +4620,7 @@ $key_comm_id = $old_comm['key_comm_id']; $ret_comm['key_comm_id'][] = $key_comm_id; $is_edited = false; - + reset($comm_media); while(list($key,$comm) = each($comm_media)) { @@ -4621,7 +4638,7 @@ break; } } - + // if old entry was not set by new data (edited), delete them if($is_edited == false) { @@ -4671,7 +4688,7 @@ else $ret_loc['add_location'][] = true; } - } + } // todo: updare $contact['relations'] ??? @@ -4702,7 +4719,7 @@ else $ret_other['add_other'][] = true; } - } + } return $ret; } Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.custom_fields.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.custom_fields.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.custom_fields.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -1447,7 +1447,7 @@ protected function _get_choices($location_id, $attrib_id) { $location_id = (int) $location_id; - $ttrib_id = (int) $attrib_id; + $attrib_id = (int) $attrib_id; $sql = "SELECT * FROM phpgw_cust_choice " . " WHERE location_id = {$location_id}" Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.locations.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.locations.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.locations.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -410,7 +410,7 @@ { if ( !$appname ) { - $appname = $GLOBALS['phpgw']['flags']['currentapp']; + $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; } $appname = $this->_db->db_addslashes($appname); Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.preferences.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.preferences.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.preferences.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -610,7 +610,7 @@ $value = $this->db->db_addslashes(serialize($value)); // this addslashes is for the database $app = $this->db->db_addslashes($app); - $this->db->query($sql = "INSERT INTO phpgw_preferences". + $this->db->query("INSERT INTO phpgw_preferences". " (preference_owner,preference_app,preference_value)". " VALUES ($account_id,'$app','$value')",__LINE__,__FILE__); } Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.sbox.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.sbox.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.sbox.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -38,7 +38,7 @@ $slctd = $i == $selected ? ' selected' : ''; $formatted = phpgwapi_datetime::formattime($i); $html .= <<<HTML - <option value="{$i}" {$slctd}>{$fomatted}</option> + <option value="{$i}" {$slctd}>{$formatted}</option> HTML; } Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.setup_process.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.setup_process.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.setup_process.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -573,7 +573,7 @@ || $setup_info[$key]['status'] == '' ) ) // TODO this is not getting set for api upgrade, sometimes ??? { $appname = $setup_info[$key]['name']; - $apptitle = isset($setup_info[$key]['title']) ? $setup_info[$key]['title'] : ''; + //$apptitle = isset($setup_info[$key]['title']) ? $setup_info[$key]['title'] : ''; $currentver = $setup_info[$key]['currentver']; $targetver = $setup_info[$key]['version']; // The version we need to match when done $appdir = PHPGW_SERVER_ROOT . "/{$appname}/setup/"; @@ -619,7 +619,7 @@ if ( isset($test) && is_array($test) && count($test) ) { /* $test array comes from update file. It is a list of available upgrade functions */ - foreach ( $test as $x => $value ) + foreach ( $test as $value ) { $currentver = isset($setup_info[$key]['currentver']) ? $setup_info[$key]['currentver'] : ''; @@ -827,6 +827,7 @@ } $GLOBALS['phpgw_setup']->oProc->m_oTranslator->sCol = array(); + $sColumns = ''; $GLOBALS['phpgw_setup']->oProc->m_oTranslator->_GetColumns($GLOBALS['phpgw_setup']->oProc, $tablename, $sColumns); $arr = ''; Modified: people/sigurdne/modules/phpgwapi/trunk/inc/class.xslttemplates.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/inc/class.xslttemplates.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/inc/class.xslttemplates.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -294,7 +294,6 @@ function xml_parse() { $this->xmldata = ''; - $xmlvars = $this->xmlvars; $xmldata = $this->vars; Modified: people/sigurdne/modules/phpgwapi/trunk/setup/tables_update.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/setup/tables_update.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/setup/tables_update.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -2608,7 +2608,7 @@ $test[] = '0.9.17.524'; /** - * Restore support for anonymous sessions. + * support per application admin * * @return string the new version number */ @@ -2634,3 +2634,4 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver']; } } + Modified: people/sigurdne/modules/phpgwapi/trunk/templates/base/css/base.css =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/base/css/base.css 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/base/css/base.css 2010-02-24 21:50:06 UTC (rev 21041) @@ -58,6 +58,8 @@ { background-color: #99FF66; border: 1px solid #00CC00; + font-weight: bold; + text-align: center; } ol.source { Modified: people/sigurdne/modules/phpgwapi/trunk/templates/base/datatable.xsl =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/base/datatable.xsl 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/base/datatable.xsl 2010-02-24 21:50:06 UTC (rev 21041) @@ -736,6 +736,12 @@ var property_js = "<xsl:value-of select="//datatable/property_js"/>"; var base_java_url = "{<xsl:value-of select="//datatable/config/base_java_url"/>}"; + + <xsl:choose> + <xsl:when test="//datatable/json_data != ''"> + var json_data = <xsl:value-of select="//datatable/json_data" disable-output-escaping="yes" />; + </xsl:when> + </xsl:choose> var myColumnDefs = [ <xsl:for-each select="//datatable/headers/header"> Modified: people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css 2010-02-24 21:50:06 UTC (rev 21041) @@ -291,6 +291,8 @@ { background-color: #99FF66; border: 1px solid #00CC00; + font-weight: bold; + text-align: center; } .warn Modified: people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -18,20 +18,22 @@ $javascripts = array(); $stylesheets = array(); + phpgwapi_yui::load_widget('dragdrop'); + phpgwapi_yui::load_widget('element'); + phpgwapi_yui::load_widget('container'); + phpgwapi_yui::load_widget('connection'); + phpgwapi_yui::load_widget('resize'); + $javascripts = array + ( + "/phpgwapi/js/json/json.js", + "/phpgwapi/templates/portico/js/base.js" + ); + if( !isset($GLOBALS['phpgw_info']['flags']['noframework']) ) { - phpgwapi_yui::load_widget('dragdrop'); - phpgwapi_yui::load_widget('element'); - phpgwapi_yui::load_widget('container'); - phpgwapi_yui::load_widget('connection'); - phpgwapi_yui::load_widget('resize'); - $javascripts = array - ( - "/phpgwapi/js/json/json.js", - "/phpgwapi/templates/portico/js/base.js" - ); + phpgwapi_yui::load_widget('layout'); } - phpgwapi_yui::load_widget('layout'); + phpgwapi_yui::load_widget('button'); $stylesheets = array(); Modified: people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php 2010-02-24 21:50:06 UTC (rev 21041) @@ -43,6 +43,20 @@ $var['help_icon'] = 'icon icon-help'; } + + if(isset($GLOBALS['phpgw_info']['server']['support_address']) && $GLOBALS['phpgw_info']['server']['support_address']) + { + $var['support_url'] = "javascript:openwindow('" + . $GLOBALS['phpgw']->link('/index.php', array + ( + 'menuaction'=> 'manual.uisupport.send' + )) . "','700','600')"; + + $var['support_text'] = lang('support'); + $var['support_icon'] = 'icon icon-help'; + + } + if ( isset($GLOBALS['phpgw_info']['user']['apps']['admin']) ) { $var['debug_url'] = "javascript:openwindow('" Modified: people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl =================================================================== --- people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl 2010-02-24 21:46:56 UTC (rev 21040) +++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl 2010-02-24 21:50:06 UTC (rev 21041) @@ -16,6 +16,9 @@ <a href="{about_url}" class="icon icon-about"> {about_text} </a> + <a href="{support_url}" class="{support_icon}"> + {support_text} + </a> <a href="{help_url}" class="{help_icon}"> {help_text} </a> _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs