fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7245] Merge 7242:7244 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7245] Merge 7242:7244 from trunk
Date: Tue, 03 May 2011 08:22:51 +0000

Revision: 7245
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7245
Author:   sigurdne
Date:     2011-05-03 08:22:51 +0000 (Tue, 03 May 2011)
Log Message:
-----------
Merge 7242:7244 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
    
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php
    branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
    branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php
    branches/Version-1_0-branch/activitycalendar/templates/base/activity.php
    
branches/Version-1_0-branch/activitycalendar/templates/base/activity_list_partial.php
    branches/Version-1_0-branch/property/inc/class.menu.inc.php
    branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
    branches/Version-1_0-branch/property/inc/class.uientity.inc.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,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241
   + 
/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,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2011-05-03 08:22:51 UTC (rev 7245)
@@ -129,18 +129,19 @@
                else
                {
                        $columns[] = 'activity.id';
+                       $columns[] = 'activity.title';
                        $columns[] = 'activity.organization_id';
                        $columns[] = 'activity.group_id';
                        $columns[] = 'activity.district';
                        $columns[] = 'activity.category';
                        $columns[] = 'activity.description';
                        $columns[] = 'activity.arena';
-                       $columns[] = 'activity.date_start';
-                       $columns[] = 'activity.date_end';
+                       $columns[] = 'activity.time';
                        $columns[] = 'activity.create_date';
                        $columns[] = 'activity.last_change_date';
                        $columns[] = 'activity.contact_person_1';
                        $columns[] = 'activity.contact_person_2';
+                       $columns[] = 'activity.special_adaptation';
                        
                        $cols = implode(',',$columns);
                }
@@ -166,8 +167,8 @@
        {
                // Insert a new activity
                $ts_now = strtotime('now');
-               $q ="INSERT INTO activity_activity (organization_id, state, 
create_date) VALUES (1, 1, $ts_now)";
-               $result = $this->db->query($q);
+               $q ="INSERT INTO activity_activity (title, create_date) VALUES 
('tmptitle', $ts_now)";
+               $result = $this->db->query($q, __LINE__,__FILE__);
 
                if(isset($result)) {
                        // Set the new party ID
@@ -193,15 +194,15 @@
                $ts_now = strtotime('now');
                        
                $values = array(
+                       'title = '     . $this->marshal($activity->get_title(), 
'string'),
                        'organization_id = '. 
$this->marshal($activity->get_organization_id(), 'int'),
                        'group_id = '     . 
$this->marshal($activity->get_group_id(), 'int'),
                        'district =  '     . 
$this->marshal($activity->get_district(), 'int'),
                        'category = '          . 
$this->marshal($activity->get_category(), 'int'),
-                       //'target = '   . 
$this->marshal($activity->get_target(), 'string'),
+                       'target = '   . $this->marshal($activity->get_target(), 
'string'),
                        'description = '     . 
$this->marshal($activity->get_description(), 'string'),
                        'arena = '      . 
$this->marshal($activity->get_arena(), 'int'),
-                       'date_start = '      . 
$this->marshal($activity->get_date_start(), 'int'),
-                       'date_end = '    . 
$this->marshal($activity->get_date_end(), 'int'),
+                       'time = '      . $this->marshal($activity->get_time(), 
'string'),
                        'last_change_date = '    . $this->marshal($ts_now, 
'int'),
                        'contact_person_1 = '          . 
$this->marshal($activity->get_contact_person_1(), 'int'),
                        'contact_person_2 = '          . 
$this->marshal($activity->get_contact_person_2(), 'int'),
@@ -237,14 +238,14 @@
                if($activity == null) {
                        $activity = new activitycalendar_activity((int) 
$activity_id);
 
+                       
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
                        
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
 'int'));
                        
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
                        
$activity->set_district($this->unmarshal($this->db->f('district'), 'int'));
                        
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
                        
$activity->set_description($this->unmarshal($this->db->f('description'), 
'string'));
                        
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
-                       
$activity->set_date_start($this->unmarshal($this->db->f('date_start'), 'int'));
-                       
$activity->set_date_end($this->unmarshal($this->db->f('date_end'), 'int'));
+                       
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
                        
$activity->set_contact_person_1($this->unmarshal($this->db->f('contact_person_1'),
 'int'));
                        
$activity->set_contact_person_2($this->unmarshal($this->db->f('contact_person_2'),
 'int'));
                        
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
 'int'));
