fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6542] merge 6535:6541 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6542] merge 6535:6541 from trunk
Date: Thu, 04 Nov 2010 12:02:57 +0000

Revision: 6542
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6542
Author:   sigurdne
Date:     2010-11-04 12:02:55 +0000 (Thu, 04 Nov 2010)
Log Message:
-----------
merge 6535:6541 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/booking/setup/setup.inc.php
    branches/Version-1_0-branch/booking/setup/tables_update.inc.php
    branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
    branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
    branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
    branches/Version-1_0-branch/rental/inc/class.soadjustment.inc.php
    branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php
    branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php
    branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
    branches/Version-1_0-branch/rental/setup/phpgw_no.lang
    branches/Version-1_0-branch/rental/setup/setup.inc.php
    branches/Version-1_0-branch/rental/setup/tables_current.inc.php
    branches/Version-1_0-branch/rental/setup/tables_update.inc.php
    branches/Version-1_0-branch/rental/templates/base/delegate_list.php
    branches/Version-1_0-branch/rental/templates/base/resultunit.php
    branches/Version-1_0-branch/rental/templates/base/resultunit_list.php
    
branches/Version-1_0-branch/rental/templates/base/resultunit_list_partial.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541

Modified: branches/Version-1_0-branch/booking/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/setup.inc.php     2010-11-04 
10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/booking/setup/setup.inc.php     2010-11-04 
12:02:55 UTC (rev 6542)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.00';
+       $setup_info['booking']['version'] = '0.2.01';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: branches/Version-1_0-branch/booking/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/tables_update.inc.php     
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/booking/setup/tables_update.inc.php     
2010-11-04 12:02:55 UTC (rev 6542)
@@ -2373,7 +2373,7 @@
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
 
                $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_application ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 
'changeme'");
-               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.activity_id = ar.application_id AND ar.resource_id = 
r.id AND r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.id = ar.application_id AND ar.resource_id = r.id AND 
r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
 
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
@@ -2381,4 +2381,18 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+  $test[] = '0.2.00';
+       function booking_upgrade0_2_00()
+       {
 
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.id = ar.application_id AND ar.resource_id = r.id AND 
r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.01';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+
+

Modified: branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php     
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php     
2010-11-04 12:02:55 UTC (rev 6542)
@@ -21,7 +21,7 @@
 
        $setup_info['bookingfrontend']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98', '0.1.99', '0.2.00')
+               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98', '0.1.99', '0.2.00', '0.2.01')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(

Modified: branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/frontend/setup/phpgw_no.lang    2010-11-04 
10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/frontend/setup/phpgw_no.lang    2010-11-04 
12:02:55 UTC (rev 6542)
@@ -116,12 +116,12 @@
 delegates_for_res_unit frontend        no      Delegater for valgt 
resultatenhet
 delegates_for_user     frontend        no      Dine delegater uavhengig av 
resultatenhet
 deletage_to_all_res_units      frontend        no      Myndighet vil bli gitt 
til alle resultateneheter du er leder for
-email_create_account_title     frontend        no      Portico Estate: 
Opprettet tilgang
-email_create_account_message   frontend        no      Systemmelding til %1 %2 
<br/><br/>Det er opprettet en tilgang for deg i Portico Estate
-email_remove_delegate_title    frontend        no      Portico Estate: 
Fjerning av innsyn
-email_remove_delegate_message  frontend        no      Systemmelding til %1 %2 
<br/><br/>Din innsynsmulighet på vegne av %3 %4 i Portico Estate er nå tatt 
vekk<br/><br/>
-email_add_delegate_title       frontend        no      Portico Estate: Innsyn
-email_add_delegate_message     frontend        no      Systemmelding til %1 %2 
<br/><br/>Du har fått innsyn på vegne av %3 %4 i frontend modulen i Portico 
Estate for følgende resultatenhet: %5
+email_create_account_title     frontend        no      BKBygg systemtilgang
+email_create_account_message   frontend        no      Systemmelding fra 
BKBygg til %1 %2:<br/>Det er opprettet en tilgang for deg i BKBygg<br/><br/>Du 
får tilgang til systemet via kommunens intranett.<br/>Under verktøy i høyre 
kolonne, velg BKBygg.<br/>Brukerveiledning finner du i systemet, ved å velge 
"Hjelp" i toppmenyen.<br/>Har du spørsmål send en e-post til BKBygg 
brukerstøtte.<br/>
+email_remove_delegate_title    frontend        no      BKBygg systemtilgang
+email_remove_delegate_message  frontend        no      Systemmelding fra 
BKBygg til %1 %2:<br/>Din tilgang til BKBygg på vegne av %3 %4 er 
slettet.<br/>Har du spørsmål send en e-post til BKBygg brukerstøtte.<br/>
+email_add_delegate_title       frontend        no      BKBygg systemtilgang
+email_add_delegate_message     frontend        no      Systemmelding fra 
BKBygg til %1 %2:<br/>%3 %4 har gitt deg tilgang til BKBbygg for følgende 
resultatenhet:<br/>%5<br/><br/>Du får tilgang til systemet via kommunens 
intranett.<br/>Under verktøy i høyre kolonne, velg BKBygg.<br/>Brukerveiledning 
finner du i systemet, ved å velge "Hjelp" i toppmenyen.<br/>Har du spørsmål 
send en e-post til BKBygg brukerstøtte.<br/>
 error_delegating_unit  frontend        no      En feil oppstod når det skulle 
under delegering til resultatenhet: %1
 searching_for_self     frontend        no      Vennligst søk etter et annet 
brukernavn enn ditt eget
 remove_delegate_successful     frontend        no      Delegaten ble fjernet

Modified: branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php   
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php   
2010-11-04 12:02:55 UTC (rev 6542)
@@ -157,19 +157,55 @@
                        return $result_units;
                }
                
