Changeset 17939
- Timestamp:
- 10/05/08 22:20:16 (2 months ago)
- Files:
-
- trunk/midcom/org.openpsa.contacts/handler/group.php (modified) (1 diff)
- trunk/midcom/org.openpsa.contactwidget/main.php (modified) (6 diffs)
- trunk/midcom/org.openpsa.invoices/handler/projects.php (modified) (1 diff)
- trunk/midcom/org.openpsa.invoices/style/show-invoice.php (modified) (2 diffs)
- trunk/midcom/org.openpsa.invoices/style/show-projects-customer-task.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/handler/project/list.php (modified) (1 diff)
- trunk/midcom/org.openpsa.projects/handler/task/list.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/org.openpsa.contacts/handler/group.php
r17644 r17939 322 322 ); 323 323 } 324 325 $invoices_node = midcom_helper_find_node_by_component('org.openpsa.invoices'); 326 if (!empty($invoices_node)) 324 $structure = new org_openpsa_core_structure(); 325 326 $invoices_url = $structure->get_node_full_url('org.openpsa.invoices'); 327 if ($invoices_url) 327 328 { 328 329 //TODO: Check for privileges somehow 329 330 $this->_view_toolbar->add_item( 330 331 Array( 331 MIDCOM_TOOLBAR_URL => $invoices_ node[MIDCOM_NAV_FULLURL]. "list/customer/all/{$this->_request_data['group']->guid}",332 MIDCOM_TOOLBAR_URL => $invoices_url . "list/customer/all/{$this->_request_data['group']->guid}", 332 333 MIDCOM_TOOLBAR_LABEL => $this->_request_data['l10n']->get('customers invoices'), 333 334 MIDCOM_TOOLBAR_HELPTEXT => null, trunk/midcom/org.openpsa.contactwidget/main.php
r17930 r17939 59 59 60 60 /** 61 * Default NAP org.openpsa.contacts nodeto be used for linking to groups. Will be autoprobed if not supplied.61 * Default NAP org.openpsa.contacts URL to be used for linking to groups. Will be autoprobed if not supplied. 62 62 * @var Array 63 63 */ 64 var $contacts_ node;64 var $contacts_url; 65 65 66 66 /** … … 89 89 parent::__construct(); 90 90 91 // Hack to make $contacts_ nodestatic92 static $contacts_ node_local;93 $this->contacts_ node =& $contacts_node_local;91 // Hack to make $contacts_url static 92 static $contacts_url_local; 93 $this->contacts_url =& $contacts_url_local; 94 94 95 95 // Read properties of provided person object/DM array … … 188 188 elseif ($this->link_contacts) 189 189 { 190 if (!$this->contacts_node) 191 { 192 $this->contacts_node = midcom_helper_find_node_by_component('org.openpsa.contacts'); 193 } 194 195 if (!$this->contacts_node) 190 if (!$this->contacts_url) 191 { 192 $structure = new org_openpsa_core_structure(); 193 $this->contacts_url = $structure->get_node_full_url('org.openpsa.contacts'); 194 } 195 196 if (!$this->contacts_url) 196 197 { 197 198 return null; … … 199 200 else 200 201 { 201 $url = "{$this->contacts_ node[MIDCOM_NAV_FULLURL]}person/{$this->contact_details['guid']}/";202 $url = "{$this->contacts_url}person/{$this->contact_details['guid']}/"; 202 203 return $url; 203 204 } … … 365 366 if ($this->link_contacts) 366 367 { 367 if (!$this->contacts_ node)368 if (!$this->contacts_url) 368 369 { 369 $this->contacts_node = midcom_helper_find_node_by_component('org.openpsa.contacts'); 370 $structure = new org_openpsa_core_structure(); 371 $this->contacts_url = $structure->get_node_full_url('org.openpsa.contacts'); 370 372 } 371 373 372 if (!$this->contacts_ node)374 if (!$this->contacts_url) 373 375 { 374 376 $this->link_contacts = false; … … 376 378 else 377 379 { 378 $group_label = "<a href=\"{$this->contacts_ node[MIDCOM_NAV_FULLURL]}group/{$group->guid}/\">{$group_label}</a>";380 $group_label = "<a href=\"{$this->contacts_url}group/{$group->guid}/\">{$group_label}</a>"; 379 381 } 380 382 } trunk/midcom/org.openpsa.invoices/handler/projects.php
r17927 r17939 163 163 { 164 164 165 // Locate Contacts node for linking 166 $this->_request_data['projects_node'] = midcom_helper_find_node_by_component('org.openpsa.projects'); 165 $structure = new org_openpsa_core_structure(); 166 167 $this->_request_data['projects_url'] = $structure->get_node_full_url('org.openpsa.projects'); 167 168 168 169 midcom_show_style('show-projects-header'); trunk/midcom/org.openpsa.invoices/style/show-invoice.php
r13524 r17939 3 3 $view = $data['invoice_dm']; 4 4 5 $projects_node = midcom_helper_find_node_by_component('org.openpsa.projects'); 5 $structure = new org_openpsa_core_structure(); 6 $projects_url = $structure->get_node_full_url('org.openpsa.projects'); 6 7 ?> 7 8 <div class="main org_openpsa_invoices_invoice"> … … 25 26 $task = new org_openpsa_projects_task($task_id); 26 27 // TODO: Link etc 27 echo "<h3><a href=\"{$projects_ node[MIDCOM_NAV_FULLURL]}task/{$task->guid}/\">{$task->title}</a></h3>\n";28 echo "<h3><a href=\"{$projects_url}task/{$task->guid}/\">{$task->title}</a></h3>\n"; 28 29 echo "<table>\n"; 29 30 echo " <tbody>\n"; trunk/midcom/org.openpsa.invoices/style/show-projects-customer-task.php
r5048 r17939 8 8 <td> 9 9 <?php 10 if ($data['projects_ node'])10 if ($data['projects_url']) 11 11 { 12 echo "<a href=\"{$data['projects_ node'][MIDCOM_NAV_FULLURL]}task/{$data['task']->guid}/\">{$data['task']->title}</a>\n";12 echo "<a href=\"{$data['projects_url']}task/{$data['task']->guid}/\">{$data['task']->title}</a>\n"; 13 13 } 14 14 else trunk/midcom/org.openpsa.projects/handler/project/list.php
r17935 r17939 271 271 // Locate Contacts node for linking 272 272 $structure = new org_openpsa_core_structure(); 273 $this->_request_data['contacts_url'] = $structure->get_node_ url('org.openpsa.contacts');273 $this->_request_data['contacts_url'] = $structure->get_node_full_url('org.openpsa.contacts'); 274 274 275 275 if ($this->_request_data['view'] == 'all') trunk/midcom/org.openpsa.projects/handler/task/list.php
r17935 r17939 80 80 81 81 $structure = new org_openpsa_core_structure(); 82 $this->_request_data['contacts_url'] = $structure->get_node_ url('org.openpsa.contacts');82 $this->_request_data['contacts_url'] = $structure->get_node_full_url('org.openpsa.contacts'); 83 83 $this->_request_data['sales_node'] = midcom_helper_find_node_by_component('org.openpsa.sales'); 84 84 $this->_request_data['prefix'] = $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX);