@@ -281,6 +282,36 @@
                return $categories;
        }
        
+       function select_district_list()
+       {
+               $this->db->query("SELECT id, descr FROM fm_district where id 
>'0' ORDER BY id ", __LINE__, __FILE__);
+
+               $i = 0;
+               while ($this->db->next_record())
+               {
+                       $district[$i]['id'] = $this->db->f('id');
+                       $district[$i]['name'] = 
stripslashes($this->db->f('descr'));
+                       $i++;
+               }
+
+               return $district;
+       }
+       
+       function get_district_name($district_id)
+       {
+               $result = "Ingen";
+               if($district_id != null)
+               {
+                       $sql = "SELECT descr FROM fm_district where 
id=$district_id";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       while($this->db->next_record()){
+                               $result = $this->db->f('descr');
+                       }
+       }
+               return $result;
+       }
+       
+       
        function get_target_name($target_id)
        {
                $result = "Ingen";

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2011-05-03 08:22:51 UTC (rev 7245)
@@ -73,6 +73,7 @@
                
                $categories = 
activitycalendar_soactivity::get_instance()->get_categories();
                $targets = 
activitycalendar_soactivity::get_instance()->get_targets();
+               $districts = 
activitycalendar_soactivity::get_instance()->select_district_list();
                                
                // Retrieve the arena object or create a new one
                if(isset($activity_id) && $activity_id > 0)
@@ -102,6 +103,7 @@
                        if(isset($activity)) // If a activity object is created
                        {
                                // ... set all parameters
+                               $activity->set_title(phpgw::get_var('title'));
                                
$activity->set_organization_id(phpgw::get_var('organization_id'));
                                
$activity->set_group_id(phpgw::get_var('group_id'));
                                
$activity->set_arena(phpgw::get_var('arena_id'));
@@ -109,8 +111,7 @@
                                
$activity->set_category(phpgw::get_var('category'));
                                $activity->set_target(phpgw::get_var('target'));
                                
$activity->set_description(phpgw::get_var('description'));
-                               
$activity->set_date_start(phpgw::get_var('date_start_hidden'));
-                               
$activity->set_date_end(phpgw::get_var('date_end_hidden'));
+                               $activity->set_time(phpgw::get_var('time'));
                                $activity->set_contact_persons($persons);
                                
$activity->set_special_adaptation(phpgw::get_var('special_adaptation'));
                                
@@ -133,6 +134,7 @@
                                'arenas' => $arenas,
                                'categories' => $categories,
                                'targets' => $targets,
+                               'districts' => $districts,
                                'editable' => true,
                                'message' => isset($message) ? $message : 
phpgw::get_var('message'),
                                'error' => isset($error) ? $error : 
phpgw::get_var('error')

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php   
    2011-05-03 08:18:22 UTC (rev 7244)
+++ 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php   
    2011-05-03 08:22:51 UTC (rev 7245)
@@ -10,6 +10,7 @@
                public static $so;
                
                protected $id;
+               protected $title;
                protected $organization_id;
                protected $group_id;
                protected $district;
@@ -17,8 +18,7 @@
                protected $target;
                protected $description;
                protected $arena;
-               protected $date_start;
-               protected $date_end;
+               protected $time;
                protected $create_date;
                protected $last_change_date;
                protected $contact_person_1;
@@ -43,6 +43,13 @@
                
                public function get_id() { return $this->id; }
                
+               public function set_title($title)
+               {
+                       $this->title = $title;
+               }
+               
+               public function get_title() { return $this->title; }
+               
                public function set_organization_id($organization_id)
                {
                        $this->organization_id = $organization_id;
@@ -99,19 +106,19 @@
                
                public function get_arena() { return $this->arena; }
                
-               public function set_date_start($date_start)
+               public function set_time($time)
                {
-                       $this->date_start = $date_start;
+                       $this->time = $time;
                }
                
-               public function get_date_start() { return $this->date_start; }
+               public function get_time() { return $this->time; }
                
-               public function set_date_end($date_end)
+/*             public function set_date_end($date_end)
                {
                        $this->date_end = $date_end;
                }
                
-               public function get_date_end() { return $this->date_end; }
+               public function get_date_end() { return $this->date_end; }*/
                
                public function set_create_date($create_date)
                {
@@ -199,15 +206,15 @@
                        }
                        return array(
                                'id' => $this->get_id(),
+                               'title' => $this->get_title(),
                                'organization_id' => 
activitycalendar_soorganization::get_instance()->get_organization_name($this->get_organization_id()),
                                'group_id' => 
activitycalendar_sogroup::get_instance()->get_group_name($this->get_group_id()),
-                               'district' => $this->get_district(),
+                               'district' => 
activitycalendar_soactivity::get_instance()->get_district_name($this->get_district()),
                                'category' => 
$this->get_so()->get_category_name($this->get_category()),
                                'description' => $this->get_description(),
                                'state' => $this->get_state(),
                                'arena' => 
activitycalendar_soarena::get_instance()->get_arena_name($this->get_arena()),
-                               'date_start' => 
$this->get_date_start()!=NULL?date($date_format,$this->get_date_start()):'' ,
-                               'date_end' => 
$this->get_date_end()!=NULL?date($date_format,$this->get_date_end()):'' ,
+                               'time' => $this->get_time(),
                                'contact_person_1' => $contact_1,
                                'contact_person_2' => $contact_2,
                                'special_adaptation' => 
$this->get_special_adaptation(),

Modified: branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2011-05-03 08:22:51 UTC (rev 7245)
@@ -325,9 +325,13 @@
 Contact information name is to long. max 50 characters activitycalendar        
no      Navn i kontakt informasjon er for langt. Maks 50 tegn
 Unable to fill report  activitycalendar        no      Greide ikke å fylle ut 
rapport
 arena  activitycalendar        no      Arena
+activitycalendar       common  no      aktivitetsoversikt
+Activitycalendar       common  no      Aktivitetsoversikt
 description    activitycalendar        no      Beskrivelse
 date_start     activitycalendar        no      Startdato
 date_end       activitycalendar        no      Sluttdato
+special_adaptation     activitycalendar        no      Tilpasset 
funksjonshemmede
+target activitycalendar        no      Målgruppe
 contact_person_1       activitycalendar        no      Kontaktperson 1
 contact_person_2       activitycalendar        no      Kontaktperson 2
 Activities     activitycalendar        no      Aktiviteter

Modified: 
branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php   
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php   
2011-05-03 08:22:51 UTC (rev 7245)
@@ -9,11 +9,11 @@
                                'district' => array('type' => 
'varchar','precision' => '255'),
                                'category' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
                                'target' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => True),
+                               'office' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => True),
                                'state' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => True),
                                'description' => array('type' => 
'varchar','precision' => '255'),
                                'arena' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => True),