-               public function get_result_units_with_leader($search_for, 
$search_type)
+               public function get_result_unit_with_leader($org_unit_id)
                {
+                       $columns = "V_ORG_ENHET.ORG_ENHET_ID, 
V_ORG_ENHET.ORG_NAVN, V_ORG_PERSON.FORNAVN, V_ORG_PERSON.ETTERNAVN, 
V_ORG_PERSON.BRUKERNAVN";
+                       $tables = "V_ORG_ENHET";
+                       $joins =        "LEFT JOIN V_ORG_PERSON_ENHET ON 
(V_ORG_ENHET.ORG_ENHET_ID = V_ORG_PERSON_ENHET.ORG_ENHET_ID AND 
V_ORG_PERSON_ENHET.prioritet = 1) ".
+                                               "LEFT JOIN V_ORG_PERSON ON 
(V_ORG_PERSON.ORG_PERSON_ID = V_ORG_PERSON_ENHET.ORG_PERSON_ID)";
+                       $sql = "SELECT $columns FROM $tables $joins WHERE 
V_ORG_ENHET.ORG_NIVAA = 4 AND V_ORG_ENHET.ORG_ENHET_ID = {$org_unit_id}";
+                       $db = $this->get_db();
+                       $db->query($sql,__LINE__,__FILE__);
+               
+                       if($db->next_record())
+                       {
+                               $full_name = $db->f('FORNAVN')." 
".$db->f('ETTERNAVN');
+                               
+                               return array(
+                                               "ORG_UNIT_ID" => 
(int)$db->f('ORG_ENHET_ID'),
+                                               "ORG_UNIT_NAME" => 
$db->f('ORG_NAVN'),
+                                               "LEADER_FIRSTNAME" => 
$db->f('FORNAVN'),
+                                               "LEADER_LASTNAME" => 
$db->f('ETTERNAVN'),
+                                               "LEADER_FULLNAME" => $full_name,
+                                               "LEADER_USERNAME" => 
$db->f('BRUKERNAVN')
+                                       );
+                       }
+               }
+               
+               public function get_result_units_with_leader($start_index, 
$num_of_objects, $sort_field, $sort_ascending,$search_for, $search_type)
+               {
                        
                        $columns = "V_ORG_ENHET.ORG_ENHET_ID, 
V_ORG_ENHET.ORG_NAVN, V_ORG_PERSON.FORNAVN, V_ORG_PERSON.ETTERNAVN, 
V_ORG_PERSON.BRUKERNAVN";
-                       $tables = "V_ORG_ENHET, V_ORG_PERSON";
-                       $joins =        "LEFT JOIN V_ORG_PERSON_ENHET ON 
(V_ORG_PERSON_ENHET.ORG_ENHET_ID = V_ORG_ENHET.ORG_ENHET_ID) ".
-                                       "LEFT JOIN V_ORG_PERSON ON 
(V_ORG_PERSON.ORG_PERSON_ID = V_ORG_PERSON_ENHET.ORG_PERSON_ID)";
+                       $tables = "V_ORG_ENHET";
+                       $joins =        "LEFT JOIN V_ORG_PERSON_ENHET ON 
(V_ORG_ENHET.ORG_ENHET_ID = V_ORG_PERSON_ENHET.ORG_ENHET_ID AND 
V_ORG_PERSON_ENHET.prioritet = 1) ".
+                                               "LEFT JOIN V_ORG_PERSON ON 
(V_ORG_PERSON.ORG_PERSON_ID = V_ORG_PERSON_ENHET.ORG_PERSON_ID)";
                        $sql = "SELECT $columns FROM $tables $joins WHERE 
V_ORG_ENHET.ORG_NIVAA = 4";
                        if($search_for){
                                $selector = "";
                                switch($search_type){
                                        case 'unit_leader':
-                                                       $selector = "";
+                                                       $search_words = split(' 
', $search_for);
+                                                       $count = 0;
+                                                       $selector = "(";
+                                                       foreach($search_words 
as $search_word){
+                                                               $selector = 
$selector." (FORNAVN LIKE '%$search_word%' OR ".
+                                                                               
"ETTERNAVN LIKE '%$search_word%' OR ".
+                                                                               
"BRUKERNAVN LIKE '%$search_word%')";
+                                                               if($count < 
(count($search_words)-1)) $selector = $selector." OR ";
+                                                               $count = 
($count + 1);
+                                                       }
+                                                       $selector = 
$selector.")";
+                                                       
                                                break;
                                        default:
                                                        $selector = "ORG_NAVN 
LIKE '%".$search_for."%'";
@@ -177,18 +213,34 @@
                                }
                                $sql = "$sql AND $selector";
                        }
-                       $order_by = "ORDER BY V_ORG_ENHET.RESULTATENHET ASC";
+                       
+                       $dir = $sort_ascending ? 'ASC' : 'DESC';
+                       
+                       switch($sort_field){
+                               case "ORG_UNIT_ID":
+                                       $order_by = "ORDER BY 
V_ORG_ENHET.ORG_ENHET_ID $dir";
+                                       break;
+                               case "ORG_UNIT_NAME":
+                                       $order_by = "ORDER BY 
V_ORG_ENHET.ORG_NAVN $dir";
+                                       break;
+                               case "LEADER_FULLNAME":
+                                       $order_by = "ORDER BY 
V_ORG_PERSON.FORNAVN $dir, V_ORG_PERSON.ETTERNAVN $dir";
+                                       break;
+                               default:
+                                       $order_by = "ORDER BY 
V_ORG_ENHET.ORG_ENHET_ID $dir";
+                                       break;
+                       }
                        $sql = "$sql $order_by";
                        
                        
                        $db = $this->get_db();
-                       $db->query($sql,__LINE__,__FILE__);                     
-               
+                       
$db->limit_query($sql,$start_index,__LINE__,__FILE__,$num_of_objects);
+                       
                        $result_units = array();
                        while($db->next_record())
                        {
                                
-                               $full_name = $db->f('FORNAVN'). 
$db->f('ETTERNAVN');
+                               $full_name = $db->f('FORNAVN')." 
".$db->f('ETTERNAVN');
                                
                                $result_units[] = array(
                                                "ORG_UNIT_ID" => 
(int)$db->f('ORG_ENHET_ID'),
@@ -202,7 +254,48 @@
                        return $result_units;
                }
                
+               public function get_result_units_count($search_for, 
$search_type){
+                       $columns = "count(*)";
+                       $tables = "V_ORG_ENHET";
+                       $joins =        "LEFT JOIN V_ORG_PERSON_ENHET ON 
(V_ORG_ENHET.ORG_ENHET_ID = V_ORG_PERSON_ENHET.ORG_ENHET_ID AND 
V_ORG_PERSON_ENHET.prioritet = 1) ".
+                                               "LEFT JOIN V_ORG_PERSON ON 
(V_ORG_PERSON.ORG_PERSON_ID = V_ORG_PERSON_ENHET.ORG_PERSON_ID)";
+                       $sql = "SELECT $columns FROM $tables $joins WHERE 
V_ORG_ENHET.ORG_NIVAA = 4";
+                       if($search_for){
+                               $selector = "";
+                               switch($search_type){
+                                       case 'unit_leader':
+                                                       $search_words = split(' 
', $search_for);
+                                                       $count = 0;
+                                                       $selector = "(";
+                                                       foreach($search_words 
as $search_word){
+                                                               $selector = 
$selector." (FORNAVN LIKE '%$search_word%' OR ".
+                                                                               
"ETTERNAVN LIKE '%$search_word%' OR ".
+                                                                               
"BRUKERNAVN LIKE '%$search_word%')";
+                                                               if($count < 
(count($search_words)-1)) $selector = $selector." OR ";
+                                                               $count = 
($count + 1);
+                                                       }
+                                                       $selector = 
$selector.")";
+                                                       
+                                               break;
+                                       default:
+                                                       $selector = "ORG_NAVN 
LIKE '%".$search_for."%'";
+                                               break; 
+                               }
+                               $sql = "$sql AND $selector";
+                       }
+                       
+                       $db = $this->get_db();
+                       $db->query($sql);
+                       
+                       if($db->next_record())
+                       {
+                               return $db->f('count(*)');
+                       }
+                       return 0;
+               }
                
+               
+               
                public function is_connected()
                {
                        return $this->connected;

Modified: branches/Version-1_0-branch/rental/inc/class.soadjustment.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.soadjustment.inc.php   
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/inc/class.soadjustment.inc.php   
2010-11-04 12:02:55 UTC (rev 6542)
@@ -65,7 +65,7 @@
                }
                else
                {
-                       $cols = 'id, price_item_id, responsibility_id, 
new_price, percent, interval, adjustment_date, adjustment_type, is_executed';
+                       $cols = 'id, price_item_id, responsibility_id, 
new_price, percent, adjustment_interval, adjustment_date, adjustment_type, 
is_executed';
                        $order = $sort_field ? "ORDER BY 
{$this->marshal($sort_field, 'field')} $dir ": ' ORDER BY adjustment_date DESC';
                }
                
@@ -81,7 +81,7 @@
                        
$adjustment->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
                        
$adjustment->set_new_price($this->unmarshal($this->db->f('new_price', true), 
'float'));
                        
$adjustment->set_percent($this->unmarshal($this->db->f('percent', true), 
'float'));
-                       
$adjustment->set_interval($this->unmarshal($this->db->f('interval', true), 
'int'));
+                       
$adjustment->set_interval($this->unmarshal($this->db->f('adjustment_interval', 
true), 'int'));
                        
$adjustment->set_adjustment_date($this->unmarshal($this->db->f('adjustment_date',
 true), 'int'));
                        
$adjustment->set_adjustment_type($this->unmarshal($this->db->f('adjustment_type'),
 'string'));
                        
$adjustment->set_is_manual($this->unmarshal($this->db->f('is_manual'),'bool'));
@@ -110,7 +110,7 @@
                        'responsibility_id = ' . 
$adjustment->get_responsibility_id(),
                        'new_price= ' . $adjustment->get_new_price(),
             'percent = '.$adjustment->get_percent(),
-                       'interval = '.$adjustment->get_interval(),
+                       'adjustment_interval = '.$adjustment->get_interval(),
             'adjustment_date = ' . $adjustment->get_adjustment_date(),
                        'adjustment_type = \'' . 
$adjustment->get_adjustment_type() . '\'',
                        'is_manual = ' . ($adjustment->is_manual() ? "true" : 
"false"),
@@ -131,7 +131,7 @@
        public function add(&$adjustment)
        {
                // Build a db-friendly array of the adjustment object
-               $cols = array('price_item_id', 'responsibility_id', 
'new_price', 'percent', 'interval', 'adjustment_date', 'adjustment_type', 
'is_manual', 'is_executed');
+               $cols = array('price_item_id', 'responsibility_id', 
'new_price', 'percent', 'adjustment_interval', 'adjustment_date', 
'adjustment_type', 'is_manual', 'is_executed');
                $values = array(
                        $adjustment->get_price_item_id(),
                        $adjustment->get_responsibility_id(),
@@ -157,7 +157,7 @@
                $query = "SELECT * FROM rental_adjustment WHERE " .
                                 "responsibility_id = 
{$adjustment->get_responsibility_id()} " .
                                 "AND adjustment_date = 
{$adjustment->get_adjustment_date()} " . 
-                                "AND interval = {$adjustment->get_interval()} 
" .
+                                "AND adjustment_interval = 
{$adjustment->get_interval()} " .
                                 "AND percent = {$adjustment->get_percent()}";
                $result = $this->db->query($query);
                if($this->db->next_record())
@@ -214,7 +214,7 @@
                        
$adjustment->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
                        
$adjustment->set_new_price($this->unmarshal($this->db->f('new_price', true), 
'float'));
                        
$adjustment->set_percent($this->unmarshal($this->db->f('percent', true), 
'float'));
-                       
$adjustment->set_interval($this->unmarshal($this->db->f('interval', true), 
'int'));
+                       
$adjustment->set_interval($this->unmarshal($this->db->f('adjustment_interval', 
true), 'int'));
                        
$adjustment->set_adjustment_date($this->unmarshal($this->db->f('adjustment_date',
 true), 'int'));
                        
$adjustment->set_adjustment_type($this->unmarshal($this->db->f('adjustment_type'),
 'string'));
                        
$adjustment->set_is_manual($this->unmarshal($this->db->f('is_manual'),'bool'));

Modified: branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php     
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/inc/class.uidelegate.inc.php     
2010-11-04 12:02:55 UTC (rev 6542)
@@ -28,117 +28,35 @@
                        
                        if (isset($unit_id) && $unit_id > 0) {
                                $delegates_per_org_unit = 
frontend_bofrontend::get_delegates($unit_id);
-                       
-                       
+
                                $delegates_data = array('results' => 
$delegates_per_org_unit, 'total_records' => count($delegates_per_org_unit));
                                
                                $editable = phpgw::get_var('editable') == 
'true' ? true : false;
-                       }
+                               array_walk(
+                                                       
$delegates_data['results'], 
+                                                       array($this, 
'add_actions'),
+                                                       array(                  
// Parameters (non-object pointers)
+                                                                       
$unit_id        // [1] The unit id
+                                       ));
                        
+                       }
+
                        return $this->yui_results($delegates_data, 
'total_records', 'results');
                }
                
                public function index(){
-                       if(isset($_POST['search']))
-                       {
-                               $username = phpgw::get_var('username');
-                               if(!isset($username))
-                               {
-                                       $msglog['error'][] = array('msg' => 
lang('lacking_username'));
-                               }
-                               else if($username == 
$GLOBALS['phpgw_info']['user']['account_lid'])
-                               {
-                                       $msglog['error'][] = array('msg' => 
lang('searching_for_self'));
-                               }
-                               else
-                               {
-                                       $account_id = 
frontend_bofrontend::delegate_exist($username);
-                                       if($account_id)
-                                       {
-                                               $search = 
frontend_bofrontend::get_account_info($account_id);
-                                               $msglog['message'][] = 
array('msg' => lang('user_found_in_PE'));
-                                       }
-                                       else
-                                       {
-                                               $fellesdata_user = 
frontend_bofellesdata::get_instance()->get_user($username);
-                                               if($fellesdata_user)
-                                               {
-                                                       $search = 
$fellesdata_user;
-                                                       $msglog['message'][] = 
array('msg' => lang('user_found_in_Fellesdata'));
-                                               }
-                                               else
-                                               {
-                                                       $msglog['error'][] = 
array('msg' => lang('no_hits'));
-                                               }
-                                       }
-                               }
-                       } 
-                       else if(isset($_POST['add']))
-                       {
-                               $account_id = phpgw::get_var('account_id');
-                               
-                               $org_units = 
frontend_bofellesdata::get_instance()->get_result_units($GLOBALS['phpgw_info']['user']['account_lid']);
-                               
-                               //Parameter to delegate access to only a single 
organisational unit
-                               $org_unit_id = 
$this->header_state['selected_org_unit'];
-                               $success = true;
-                               
-                               foreach($org_units as $org_unit)
-                               {
-                                       if($org_unit_id == 'all' || 
$org_unit['ORG_UNIT_ID'] == $org_unit_id)
-                                       {
-                                               $res = 
$this->add_delegate($account_id,$org_unit['ORG_UNIT_ID'],$org_unit['ORG_NAME']);
-                                               if(!$res)
-                                               {
-                                                       $msglog['error'][] = 
array('msg' => lang('error_delegating_unit',$org_unit['ORG_NAME']));
-                                               }
-                                               $success = $success  && $res;
-                                       }
-                               }
-                               
-                               if($success)
-                               {
-                                       $msglog['message'][] = array('msg' => 
lang('delegation_successful'));   
-                               }
-                               else
-                               {
-                                       $msglog['error'][] = array('msg' => 
lang('delegation_error'));  
-                               }
-                       }
-                       
-                       
-                       
-                       
-                       
                        $this->render('delegate_list.php');
                }
                
-               public function add_delegate(int $account_id, $org_unit_id, 
$org_name)
+               public function add_actions(&$value, $key, $params)
                {
-                       if(!isset($account_id) || $account_id == '')
+                       if(($this->isExecutiveOfficer() || 
$this->isAdministrator()))
                        {
-                               //User is only registered in Fellesdata
-                               $username = phpgw::get_var('username'); 
-                               $firstname = phpgw::get_var('firstname'); 
-                               $lastname = phpgw::get_var('lastname'); 
-                               $password = 'TEst1234';
+                               $unit_id = $params[0];
                                
-                               $account_id = 
frontend_bofrontend::create_delegate_account($username, $firstname, $lastname, 
$password);
-                               
-                               if(isset($account_id) && 
!is_numeric($account_id))
-                               {
-                                       return false;
-                               }
-                       }       
-                       return frontend_bofrontend::add_delegate($account_id, 
null, $org_unit_id, $org_name);
+                               $value['ajax'][] = false;
+                               $value['actions'][] = 
html_entity_decode(self::link(array('menuaction' => 
'rental.uiresultunit.remove_delegate', 'id' => $unit_id, 'account_id' => 
$value['account_id'], 'owner_id' => $value['owner_id'])));
+                               $value['labels'][] = lang('remove');
+                       }
                }
-               
-               public function remove_delegate()
-               {
-                       $account_id = phpgw::get_var('account_id'); 
-                       $owner_id = phpgw::get_var('owner_id');
-                       
-                       
frontend_bofrontend::remove_delegate($account_id,$owner_id);
-                       $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'rental.uiresultunit.edit'));
-               }
        }