-                               'date_start' => array('type' => 'int', 
'precision' => 4, 'precision' => '8', 'nullable' => true),
-                               'date_end' => array('type' => 'int', 
'precision' => 4, 'precision' => '8', 'nullable' => true),
+                               'time' => array('type' => 'varchar','precision' 
=> '255'),
                                'create_date' => array('type' => 'int', 
'precision' => 4, 'precision' => '8', 'nullable' => false),
                                'last_change_date' => array('type' => 'int', 
'precision' => 4, 'precision' => '8', 'nullable' => true),
                                'contact_person_1' => array('type' => 
'varchar','precision' => '255'),

Modified: 
branches/Version-1_0-branch/activitycalendar/templates/base/activity.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/templates/base/activity.php    
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/activitycalendar/templates/base/activity.php    
2011-05-03 08:22:51 UTC (rev 7245)
@@ -10,6 +10,25 @@
                        <input type="hidden" name="id" value="<?php 
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; }  ?>"/>
                        <dl class="proplist-col">
                                <dt>
+                                       <?php if($activity->get_title() || 
$editable) { ?>
+                                       <label for="title"><?php echo 
lang('title') ?></label>
+                                       <?php  } ?>
+                               </dt>
+                               <dd>
+                                       <?php
+                                       if ($editable)
+                                       {
+                                       ?>
+                                               <input type="text" name="title" 
id="title" value="<?php echo $activity->get_title() ?>" />
+                                       <?php
+                                       }
+                                       else
+                                       {
+                                               echo $activity->get_title();
+                                       }
+                                       ?>
+                               </dd>
+                               <dt>
                                        <?php 
if($activity->get_organization_id() || $editable) { ?>
                                        <label for="organization_id"><?php echo 
lang('organization') ?></label>
                                        <?php } ?>
@@ -126,6 +145,34 @@
                                        ?>
                                </dd>
                                <dt>
+                                       <?php if($activity->get_target() || 
$editable) { ?>
+                                       <label for="target"><?php echo 
lang('target') ?></label>
+                                       <?php  } ?>
+                               </dt>
+                               <dd>
+                                       <?php
+                                       $current_target_id = 
$activity->get_target();
+                                       if ($editable)
+                                       {
+                                               ?>
+                                               <select name="target">
+                                                       <option value="0">Ingen 
målgruppe valgt</option>
+                                                       <?php
+                                                       foreach($targets as 
$target)
+                                                       {
+                                                               echo "<option 
".($current_target_id == $target->get_id() ? 'selected="selected"' : "")." 
value=\"{$target->get_id()}\">".$target->get_name()."</option>";
+                                                       }
+                                                       ?>
+                                               </select>
+                                               <?php
+                                       }
+                                       else
+                                       {
+                                               echo $activity->get_target();
+                                       }
+                                       ?>
+                               </dd>
+                               <dt>
                                        <?php if($activity->get_district() || 
$editable) { ?>
                                        <label for="district"><?php echo 
lang('district') ?></label>
                                        <?php  } ?>
@@ -134,8 +181,17 @@
                                        <?php
                                        if ($editable)
                                        {
+                                               $selected_district = 
$activity->get_district();
                                        ?>
-                                               <input type="text" 
name="district" id="district" value="<?php echo $activity->get_district() ?>" />
+                                               <select name="district">
+                                                       <option value="0">Ingen 
bydel valgt</option>
+                                                       <?php
+                                                       foreach($districts as 
$district)
+                                                       {
+                                                               echo "<option 
".($selected_district == $district['id'] ? 'selected="selected"' : "")." 
value=\"{$district['id']}\">".$district['name']."</option>";
+                                                       }
+                                                       ?>
+                                               </select>
                                        <?php
                                        }
                                        else
@@ -154,7 +210,7 @@
                                        if ($editable)
                                        {
                                        ?>
-                                               <input type="text" 
name="description" id="description" value="<?php echo 
$activity->get_description() ?>" />
+                                               <textarea cols="100" rows="5" 
name="description" id="description"><?php echo $activity->get_description() 
?></textarea>
                                        <?php
                                        }
                                        else
@@ -164,39 +220,23 @@
                                        ?>
                                </dd>
                                <dt>