\ No newline at end of file

Modified: branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php        
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/inc/class.uiparty.inc.php        
2010-11-04 12:02:55 UTC (rev 6542)
@@ -210,9 +210,13 @@
                                        }
 
                                        if ($fellesdata && 
isset($fellesdata['UNIT_ID']) && is_numeric($fellesdata['UNIT_ID'])) {
-                                               
$party->set_org_enhet_id($unit_id);
-                                               
rental_soparty::get_instance()->store($party);
+                                               // We found a match, so store 
the new connection
+                                               
$party->set_org_enhet_id($fellesdata['UNIT_ID']);
+                                       } else {
+                                               // No match was found. Set the 
connection to NULL
+                                               $party->set_org_enhet_id(NULL);
                                        }
+                                       
rental_soparty::get_instance()->store($party);
                                }
                        }
 

Modified: branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php   
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php   
2010-11-04 12:02:55 UTC (rev 6542)
@@ -2,6 +2,7 @@
        phpgw::import_class('rental.uicommon');
        phpgw::import_class('rental.bofellesdata');
        phpgw::import_class('frontend.bofrontend');
+       phpgw::import_class('frontend.bofellesdata');
        
        class rental_uiresultunit extends rental_uicommon
        {
@@ -9,7 +10,8 @@
                (
                        'index'                         => true,
                        'edit'                          => true,
-                       'query'                         => true
+                       'query'                         => true,
+                       'remove_delegate'       => true
                );
                
                public function __construct()
@@ -31,6 +33,7 @@
                        }
                        // YUI variables for paging and sorting
                        $start_index    = phpgw::get_var('startIndex', 'int');
+                       if(!$start_index) $start_index = 0;
                        $num_of_objects = phpgw::get_var('results', 'int', 
'GET', $user_rows_per_page);
                        $sort_field             = phpgw::get_var('sort', 
'string', 'GET', 'identifier');
                        $sort_ascending = phpgw::get_var('dir') == 'desc' ? 
false : true;
@@ -38,24 +41,23 @@
                        $search_for     = phpgw::get_var('query');
                        $search_type    = phpgw::get_var('search_option');
                        
-                       phpgwapi_cache::session_set('rental', 
'composite_query', $search_for);
-                       phpgwapi_cache::session_set('rental', 
'composite_search_type', $search_type);
+                       phpgwapi_cache::session_set('rental', 
'resultunit_query', $search_for);
+                       phpgwapi_cache::session_set('rental', 
'resultunit_search_type', $search_type);
                        
                        // Create an empty result set
                        $result_count = 0;
-                       
-                       
                        // get all result unit from fellesdata
                        $bofelles = rental_bofellesdata::get_instance();
 
-                       $result_units = 
$bofelles->get_result_units_with_leader($search_for, $search_type);
-
-                       foreach($result_units as &$unit) {
-                               $delegates_per_org_unit = 
frontend_bofrontend::get_delegates($unit['ORG_UNIT_ID']);
-                               $unit['UNIT_NO_OF_DELEGATES'] = 
count($delegates_per_org_unit);
+                       $result_units = 
$bofelles->get_result_units_with_leader($start_index,$num_of_objects,$sort_field,
 $sort_ascending, $search_for, $search_type);
+                       
+                       $result_count = 
$bofelles->get_result_units_count($search_for, $search_type);
+                       
+                       foreach($result_units as &$unit){
+                               $unit['UNIT_NO_OF_DELEGATES'] = 
count(frontend_bofrontend::get_delegates($unit['ORG_UNIT_ID']));
                        }
                        
-                       $resultunit_data = array('results' => $result_units, 
'total_records' => count($result_units));
+                       $resultunit_data = array('results' => $result_units, 
'total_records' => $result_count);
                        
                        $editable = phpgw::get_var('editable') == 'true' ? true 
: false;
                        
@@ -80,26 +82,129 @@
                
                public function add_actions(&$value)
                {
-                       $value['ajax'][] = false;
-                       $value['actions'][] = 
html_entity_decode(self::link(array('menuaction' => 'rental.uiresultunit.edit', 
'id' => $value['ORG_UNIT_ID'], 'initial_load' => 'no')));
-                       $value['labels'][] = lang('edit_delegate');
+                       if(($this->isExecutiveOfficer() || 
$this->isAdministrator()))
+                       {
+                               $value['ajax'][] = false;
+                               $value['actions'][] = 
html_entity_decode(self::link(array('menuaction' => 'rental.uiresultunit.edit', 
'id' => $value['ORG_UNIT_ID'])));
+                               $value['labels'][] = lang('edit');
+                       }
                }
                
                public function edit(){
                        
                        $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('edit');
+                       
                        $unit_id = (int)phpgw::get_var('id');
                        
                        if (isset($unit_id) && $unit_id > 0) {
                                
+                               $msglog['error']['msg'] = 
phpgw::get_var('error');
+                               $msglog['message']['msg'] = 
phpgw::get_var('message');
                                
+                               if(isset($_POST['search']))
+                               {
+                                       $username = phpgw::get_var('username');
+                                       if(!isset($username))
+                                       {
+                                               $msglog['error']['msg'] = 
lang('lacking_username');
+                                       }
+                                       else
+                                       {
+                                               $account_id = 
frontend_bofrontend::delegate_exist($username);
+                                               if($account_id)
+                                               {
+                                                       $search_result = 
frontend_bofrontend::get_account_info($account_id);
+                                                       
$msglog['message']['msg'] = lang('user_found_in_PE');
+                                               }
+                                               else
+                                               {
+                                                       $fellesdata_user = 
frontend_bofellesdata::get_instance()->get_user($username);
+                                                       if($fellesdata_user)
+                                                       {
+                                                               $search_result 
= $fellesdata_user;
+                                                               
$msglog['message']['msg'] = lang('user_found_in_Fellesdata');
+                                                       }
+                                                       else
+                                                       {
+                                                               
$msglog['error']['msg'] = lang('no_hits');
+                                                       }
+                                               }
+                                       }
+                               }
+                               else if(isset($_POST['add']))
+                               {
+                                       $account_id = 
phpgw::get_var('account_id');
+                                       
+                                       
+                                       $bofelles = 
rental_bofellesdata::get_instance();
+                                       $unit = 
$bofelles->get_result_unit($unit_id);
+                                       if($account_id){
+                                               $res = 
$this->add_delegate($account_id,$unit['ORG_UNIT_ID'],$unit['ORG_NAME']);
+                                               if(!$res)
+                                               {
+                                                       $msglog['error']['msg'] 
= lang('delegation_error');
+                                               }
+                                               else
+                                               {
+                                                       
$msglog['message']['msg'] = lang('delegation_successful');
+                                               }
+                                       }
+                                       else{
+                                               $msglog['error']['msg'] = 
lang('unknown_user'); 
+                                       }
+                               }
+                               
                                $bofelles = rental_bofellesdata::get_instance();
-                               $unit = $bofelles->get_result_unit($unit_id);
+                               $unit = 
$bofelles->get_result_unit_with_leader($unit_id);
                                
                                $delegates_per_org_unit = 
frontend_bofrontend::get_delegates($unit_id);
                                $unit['UNIT_NO_OF_DELEGATES'] = 
count($delegates_per_org_unit);
                                
-                               $this->render('resultunit.php', array ('unit' 
=> $unit));
+                               $form_action = 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'rental.uiresultunit.edit', 'id' => $unit_id));
+                               
+                               $this->render('resultunit.php', array ('unit' 
=> $unit, 
+                                                                               
                                'form_action' => $form_action,
+                                                                               
                                'search_result' => isset($search_result) ? 
$search_result : array(),
+                                                                               
                                'msglog' => $msglog,
+                                                                               
                                'cancel_link' => self::link(array('menuaction' 
=> 'rental.uiresultunit.index', 'populate_form' => 'yes'))));
                        }
                }