-                                       <?php if($activity->get_date_start() || 
$editable) { ?>
-                                       <label for="start_date"><?php echo 
lang('date_start') ?></label>
+                                       <?php if($activity->get_time() || 
$editable) { ?>
+                                       <label for="time"><?php echo 
lang('time') ?></label>
                                        <?php  } ?>
                                </dt>
                                <dd>
                                        <?php
-                                               $start_date = 
$activity->get_date_start() ? 
date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], 
$activity->get_date_start()) : '-';
-                                               $start_date_yui = 
$activity->get_date_start() ? date('Y-m-d', $activity->get_date_start()) : '';
-                                               $start_date_cal = 
$GLOBALS['phpgw']->yuical->add_listener('start_date', $start_date);?>
-                                       <?php if ($editable) {
-                                                       echo 
$GLOBALS['phpgw']->yuical->add_listener('start_date', $start_date);
-                                               } else {
-                                                       echo $start_date;
-                                               }
+                                       if ($editable)
+                                       {
                                        ?>
-                               </dd>
-                               <dt>
-                                       <?php if($activity->get_date_end() || 
$editable) { ?>
-                                       <label for="end_date"><?php echo 
lang('date_end') ?></label>
-                                       <?php  } ?>
-                               </dt>
-                               <dd>
+                                               <input type="text" name="time" 
id="time" value="<?php echo $activity->get_time() ?>" />
                                        <?php
-                                               $end_date = 
$activity->get_date_end() ? 
date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'], 
$activity->get_date_end()) : '-';
-                                               $end_date_yui = 
$activity->get_date_end() ? date('Y-m-d', $activity->get_date_end()) : '';
-                                               $end_date_cal =  
$GLOBALS['phpgw']->yuical->add_listener('end_date', $end_date);
+                                       }
+                                       else
+                                       {
+                                               echo $activity->get_time();
+                                       }
                                        ?>
-                                       <?php if ($editable) {
-                                                       echo 
$GLOBALS['phpgw']->yuical->add_listener('end_date', $end_date);
-                                               } else {
-                                                       echo $end_date;
-                                        }?>
-                                       <br/>
                                </dd>
                                <dt>
                                        <?php 
if($activity->get_contact_person_1() || $editable) { ?>
@@ -208,7 +248,7 @@
                                        if ($editable)
                                        {
                                        ?>
-                                               <input type="text" 
name="contact_person_1" id="contact_person_1" value="<?php echo 
$activity->get_contact_person_1() ?>" />
+                                               <input type="text" 
name="contact_person_1" id="contact_person_1" value="<?php echo 
$activity->get_contact_person_1() ?>" readonly="true"/>
                                        <?php
                                        }
                                        else
@@ -227,7 +267,7 @@
                                        if ($editable)
                                        {
                                        ?>
-                                               <input type="text" 
name="contact_person_2" id="contact_person_2" value="<?php echo 
$activity->get_contact_person_2() ?>" />
+                                               <input type="text" 
name="contact_person_2" id="contact_person_2" value="<?php echo 
$activity->get_contact_person_2() ?>" readonly="true"/>
                                        <?php
                                        }
                                        else

Modified: 
branches/Version-1_0-branch/activitycalendar/templates/base/activity_list_partial.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/templates/base/activity_list_partial.php
       2011-05-03 08:18:22 UTC (rev 7244)
+++ 
branches/Version-1_0-branch/activitycalendar/templates/base/activity_list_partial.php
       2011-05-03 08:22:51 UTC (rev 7245)
@@ -22,6 +22,16 @@
            sortable: true
        },
        {
+               key: "title",
+               label: "<?php echo lang('title') ?>",
+           sortable: true
+       },
+//     {
+//             key: "status",
+//             label: "<?php echo lang('status') ?>",
+//         sortable: true
+//     },
+       {
                key: "group_id",
                label: "<?php echo lang('group') ?>",
            sortable: true
@@ -47,16 +57,11 @@
            sortable: true
        },
        {
-               key: "date_start",
-               label: "<?php echo lang('date_start') ?>",
+               key: "time",
+               label: "<?php echo lang('time') ?>",
            sortable: true
        },
        {
-               key: "date_end",
-               label: "<?php echo lang('date_end') ?>",
-           sortable: true
-       },
-       {
                key: "contact_person_1",
                label: "<?php echo lang('contact_person_1') ?>",
            sortable: true

Modified: branches/Version-1_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.menu.inc.php 2011-05-03 
08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/property/inc/class.menu.inc.php 2011-05-03 
08:22:51 UTC (rev 7245)
@@ -929,7 +929,7 @@
                                                'text'  => lang('gallery')
                                        );
 