+               
+               public function add_delegate(int $account_id, $org_unit_id, 
$org_name)
+               {
+                       if(!isset($account_id) || $account_id == '')
+                       {
+                               //User is only registered in Fellesdata
+                               $username = phpgw::get_var('username'); 
+                               $firstname = phpgw::get_var('firstname'); 
+                               $lastname = phpgw::get_var('lastname'); 
+                               $password = 'TEst1234';
+                               
+                               $account_id = 
frontend_bofrontend::create_delegate_account($username, $firstname, $lastname, 
$password);
+                               
+                               if(isset($account_id) && 
!is_numeric($account_id))
+                               {
+                                       return false;
+                               }
+                       }       
+                       return frontend_bofrontend::add_delegate($account_id, 
null, $org_unit_id, $org_name);
+               }
+               
+               public function remove_delegate()
+               {
+                       $unit_id = phpgw::get_var('id'); 
+                       $account_id = phpgw::get_var('account_id'); 
+                       
+                       $result = 
frontend_bofrontend::remove_delegate($account_id,null,$unit_id);
+                       
+                       $args = array('menuaction' => 
'rental.uiresultunit.edit', 'id' => $unit_id);
+                       
+                       if($result){
+                               $args['message'] = lang('delegate_removed');
+                       }
+                       else{
+                               $args['error'] = 
lang('failed_removing_delegate');
+                       }
+                       $GLOBALS['phpgw']->redirect_link('/index.php', $args);
+               }
        }
\ No newline at end of file

Modified: branches/Version-1_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2010-11-04 
10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2010-11-04 
12:02:55 UTC (rev 6542)
@@ -71,6 +71,8 @@
 billing_removed_contract_part_2        rental  no      med total pris lik 0 
kroner
 bill   rental  no      Faktura
 bill2  rental  no      Fakturér
+btn_add        rental  no      Deleger tilgang til bruker
+btn_search     rental  no      Finn bruker
 building       rental  no      Bygg
 calculations_internal_investment       rental  no      Beregningsgrunnlag 
internleie/investeringer
 calculate_price_apiece rental  no      Pris regnes per stk.
@@ -162,6 +164,9 @@
 date_start     rental  no      Gjelder fra
 decimal separator      rental  no      Skilletegn for desimaler
 delegates      rental  no      Delegering
+delegate_removed       rental  no      Delegaten ble fjernet.
+delegation_error       rental  no      Feil under delegering
+delegation_successful  rental  no      Velykket delegering
 delete rental  no      Slett
 department     rental  no      Avdeling
 deposit        rental  no      Depositum
@@ -195,6 +200,7 @@
 export_to      rental  no      Eksporter
 external       rental  no      Eksterne kontraktsparter
 facilit_import rental  no      Import fra Facilit
+failed_removing_delegate       rental  no      Det oppstod en feil under 
sletting av delegaten.
 fax    rental  no      Faks
 field_of_responsibility        rental  no      Ansvarsområde
 filters        rental  no      Filtre
@@ -249,6 +255,7 @@
 is_standard    rental  no      Standard priselement
 job_title      rental  no      Stillingstittel
 land_title     rental  no      Gnr/Bnr
+lacking_username       rental  no      Brukernavn må fylles ut
 last_edited_by_current_user    rental  no      Din siste endring
 lastname       rental  no      Etternavn
 last   rental  no      Siste
@@ -334,6 +341,7 @@
 No billing jobs found  rental  no      Ingen faktureringer funnet
 no_contracts_found     rental  no      Ingen kontrakter passet til 
søkekriteriene
 No contracts were selected.    rental  no      Du må velge minst én kontrakt 