-                               $custom_menu_items= 
$custom_menus->read(array('type' => 'custom_menu_items' , 'filter' => 
array('location' => '.document')));
+                               $custom_menu_items= 
$custom_menus->read(array('type' => 'custom_menu_items'), array('location' => 
'.document'));
                                foreach($custom_menu_items as $item)
                                {
                                        
$menus['navigation']['documentation']['children'][] = array
@@ -970,12 +970,14 @@
                                                        
$menus['navigation']["entity_{$entry['id']}"]['children'] = 
$entity->read_category_tree($entry['id'],'property.uientity.index', 
PHPGW_ACL_READ);
                                                }
 
-
                                                $custom_menu_items= 
$custom_menus->read_tree(array('type' => 'custom_menu_items' , 'filter' => 
array('location' => ".entity.{$entry['id']}")));
 
                                                if($custom_menu_items)
                                                {
-                                                       
$menus['navigation']["entity_{$entry['id']}"]['children'] =  
array_merge($menus['navigation']["entity_{$entry['id']}"]['children'], 
$custom_menu_items);
+                                                       foreach 
($custom_menu_items as $item)
+                                                       {
+                                                               
$menus['navigation']["entity_{$entry['id']}"]['children'][] =  $item;
+                                                       }
                                                }
 
 /*

Modified: branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php    
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/property/inc/class.sogeneric.inc.php    
2011-05-03 08:22:51 UTC (rev 7245)
@@ -50,7 +50,7 @@
                        $this->_join    = & $this->_db->join;
                }
 
-               function read($data, $filter)
+               function read($data, $filter = array())
                {
                        $start          = isset($data['start']) && 
$data['start'] ? $data['start']:0;
                        $query          = 
isset($data['query'])?$data['query']:'';
@@ -2670,14 +2670,16 @@
                                $fields[] = $field['name'];
                        }
                        $node = array();
+                       $i = 0;
                        while ($this->_db2->next_record())
                        {
                                $id     = $this->_db2->f('id');
                                
                                foreach($fields as $field)
                                {
-                                       $tree[$id][$field] = 
$this->_db2->f($field,true);
+                                       $tree[$i][$field] = 
$this->_db2->f($field,true);
                                }
+                               $i++;
                        }
 
                        foreach($tree as &$node)

Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2011-05-03 08:18:22 UTC (rev 7244)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2011-05-03 08:22:51 UTC (rev 7245)
@@ -376,6 +376,11 @@
                        $datatable = array();
                        $values_combo_box = array();
 
+                       if($this->cat_id)
+                       {
+                               $category = 
$this->soadmin_entity->read_single_category($this->entity_id,$this->cat_id);
+                       }
+
                        //      enters the first time
                        if( phpgw::get_var('phpgw_return_as') != 'json' )
                        {
@@ -420,7 +425,6 @@
                                //// ---- DISTRICT filter----------------------
                                if($this->cat_id)
                                {
-                                       $category = 
$this->soadmin_entity->read_single_category($this->entity_id,$this->cat_id);
                                        //this validation comes to previous 
versions
                                        if (isset($category['location_level']) 
&& $category['location_level']>0)
                                        {




reply via email to

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