for å faktuere.
+no_hits        rental  no      Ingen treff
 No invoices were found rental  no      Ingen fakturaer funnet
 no_name_composite      rental  no      Leieobjekt uten navn (løpenummer: %1)
 no_party_location      rental  no      Ingen intern organisasjonstilhørighet
@@ -524,10 +532,14 @@
 upload rental  no      Last opp
 url    rental  no      Nettsted
 Unable to get a location code for the building.        rental  no      Klarte 
ikke å hente objektnummer for bygget.
+username       rental  no      Brukernavn
 user_or_group  rental  no      Bruker/Gruppe
 vacant rental  no      Ledig
 view_contract  rental  no      Vis kontrakt
 unable_to_connect_to_database  rental  no      Problemer med å koble til 
databasen.
+unknown_user   rental  no      Personen finnes ikke.
+user_found_in_Fellesdata       rental  no      Personen finnes i Fellesdata.
+user_found_in_PE       rental  no      Personen er bruker av dette systemet.
 warning_billing_date_between   rental  no      Fakturastart må være innenfor 
kontraktens datoer!
 warning_due_date_between       rental  no      Opsjonsfrist må være innenfor 
kontraktens datoer!
 warning_lacking_start_date     rental  no      Kontrakten mangler start-dato!

Modified: branches/Version-1_0-branch/rental/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/setup/setup.inc.php      2010-11-04 
10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/setup/setup.inc.php      2010-11-04 
12:02:55 UTC (rev 6542)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['rental']['name'] = 'rental';               // Module 
identifier
-       $setup_info['rental']['version'] = '0.1.0.10';  // Current module 
version
+       $setup_info['rental']['version'] = '0.1.0.11';  // Current module 
version
        $setup_info['rental']['app_order'] = 51;                // (?)
        $setup_info['rental']['tables'] = array(
                'rental_party',                                         // All 
contract participants, tenants etc.

Modified: branches/Version-1_0-branch/rental/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/setup/tables_current.inc.php     
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/setup/tables_current.inc.php     
2010-11-04 12:02:55 UTC (rev 6542)
@@ -423,16 +423,16 @@
                
                'rental_adjustment' => array(
                        'fd' => array(
-                               'id' =>                 array('type' => 'auto', 
'nullable' => false),
-                               'price_item_id' =>              array('type' => 
'int', 'precision' => '4', 'nullable' => true),
-                               'responsibility_id' =>  array('type' => 'int', 
'precision' => '4', 'nullable' => false),
-                               'adjustment_date' =>    array('type' => 'int', 
'precision' => '8', 'nullable' => true),
-                               'adjustment_type' =>    array('type' => 
'varchar','precision' => '255','nullable' => true),
-                               'new_price' =>                  array('type' => 
'decimal', 'precision' => '20','scale' => '2', 'nullable' => true),
-                               'percent' =>                    array('type' => 
'decimal', 'precision' => '20','scale' => '2', 'nullable' => true),
-                               'interval' =>                   array('type' => 
'int', 'precision' => '4', 'nullable' => true),
-                               'is_manual' =>                  array('type' => 
'bool','nullable' => false,'default' => 'false'),
-                               'is_executed' =>                array('type' => 
'bool','nullable' => false,'default' => 'false')        
+                               'id' =>                         array('type' => 
'auto', 'nullable' => false),
+                               'price_item_id' =>                      
array('type' => 'int', 'precision' => '4', 'nullable' => true),
+                               'responsibility_id' =>          array('type' => 
'int', 'precision' => '4', 'nullable' => false),
+                               'adjustment_date' =>            array('type' => 
'int', 'precision' => '8', 'nullable' => true),
+                               'adjustment_type' =>            array('type' => 
'varchar','precision' => '255','nullable' => true),
+                               'new_price' =>                          
array('type' => 'decimal', 'precision' => '20','scale' => '2', 'nullable' => 
true),
+                               'percent' =>                            
array('type' => 'decimal', 'precision' => '20','scale' => '2', 'nullable' => 
true),
+                               'adjustment_interval' =>        array('type' => 
'int', 'precision' => '4', 'nullable' => true),
+                               'is_manual' =>                          
array('type' => 'bool','nullable' => false,'default' => 'false'),
+                               'is_executed' =>                        
array('type' => 'bool','nullable' => false,'default' => 'false')        
                        ),
                        'pk' => array('id'),
                                'fk' => array(),

Modified: branches/Version-1_0-branch/rental/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/setup/tables_update.inc.php      
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/setup/tables_update.inc.php      
2010-11-04 12:02:55 UTC (rev 6542)
@@ -195,5 +195,13 @@
                return $GLOBALS['setup_info']['rental']['currentver'];
        }
 
+       $test[] = '0.1.0.10';
+       function rental_upgrade0_1_0_10()
+       {
+               
$GLOBALS['phpgw_setup']->oProc->RenameColumn('rental_adjustment', 'interval', 
'adjustment_interval');
+
+               $GLOBALS['setup_info']['rental']['currentver'] = '0.1.0.11';
+               return $GLOBALS['setup_info']['rental']['currentver'];
+       }
        
 ?>
\ No newline at end of file

Modified: branches/Version-1_0-branch/rental/templates/base/delegate_list.php
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/delegate_list.php 
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/templates/base/delegate_list.php 
2010-11-04 12:02:55 UTC (rev 6542)
@@ -13,12 +13,12 @@
        // Defining columns for datatable
        var columnDefs = [{
                        key: "account_lastname",
-                       label: "<?php echo lang('account_lastname') ?>",
+                       label: "<?php echo lang('lastname') ?>",
                        sortable: true
                },
                {
                        key: "account_firstname",
-                       label: "<?php echo lang('account_firstname') ?>",
+                       label: "<?php echo lang('firstname') ?>",
                        sortable: true
                },
                {
@@ -38,12 +38,14 @@
        setDataSource(
                
'index.php?menuaction=rental.uidelegate.query&amp;phpgw_return_as=json<?php 
echo $url_add_on; ?>&amp;editable=<?php echo isset($editable) && $editable ? 
"true" : "false"; ?>',
                columnDefs,
-               '<?php echo $list_id ?>_form',
-               '<?php echo $list_id ?>_ctrl_search_query',
+               '',
+               '',
                '<?php echo $list_id ?>_container',
                '<?php echo $list_id ?>_paginator',
                '<?php echo $list_id ?>',
-               '<?php echo isset($editor_action) ? $editor_action : '' ?>'
+               '<?php echo isset($editor_action) ? $editor_action : '' ?>',
+               '',
+               'true'
        );
 
 </script>
@@ -52,20 +54,20 @@
        if($list_form)
        {
 ?>
-<form id="<?php echo $list_id ?>_form" method="GET">
+<form id="<?php echo $list_id ?>_form" method="POST" action="<?php echo 
$form_action?>">
        <fieldset>
-               <input type="hidden" name="account_id" 
value="{search/account_id}"/>
+               <input type="hidden" name="account_id" value="<?php echo 
$search_result['account_id'];?>"/>
                <label><?php echo lang('username') ?> </label>
-               <input type="text" name="username" 
value="{search/username}"/><input type="submit" name="search" value="<?php echo 
lang('btn_search') ?>"/>
+               <input type="text" name="username" value="<?php echo 
$search_result['username'];?>"/><input type="submit" name="search" value="<?php 
echo lang('btn_search') ?>"/>
                <br/>
                <label><?php echo lang('firstname') ?> </label>
-               <input type="text" name="firstname" readonly="" 
value="{search/firstname}" style="background-color: #CCCCCC;"/>
+               <input type="text" name="firstname" readonly="" value="<?php 
echo $search_result['firstname'];?>" style="background-color: #CCCCCC;"/>
                <br/>
                <label><?php echo lang('lastname') ?> </label>
-               <input type="text" name="lastname" readonly="" 
value="{search/lastname}" style="background-color: #CCCCCC;"/>
+               <input type="text" name="lastname" readonly="" value="<?php 
echo $search_result['lastname'];?>" style="background-color: #CCCCCC;"/>
                <br/>
                <label><?php echo lang('email') ?> </label>
-               <input type="text" name="email" readonly="" 
value="{search/email}" style="background-color: #CCCCCC;"/>
+               <input type="text" name="email" readonly="" value="<?php echo 
$search_result['email'];?>" style="background-color: #CCCCCC;"/>
                <br/>
                <input type="submit" name="add" value="<?php echo 
lang('btn_add') ?>"/>
        </fieldset>

Modified: branches/Version-1_0-branch/rental/templates/base/resultunit.php
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/resultunit.php    
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/templates/base/resultunit.php    
2010-11-04 12:02:55 UTC (rev 6542)
@@ -6,9 +6,8 @@
        $config->read();
 ?>
 
-<!--  ?php echo rental_uicommon::get_page_error($error) ?-->
-<!--  ?php echo 
rental_uicommon::get_page_warning($contract->get_validation_warnings()) ?-->
-<!--  ?php echo rental_uicommon::get_page_message($message) ?-->
+<?php echo rental_uicommon::get_page_error($error)?>
+<?php echo rental_uicommon::get_page_message($message)?>
 
 <!-- HOPPET OVER WARNINGS FORELØPIG -->
 
@@ -22,7 +21,7 @@
                } ?>
                <br/>
                <label><?php echo lang('unit_name'); ?></label>
-               <?php echo $unit["ORG_NAME"]; ?>
+               <?php echo $unit["ORG_UNIT_NAME"]; ?>
                 <br/>
                <label><?php echo lang('unit_leader_name'); ?></label>
                <?php echo $unit["LEADER_FULLNAME"]; ?>
@@ -50,7 +49,16 @@
                <?php if($unit["ORG_UNIT_ID"] > 0) {?>
                        <div id="delegates">
                                <h3><?php echo lang('related_delegates') ?></h3>
+                               <?php if($msglog['error']['msg']){?>
+                                       <div class="error"><?php echo 
$msglog['error']['msg']?></div>
+                               <?php 
+                                       }
+                                       if($msglog['message']['msg']){
+                               ?>
+                                       <div class="msg_good"><?php echo 
$msglog['message']['msg']?></div>
                                <?php
+                                       }
+                               
                                        $list_form = true;
                                        $list_id = 'included_delegates';
                                        $url_add_on = 
'&amp;type=included_delegates&amp;unit_id='.$unit["ORG_UNIT_ID"];

Modified: branches/Version-1_0-branch/rental/templates/base/resultunit_list.php
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/resultunit_list.php       
2010-11-04 10:07:35 UTC (rev 6541)
+++ branches/Version-1_0-branch/rental/templates/base/resultunit_list.php       
2010-11-04 12:02:55 UTC (rev 6542)
@@ -9,4 +9,4 @@
 $list_id = 'all_result_units';
 $url_add_on = '&amp;type=all_result_units';
 include('resultunit_list_partial.php');
-?>
+?>
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/rental/templates/base/resultunit_list_partial.php
===================================================================
--- 
branches/Version-1_0-branch/rental/templates/base/resultunit_list_partial.php   
    2010-11-04 10:07:35 UTC (rev 6541)
+++ 
branches/Version-1_0-branch/rental/templates/base/resultunit_list_partial.php   
    2010-11-04 12:02:55 UTC (rev 6542)
@@ -24,12 +24,12 @@
                {
                        key: "LEADER_FULLNAME",
                        label: "<?php echo lang('unit_leader_name') ?>",
-                   sortable: true
+                       sortable: true
                },
                {
                        key: "UNIT_NO_OF_DELEGATES",
                        label: "<?php echo lang('unit_no_of_delegates') ?>",
-                   sortable: true
+                   sortable: false
                },
                {
                        key: "actions",




reply via email to

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