fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7297] Merge 7280:7295 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7297] Merge 7280:7295 from trunk
Date: Tue, 24 May 2011 07:06:49 +0000

Revision: 7297
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7297
Author:   sigurdne
Date:     2011-05-24 07:06:49 +0000 (Tue, 24 May 2011)
Log Message:
-----------
Merge 7280:7295 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/class.soarena.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/model/class.arena.inc.php
    branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
    branches/Version-1_0-branch/activitycalendar/setup/setup.inc.php
    branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php
    branches/Version-1_0-branch/activitycalendar/setup/tables_update.inc.php
    branches/Version-1_0-branch/activitycalendar/templates/base/activity.php
    
branches/Version-1_0-branch/activitycalendar/templates/base/arena_list_partial.php
    branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php
    branches/Version-1_0-branch/booking/inc/class.soapplication.inc.php
    branches/Version-1_0-branch/booking/inc/class.soseason.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php
    branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiseason.inc.php
    branches/Version-1_0-branch/booking/js/booking/schedule.js
    branches/Version-1_0-branch/booking/setup/phpgw_no.lang
    branches/Version-1_0-branch/booking/templates/base/application.xsl
    branches/Version-1_0-branch/bookingfrontend/inc/class.uisearch.inc.php
    branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
    
branches/Version-1_0-branch/bookingfrontend/templates/base/booking_cancel.xsl
    branches/Version-1_0-branch/bookingfrontend/templates/base/search.xsl
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/footer.tpl
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.tpl
    branches/Version-1_0-branch/rental/inc/class.uibilling.inc.php
    branches/Version-1_0-branch/rental/setup/phpgw_no.lang

Added Paths:
-----------
    branches/Version-1_0-branch/phpgwapi/js/yui3/dom/
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/images/newlayout/

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,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279
   + 
/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,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7295

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-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2011-05-24 07:06:49 UTC (rev 7297)
@@ -18,6 +18,21 @@
                (
                        'name'       => 'get_activities',
                        'decription' => 'Get list of activities'
+               ),
+               array
+               (
+                       'name'       => 'get_targetgroups',
+                       'decription' => 'Get list of targetgroups'
+               ),
+               array
+               (
+                       'name'       => 'get_statuscodes',
+                       'decription' => 'Get list of statuscodes'
+               ),
+               array
+               (
+                       'name'       => 'get_category_list',
+                       'decription' => 'Get list of categories'
                )
        );
 
@@ -218,7 +233,7 @@
                        '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'),
+                       'district =  '     . 
$this->marshal($activity->get_district(), 'string'),
                        'office =  '     . 
$this->marshal($activity->get_office(), 'int'),
                        'category = '          . 
$this->marshal($activity->get_category(), 'int'),
                        'state = '          . 
$this->marshal($activity->get_state(), 'int'),
@@ -325,9 +340,9 @@
        
        function get_district_from_name($name)
        {
-               $this->db->query("SELECT district_id FROM fm_part_of_town where 
name like UPPER('%{$name}%') ", __LINE__, __FILE__);
+               $this->db->query("SELECT part_of_town_id FROM fm_part_of_town 
where name like UPPER('%{$name}%') ", __LINE__, __FILE__);
                while($this->db->next_record()){
-                       $result = $this->db->f('district_id');
+                       $result = $this->db->f('part_of_town_id');
                }       
                return $result;
        }
@@ -337,15 +352,30 @@
                $result = "Ingen";
                if($district_id != null)
                {
-                       $sql = "SELECT descr FROM fm_district where 
id=$district_id";
+                       $sql = "SELECT name FROM fm_part_of_town where 
part_of_town_id=$district_id";
                        $this->db->query($sql, __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = $this->db->f('descr');
+                               $result = $this->db->f('name');
                        }
        }
                return $result;
        }
        
+       function get_districts()
+       {
+               $this->db->query("SELECT part_of_town_id, name FROM 
fm_part_of_town district_id ", __LINE__, __FILE__);
+
+               $i = 0;
+               while ($this->db->next_record())
+               {
+                       $district[$i]['part_of_town_id'] = 
$this->db->f('part_of_town_id');
+                       $district[$i]['name'] = 
stripslashes($this->db->f('name'));
+                       $i++;
+               }
+
+               return $district;
+       }
+       
        function get_office_name($district_id)
        {
                $result = "Ingen";
@@ -439,9 +469,13 @@
                                        'id'                            => 
(int) $this->db->f('id'),
                                        'title'                         => 
$this->db->f('title',true),
                                        'organization_id'       => 
$this->db->f('organization_id',true),
+                                       'organization_name' => 
activitycalendar_soorganization::get_instance()->get_organization_name($this->db->f('organization_id',true)),
                                        'group_id'                      => 
$this->db->f('group_id'),
+                                       'group_name'            => 
activitycalendar_sogroup::get_instance()->get_group_name($this->db->f('group_id')),
                                        'district'                      => 
$this->db->f('district',true),
+                                       'district_name'         => 
activitycalendar_soactivity::get_instance()->get_district_name($this->db->f('district',
 true)),
                                        'category'                      => 
$this->db->f('category'),
+                                       'category_name'         => 
$this->get_category_name($this->db->f('category')),
                                        'state'                         => 
$this->db->f('state',true),
                                        'target'                        => 
$this->db->f('target'),
                                        'description'           => 
$this->db->f('description'),
@@ -454,4 +488,42 @@
                return $activities;
        }
        
+       function get_statuscodes()
+       {
+               $statuscodes[] = array('0' => 'Ingen');
+               $statuscodes[] = array('1' => 'Ny');
+               $statuscodes[] = array('2' => 'Endring');
+               $statuscodes[] = array('3' => 'Akseptert');
+               $statuscodes[] = array('4' => 'Behandlet');
+               $statuscodes[] = array('5' => 'Avvist');
+
+               return $statuscodes;
+       }
+       
+       function get_targetgroups()
+       {
+               $sql = "SELECT * FROM bb_agegroup where active=1 ORDER BY sort";
+               $this->db->query($sql, __LINE__, __FILE__);
+               while($this->db->next_record()){
+                       $targets[] = array(
+                                       'id'                            => 
(int) $this->db->f('id'),
+                                       'name'                          => 
$this->db->f('name',true),
+                       );
+               }
+               return $targets;
+       }
+       
+       function get_category_list()
+       {
+               $sql = "SELECT * FROM bb_activity where active=1 and 
parent_id=1";
+               $this->db->query($sql, __LINE__, __FILE__);
+               while($this->db->next_record()){
+                       $categories[] = array(
+                                       'id'                            => 
(int) $this->db->f('id'),
+                                       'name'                          => 
$this->db->f('name',true),
+                       );
+               }
+               return $categories;
+       }
+       
 }
\ No newline at end of file

Modified: branches/Version-1_0-branch/activitycalendar/inc/class.soarena.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.soarena.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soarena.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -51,43 +51,16 @@
                        }
                        $order = "ORDER BY 
{$this->marshal($sort_field,'field')} $dir";
                }
-/*             if($search_for)
+               if($search_for)
                {
                        $query = $this->marshal($search_for,'string');
                        $like_pattern = "'%".$search_for."%'";
                        $like_clauses = array();
                        switch($search_type){
-                               case "name":
-                                       $like_clauses[] = "party.first_name 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.last_name 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.company_name 
$this->like $like_pattern";
-                                       break;
-                               case "address":
-                                       $like_clauses[] = "party.address_1 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.address_2 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.postal_code 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.place 
$this->like $like_pattern";
-                                       break;
-                               case "identifier":
-                                       $like_clauses[] = "party.identifier 
$this->like $like_pattern";
-                                       break;
-                               case "reskontro":
-                                       $like_clauses[] = "party.reskontro 
$this->like $like_pattern";
-                                       break;
-                               case "result_unit_number":
-                                       $like_clauses[] = 
"party.result_unit_number $this->like $like_pattern";
-                                       break;
                                case "all":
-                                       $like_clauses[] = "party.first_name 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.last_name 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.company_name 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.address_1 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.address_2 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.postal_code 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.place 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.identifier 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.comment 
$this->like $like_pattern";
-                                       $like_clauses[] = "party.reskontro 
$this->like $like_pattern";
+                               default:
+                                       $like_clauses[] = "arena.arena_name 
$this->like $like_pattern";
+                                       $like_clauses[] = "arena.address 
$this->like $like_pattern";
                                        break;
                        }
 
@@ -96,7 +69,7 @@
                        {
                                $clauses[] = '(' . join(' OR ', $like_clauses) 
. ')';
                        }
-               }*/
+               }
 
                $filter_clauses = array();
                
@@ -105,18 +78,29 @@
                        $filter_clauses[] = "arena.id = {$id}";
                }
                
-               //$filter_clauses[] = "show_in_portal";
-/*
-               // All parties with contracts of type X
-               if(isset($filters['party_type']))
+               if(isset($filters['active']))
                {
-                       $party_type = 
$this->marshal($filters['party_type'],'int');
-                       if(isset($party_type) && $party_type > 0)
+                       if($filters['active'] == 'active')
                        {
-                               $filter_clauses[] = "contract.location_id = 
{$party_type}";
+                               $filter_clauses[] = "arena.active = TRUE";
+                       } 
+                       else if($filters['active'] == 'inactive')
+                       {
+                               $filter_clauses[] = "NOT arena.active";
+                       } 
+               }
+               
+               if(isset($filters['arena_type']))
+               {
+                       if($filters['arena_type'] == 'internal')
+                       {
+                               $filter_clauses[] = "NOT 
arena.internal_arena_id IS NULL";
                        }
+                       else if($filters['arena_type'] == 'not_internal')
+                       {
+                               $filter_clauses[] = "arena.internal_arena_id IS 
NULL";
+                       }
                }
-*/             
                
                if(count($filter_clauses))
                {
@@ -124,6 +108,9 @@
                }
 
                $condition =  join(' AND ', $clauses);
+               //var_dump($filters);
+               //var_dump($filter_clauses);
+               //var_dump($condition);
 
                if($return_count) // We should only return a count
                {
@@ -135,6 +122,7 @@
                        $columns[] = 'arena.arena_name';
                        $columns[] = 'arena.address';
                        $columns[] = 'arena.internal_arena_id';
+                       $columns[] = 'arena.active';
                        
                        $cols = implode(',',$columns);
                }
@@ -158,6 +146,7 @@
                        
$arena->set_arena_name($this->unmarshal($this->db->f('arena_name'), 'string'));
                        
$arena->set_address($this->unmarshal($this->db->f('address'), 'string'));
                        
$arena->set_internal_arena_id($this->unmarshal($this->db->f('internal_arena_id'),
 'int'));
+                       
$arena->set_active($this->unmarshal($this->db->f('active'), 'bool'));
                }
                return $arena;
        }

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-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2011-05-24 07:06:49 UTC (rev 7297)
@@ -12,6 +12,7 @@
        public $public_functions = array
        (
                'index'                 => true,
+               'index_json'            => true,
                'query'                     => true,
                'view'                      => true,
                'add'                           => true,
@@ -23,6 +24,8 @@
        public function __construct()
        {
                parent::__construct();
+               $this->bo_org = CreateObject('booking.boorganization');
+               $this->bo_group = CreateObject('booking.bogroup');
                self::set_active_menu('activitycalendar::activities');
                $config = CreateObject('phpgwapi.config','activitycalendar');
                $config->read();
@@ -39,8 +42,29 @@
        public function index()
        {
                $this->render('activity_list.php');
+               
        }
        
+/*     public function index_json()
+       {
+               $organizations = $this->bo_org->read();
+               //array_walk($organizations["results"], array($this, 
"_add_links"), "booking.uiorganization.show");
+
+               foreach($organizations["results"] as &$organization) {
+                       $contact = (isset($organization['contacts']) && 
isset($organization['contacts'][0])) ? $organization['contacts'][0] : null;
+
+                       if ($contact) {
+                               $organization += array(
+                                                       "primary_contact_name"  
=> ($contact["name"])  ? $contact["name"] : '',
+                                                       "primary_contact_phone" 
=> ($contact["phone"]) ? $contact["phone"] : '',
+                                                       "primary_contact_email" 
=> ($contact["email"]) ? $contact["email"] : '',
+                               );
+                       }
+               }
+
+               return $this->yui_results($organizations);
+       }*/
+       
        /**
         * Displays info about one single billing job.
         */
@@ -74,9 +98,9 @@
                $categories = 
activitycalendar_soactivity::get_instance()->get_categories();
                $targets = 
activitycalendar_soactivity::get_instance()->get_targets();
                $offices = 
activitycalendar_soactivity::get_instance()->select_district_list();
-               $districts = 
activitycalendar_soactivity::get_instance()->select_district_list();
+               $districts = 
activitycalendar_soactivity::get_instance()->get_districts();
                                
-               // Retrieve the arena object or create a new one
+               // Retrieve the activity object or create a new one
                if(isset($activity_id) && $activity_id > 0)
                {       
                        $activity = 
activitycalendar_soactivity::get_instance()->get_single($activity_id); 
@@ -101,14 +125,15 @@
 
                if(isset($_POST['save_activity'])) // The user has pressed the 
save button
                {
-                       if(isset($activity)) // If a activity object is created
+                       if(isset($activity)) // If an 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'));
-                               
$activity->set_district(phpgw::get_var('district'));
+                               $district_array = phpgw::get_var('district');
+                               $activity->set_district(implode(",", 
$district_array));
                                $activity->set_office(phpgw::get_var('office'));
                                $activity->set_state(phpgw::get_var('state'));
                                
$activity->set_category(phpgw::get_var('category'));

Modified: branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -157,7 +157,7 @@
                switch($query_type)
                {
                        case 'all_arenas':
-                               $filters = array();
+                               $filters = array('arena_type' => 
phpgw::get_var('arena_type'), 'active' => phpgw::get_var('active'));
                                $result_objects = 
activitycalendar_soarena::get_instance()->get($start_index, $num_of_objects, 
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
                                $object_count = 
activitycalendar_soarena::get_instance()->get_count($search_for, $search_type, 
$filters);
                                break;

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/model/class.arena.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/model/class.arena.inc.php  
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/inc/model/class.arena.inc.php  
2011-05-24 07:06:49 UTC (rev 7297)
@@ -11,6 +11,7 @@
                protected $internal_arena_id;
                protected $address;
                protected $reference;
+               protected $active;
                
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
@@ -48,6 +49,16 @@
                        return $this->arena_name;
                }
                
+               public function set_active(bool $active)
+               {
+                       $this->active = (bool)$active;
+               }
+       
+               public function is_active()
+               {
+                       return $this->active;
+               }
+               
                public function set_address($address)
                {
                        $this->address = $address;
@@ -78,7 +89,8 @@
                                'id' => $this->get_id(),
                                'arena_name' => $this->get_arena_name(),
                                'internal_arena_id' => 
activitycalendar_soarena::get_instance()->get_building_name($this->get_internal_arena_id()),
-                               'address' => $this->get_address()
+                               'address' => $this->get_address(),
+                               'active' => $this->is_active()
                        );
                }
        }

Modified: branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2011-05-24 07:06:49 UTC (rev 7297)
@@ -330,7 +330,7 @@
 description    activitycalendar        no      Beskrivelse
 date_start     activitycalendar        no      Startdato
 date_end       activitycalendar        no      Sluttdato
-special_adaptation     activitycalendar        no      Spesialtilpasset for 
utviklingshemmede
+special_adaptation     activitycalendar        no      Spesielt tilpasset for 
utviklingshemmede
 target activitycalendar        no      Målgruppe
 contact_person_1       activitycalendar        no      Kontaktperson 1
 contact_person_2       activitycalendar        no      Kontaktperson 2
@@ -370,4 +370,5 @@
 state_4        activitycalendar        no      Behandlet
 state_5        activitycalendar        no      Avvist
 activity_import        activitycalendar        no      Importer aktiviteter
-office activitycalendar        no      Kontor
\ No newline at end of file
+office activitycalendar        no      Kontor
+activity_helptext      activitycalendar        no      Før ny aktivitet kan 
registreres må du sjekke at organisasjon/gruppe finnes og er oppdatert, og at 
arena finnes og er oppdatert.
\ No newline at end of file

Modified: branches/Version-1_0-branch/activitycalendar/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/setup.inc.php    
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/setup/setup.inc.php    
2011-05-24 07:06:49 UTC (rev 7297)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['activitycalendar']['name'] = 'activitycalendar';
-       $setup_info['activitycalendar']['version'] = '0.1.1';
+       $setup_info['activitycalendar']['version'] = '0.1.2';
        $setup_info['activitycalendar']['app_order'] = 60;
        $setup_info['activitycalendar']['enable'] = 1;
        $setup_info['activitycalendar']['app_group']    = 'office';

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-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/setup/tables_current.inc.php   
2011-05-24 07:06:49 UTC (rev 7297)
@@ -30,7 +30,8 @@
                                'id' => array('type' => 'auto','precision' => 
4,'nullable' => False),
                                'internal_arena_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
                                'arena_name' => array('type' => 
'varchar','precision' => '255','nullable' => false),
-                               'address' => array('type' => 
'varchar','precision' => '255','nullable' => True)
+                               'address' => array('type' => 
'varchar','precision' => '255','nullable' => True),
+                               'active' => array('type' => 'bool','nullable' 
=> true,'default' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: 
branches/Version-1_0-branch/activitycalendar/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/tables_update.inc.php    
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/setup/tables_update.inc.php    
2011-05-24 07:06:49 UTC (rev 7297)
@@ -15,4 +15,16 @@
                $GLOBALS['setup_info']['activitycalendar']['currentver'] = 
'0.1.1';
                return $GLOBALS['setup_info']['activitycalendar']['currentver'];
        }
+       
+       $test[] = '0.1.1';
+       function activitycalendar_upgrade0_1_1()
+       {
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_arena','active',array(
+                       'type' => 'bool',
+                       'default' => 'true'
+               ));
+               
+               $GLOBALS['setup_info']['activitycalendar']['currentver'] = 
'0.1.2';
+               return $GLOBALS['setup_info']['activitycalendar']['currentver'];
+       }
 ?>
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/activitycalendar/templates/base/activity.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/templates/base/activity.php    
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/activitycalendar/templates/base/activity.php    
2011-05-24 07:06:49 UTC (rev 7297)
@@ -8,6 +8,7 @@
 <div class="yui-content">
        <div id="details">
                <h1><img src="<?php echo ACTIVITYCALENDAR_IMAGE_PATH 
?>images/32x32/custom/contact.png" /><?php echo lang('activity') ?></h1>
+               <h4><?php if($editable){echo lang('activity_helptext');}?></h4>
                <form action="#" method="post">
                        <input type="hidden" name="id" value="<?php 
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; }  ?>"/>
                        <dl class="proplist-col">
@@ -195,18 +196,12 @@
                                        //echo 
$current_target_id_array[0]."*".$current_target_id_array[1];
                                        if ($editable)
                                        {
+                                               foreach($targets as $t)
+                                               {
                                                ?>
-                                               <select name="target[]" 
size="<?php echo count($targets)?>" multiple="multiple">
-                                                       <option value="0">Ingen 
målgruppe valgt</option>
-                                                       <?php
-                                                       foreach($targets as $t)
-                                                       {
-                                                               //echo 
in_array($target->get_id(), $current_target_id_array);
-                                                               echo "<option 
value=\"{$t->get_id()}\" ".(in_array($t->get_id(), $current_target_id_array) ? 
'selected' : "").">".$t->get_name()."</option>";
-                                                       }
-                                                       ?>
-                                               </select>
+                                                       <input name="target[]" 
type="checkbox" value="<?php echo $t->get_id()?>" <?php echo 
(in_array($t->get_id(), $current_target_id_array) ? 'checked' : "")?>/><?php 
echo $t->get_name()?><br/>
                                                <?php
+                                               }
                                        }
                                        else
                                        {
@@ -252,6 +247,38 @@
                                        ?>
                                </dd>
                                <dt>
+                                       <?php if($activity->get_district() || 
$editable) { ?>
+                                       <label for="district"><?php echo 
lang('district') ?></label>
+                                       <?php  } ?>
+                               </dt>
+                               <dd>
+                                       <?php
+                                       $current_district_ids = 
$activity->get_district();
+                                       $current_district_id_array=explode(",", 
$current_district_ids);
+                                       //echo 
$current_target_id_array[0]."*".$current_target_id_array[1];
+                                       if ($editable)
+                                       {
+                                               foreach($districts as $d)
+                                               {
+                                               ?>
+                                                       <input 
name="district[]" type="checkbox" value="<?php echo $d['part_of_town_id']?>" 
<?php echo (in_array($d['part_of_town_id'], $current_district_id_array) ? 
'checked' : "")?>/><?php echo $d['name']?><br/>
+                                               <?php
+                                               }
+                                       }
+                                       else
+                                       {
+                                               if($activity->get_district()){
+                                                       $current_district_ids = 
$activity->get_district();
+                                                       
$current_district_id_array=explode(",", $current_district_ids);
+                                                       
foreach($current_district_id_array as $curr_district)
+                                                       {
+                                                               echo 
$act_so->get_district_name($curr_district).'<br/>';
+                                                       }
+                                               }
+                                       }
+                                       ?>
+                               </dd>
+                               <dt>
                                        <?php if($activity->get_description() 
|| $editable) { ?>
                                        <label for="description"><?php echo 
lang('description') ?></label>
                                        <?php  } ?>
@@ -296,14 +323,6 @@
                                </dt>
                                <dd>
                                        <?php
-                                       if ($editable)
-                                       {
-                                       ?>
-                                               <input type="text" 
name="contact_person_1" id="contact_person_1" value="<?php echo 
$activity->get_contact_person_1() ?>" readonly="true"/>
-                                       <?php
-                                       }
-                                       else
-                                       {
                                                if($activity->get_group_id())
                                                {
                                                        echo 
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
@@ -312,8 +331,6 @@
                                                {
                                                        echo 
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
                                                }
-                                               //echo 
$activity->get_contact_person_1();
-                                       }
                                        ?>
                                </dd>
                                <dt>
@@ -323,14 +340,6 @@
                                </dt>
                                <dd>
                                        <?php
-                                       if ($editable)
-                                       {
-                                       ?>
-                                               <input type="text" 
name="contact_person_2" id="contact_person_2" value="<?php echo 
$activity->get_contact_person_2() ?>" readonly="true"/>
-                                       <?php
-                                       }
-                                       else
-                                       {
                                                if($activity->get_group_id())
                                                {
                                                        echo 
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
@@ -339,8 +348,6 @@
                                                {
                                                        echo 
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
                                                }
-                                               //echo 
$activity->get_contact_person_2();
-                                       }
                                        ?>
                                </dd>
                            <dt>

Modified: 
branches/Version-1_0-branch/activitycalendar/templates/base/arena_list_partial.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/templates/base/arena_list_partial.php
  2011-05-24 06:51:05 UTC (rev 7296)
+++ 
branches/Version-1_0-branch/activitycalendar/templates/base/arena_list_partial.php
  2011-05-24 07:06:49 UTC (rev 7297)
@@ -64,7 +64,7 @@
                
'index.php?menuaction=activitycalendar.uiarena.query&amp;phpgw_return_as=json<?php
 echo $url_add_on; ?>&amp;editable=<?php echo $editable ? "true" : "false"; ?>',
                columnDefs,
                '<?php echo $list_id ?>_form',
-               ['<?php echo $list_id ?>_ctrl_search_query'],
+               ['<?php echo $list_id ?>_ctrl_search_query','<?php echo 
$list_id ?>_ctrl_toggle_arena_type','<?php echo $list_id 
?>_ctrl_toggle_active'],
                '<?php echo $list_id ?>_container',
                '<?php echo $list_id ?>_paginator',
                '<?php echo $list_id ?>',
@@ -114,16 +114,15 @@
                <label class="toolbar_element_label" 
for="ctrl_toggle_arena_type"><?php echo lang('arena_type') ?></label>
                <select name="arena_type" id="<?php echo $list_id 
?>_ctrl_toggle_arena_type">
                        <option value="all"><?php echo lang('all') ?></option>
-                       <option value="1"><?php echo lang('internal') 
?></option>
-                       <option value="2" ><?php echo lang('not_internal') 
?></option>
+                       <option value="internal"><?php echo lang('internal') 
?></option>
+                       <option value="not_internal" ><?php echo 
lang('not_internal') ?></option>
                </select>
-<!--           <label class="toolbar_element_label" for="<?php //echo $list_id 
?>_ctrl_toggle_active"><?php //echo lang('marked_as') ?></label>
-               <select name="active" id="<?php //echo $list_id 
?>_ctrl_toggle_active">
-                       <option value="all"><?php //echo 
lang('not_available_nor_hidden') ?></option>
-                       <option value="active"><?php //echo 
lang('available_for_pick') ?></option>
-                       <option value="inactive"><?php //echo 
lang('hidden_for_pick') ?></option>
+               <label class="toolbar_element_label" for="<?php echo $list_id 
?>_ctrl_toggle_active"><?php echo lang('marked_as') ?></label>
+               <select name="active" id="<?php echo $list_id 
?>_ctrl_toggle_active">
+                       <option value="all" <?php echo ($status == 'all') ? 
'selected' : ''?>><?php echo lang('all') ?></option>
+                       <option value="active" <?php echo ($status == 'active') 
? 'selected' : ''?>><?php echo lang('active') ?></option>
+                       <option value="inactive" <?php echo ($status == 
'inactive') ? 'selected' : ''?>><?php echo lang('inactive') ?></option>
                </select>
- -->
        </fieldset>
        
        

Modified: branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php  
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php  
2011-05-24 07:06:49 UTC (rev 7297)
@@ -265,8 +265,8 @@
 
                public function update_id_string() 
         {
+                       $db = $this->db;
                        $table_name = $this->table_name;
-                       $db = $this->db;
                        $sql = "UPDATE $table_name SET id_string = cast(id AS 
varchar)";
                        $db->query($sql, __LINE__, __FILE__);
                }

Modified: branches/Version-1_0-branch/booking/inc/class.soapplication.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soapplication.inc.php 
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.soapplication.inc.php 
2011-05-24 07:06:49 UTC (rev 7297)
@@ -23,8 +23,8 @@
                                        'activity_id'   => array('type' => 
'int', 'required' => true),
                                        'status'        => array('type' => 
'string', 'required' => true),
                                        'customer_identifier_type'              
=> array('type' => 'string', 'required' => true),
-                                       'customer_ssn'                          
                => array('type' => 'string', 'sf_validator' => 
createObject('booking.sfValidatorNorwegianSSN', array('full_required'=>false)), 
'required' => false),
-                                       'customer_organization_number'  => 
array('type' => 'string', 'sf_validator' => 
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), 
array('invalid' => '%field% is invalid'))),
+                                       'customer_ssn'                          
                => array('type' => 'string', 'query' => true, 'sf_validator' => 
createObject('booking.sfValidatorNorwegianSSN', array('full_required'=>false)), 
'required' => false),
+                                       'customer_organization_number'  => 
array('type' => 'string', 'query' => true, 'sf_validator' => 
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), 
array('invalid' => '%field% is invalid'))),
                                        'owner_name'    => array('type' => 
'string', 'query' => true,
                                                  'join'                => 
array(
                                                        'table'         => 
'phpgw_accounts',

Modified: branches/Version-1_0-branch/booking/inc/class.soseason.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soseason.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.soseason.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -145,6 +145,12 @@
                        
                        return false;
                }
+       public function update_id_string() 
+        {
+                       $db = $this->db;
+                       $sql = "UPDATE bb_allocation SET id_string = cast(id AS 
varchar)";
+                       $db->query($sql, __LINE__, __FILE__);
+               }
        }
 
        class booking_soseason_boundary extends booking_socommon
@@ -268,6 +274,7 @@
                                array_unshift($result_set, $record);
                        }
                }
+
        }
 
        class booking_sowtemplate_alloc extends booking_socommon

Modified: branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php  
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php  
2011-05-24 07:06:49 UTC (rev 7297)
@@ -204,7 +204,7 @@
 
                                $errors = $this->bo->validate($allocation);
 
-                               if (!$errors['booking'] && 
!$errors['season_boundary'])
+                               if (!$errors)
                                {
                                        $step++;
                                }
@@ -218,7 +218,7 @@
                                                $errors['global'] = lang('Could 
not add object due to insufficient permissions');
                                        }
                                }
-                               else if ($_POST['outseason'] == 'on' && 
!$errors['booking'] && !$errors['season_boundary'] && $step > 1)
+                               else if ($_POST['outseason'] == 'on' && 
!$errors && $step > 1)
                                {
 
                                        $repeat_until = 
strtotime($season['to_'])+60*60*24; 
@@ -360,6 +360,7 @@
                                {
                                        try {
                                                $receipt = 
$this->bo->update($allocation);
+                        $this->bo->so->update_id_string();
                                                
$this->send_mailnotification_to_organization($organization, lang('Allocation 
changed'), phpgw::get_var('mail', 'POST'));
                                                
$this->redirect(array('menuaction' => 'booking.uiallocation.show', 
'id'=>$allocation['id']));
                                        } catch (booking_unauthorized_exception 
$e) {

Modified: branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php 
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.uiapplication.inc.php 
2011-05-24 07:06:49 UTC (rev 7297)
@@ -154,6 +154,10 @@
                                 'text' => lang('Status').':',
                                 'list' => array(
                                     array(
+                                        'id' => 'none',
+                                        'name' => lang('Not selected')
+                                    ), 
+                                    array(
                                         'id' => 'NEW',
                                         'name' => lang('NEW')
                                     ), 
@@ -182,6 +186,7 @@
                                 'list' => 
$this->bo->so->get_activities_main_level(),
                                                        ),
                                                        array('type' => 'text', 
+                                'text' => lang('searchfield'),
                                                                'name' => 
'query'
                                                        ),
                                                        array(
@@ -271,7 +276,14 @@
                 }
                 
                        } else {
+                               if (phpgw::get_var('status') == 'none')
+                               {
+                                       $filters['status'] = array('NEW', 
'PENDING','REJECTED', 'ACCEPTED');
+                               } 
+                               else
+                               {
                 $filters['status'] = phpgw::get_var('status');
+                               }
                 $testdata =  phpgw::get_var('buildings', 'int', 'REQUEST', 
null);
                 if ($testdata != 0) {
                     $filters['building_name'] = 
$this->bo->so->get_building(phpgw::get_var('buildings', 'int', 'REQUEST', 
null));        
@@ -421,7 +433,10 @@
                                if ($_POST['contact_email'] != 
$_POST['contact_email2']) {
                                        $errors['email'] = lang('The e-mail 
addresses you entered do not match');
                                        $application['contact_email2'] = 
$_POST['contact_email2'];
+                               } else {
+                                       $application['contact_email2'] = 
$_POST['contact_email2'];
                                }
+
                                foreach($application['agegroups'] as $ag)
                                {
                                        if($ag['male'] > 9999 || $ag['female'] 
> 9999) {
@@ -491,7 +506,8 @@
                        $agegroups = $this->agegroup_bo->fetch_age_groups();
                        $agegroups = $agegroups['results'];
                        $audience = $this->audience_bo->fetch_target_audience();
-                       $application['audience_json'] = 
json_encode($audience['results']);
+                       $application['audience_json'] = 
json_encode(array_map('intval',$application['audience']));
+
                        $audience = $audience['results'];
                        $this->install_customer_identifier_ui($application);
                        $application['customer_identifier_types']['ssn'] = 
'Date of birth or SSN';

Modified: branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php     
2011-05-24 07:06:49 UTC (rev 7297)
@@ -252,16 +252,18 @@
 #                                              $errors['booking'] = lang('Can 
not create a booking in the past');
 #                                      }
 #                              } 
+               
                                if (!$booking['season_id'] &&  
$_POST['outseason'] == 'on')
                                {
                                        $errors['booking'] = lang('This booking 
is not connected to a season');
                                }       
-                               if (!$errors['activity_id'] && 
!$errors['booking'] && !$errors['season_boundary'])
+                               
+                               if (!$errors)
                                {
                                        $step++;
                                }
 
-                               if (!$errors && $_POST['recurring'] != 'on' && 
$_POST['outseason'] != 'on' )
+                               if (!$errors && $_POST['recurring'] != 'on' && 
$_POST['outseason'] != 'on')
                                {
                     if( isset($noallocation)) {
                         $allocation['resources'] = $booking['resources'];
@@ -285,7 +287,7 @@
                     }
                                        $this->redirect(array('menuaction' => 
'booking.uimassbooking.schedule', 'id'=>$booking['building_id']));
                                }
-                               else if ( ($_POST['recurring'] == 'on' || 
$_POST['outseason'] == 'on')  && !$errors['booking'] && 
!$errors['season_boundary'] && $step > 1)
+                               else if ( ($_POST['recurring'] == 'on' || 
$_POST['outseason'] == 'on')  && !$errors && $step > 1)
                                {
                                        if ($_POST['recurring'] == 'on') {
                                                $repeat_until = 
strtotime($_POST['repeat_until'])+60*60*24; 

Modified: branches/Version-1_0-branch/booking/inc/class.uiseason.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiseason.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/inc/class.uiseason.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -381,6 +381,7 @@
                                                                                
                                         $interval,
                                                                                
                                         $step == 3);
                                }
+                $this->bo->so->update_id_string();
                        }
                        $this->flash_form_errors($errors);
                        self::render_template('season_generate', array('season' 
=> $season, 

Modified: branches/Version-1_0-branch/booking/js/booking/schedule.js
===================================================================
--- branches/Version-1_0-branch/booking/js/booking/schedule.js  2011-05-24 
06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/js/booking/schedule.js  2011-05-24 
07:06:49 UTC (rev 7297)
@@ -37,12 +37,12 @@
                YAHOO.util.Dom.addClass(elCell, color);
                YAHOO.util.Dom.addClass(elCell, booking.type);
                if (booking.is_public == 0) {
-                       elCell.innerHTML = YAHOO.booking.shorten('Privat arr.', 
12);
+                       elCell.innerHTML = YAHOO.booking.shorten('Privat arr.', 
9);
                } else {
                        if (booking.shortname)
-                               elCell.innerHTML = 
YAHOO.booking.shorten(booking.shortname, 12);
+                               elCell.innerHTML = 
YAHOO.booking.shorten(booking.shortname, 9);
                        else    
-                               elCell.innerHTML = 
YAHOO.booking.shorten(booking.name, 12);
+                               elCell.innerHTML = 
YAHOO.booking.shorten(booking.name, 9);
                }
                elCell.onclick = function() 
{YAHOO.booking.showBookingInfo(booking,elCell); return false; };
        }
@@ -84,9 +84,9 @@
                var link = null;
        }
        if (booking.shortname)
-               var html = YAHOO.booking.link(booking.shortname, link, 12);
+               var html = YAHOO.booking.link(booking.shortname, link, 9);
        else 
-               var html = YAHOO.booking.link(booking.name, link, 12);
+               var html = YAHOO.booking.link(booking.name, link, 9);
 
        if(booking.type == 'event' && booking.conflicts) {
                for(var i=0; i<booking.conflicts.length;i++) {
@@ -119,9 +119,9 @@
                var color = colorMap[booking.name];
                YAHOO.util.Dom.addClass(elCell, color);
                if (booking.shortname)
-                       elCell.innerHTML = 
YAHOO.booking.link(booking.shortname, null, 12);
+                       elCell.innerHTML = 
YAHOO.booking.link(booking.shortname, null, 9);
                else
-                       elCell.innerHTML = YAHOO.booking.link(booking.name, 
null, 12);
+                       elCell.innerHTML = YAHOO.booking.link(booking.name, 
null, 9);
        }
        else {
                elCell.innerHTML = '...';

Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2011-05-24 
06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang     2011-05-24 
07:06:49 UTC (rev 7297)
@@ -492,7 +492,7 @@
 Activity       booking no      Aktiviteter
 Not selected   booking no      Ikke valgt
 Delete until   booking no      Slett til
-Recurring allocation deletion  booking no      Slettings intervall
+Recurring allocation deletion  booking no      Slett i intervall
 Delete allocation      booking no      Slett tildeling
 Delete allocations     booking no      Slett tildelinger
 Delete booking booking no      Slett booking
@@ -513,4 +513,5 @@
 Show messages  booking no      Vis beskjeder
 Internal account       booking no      Intern kontering
 Internal customer output format        booking no      Intern kunde eksport 
format
-Internal_account_helptext      booking no      Data som brukes for faktura 
eksport av interne kunder 
+Internal_account_helptext      booking no      Data som brukes for faktura 
eksport av interne kunder
+searchfield    booking no      Fritekstsøk

Modified: branches/Version-1_0-branch/booking/templates/base/application.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/application.xsl  
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/booking/templates/base/application.xsl  
2011-05-24 07:06:49 UTC (rev 7297)
@@ -142,16 +142,14 @@
                                        bookingParams[<xsl:value-of 
select="id"/>] = <xsl:value-of select="booking_params"/>;
                                        eventParams[<xsl:value-of 
select="id"/>] = <xsl:value-of select="event_params"/>;
                                </script>
-                               <select name="create" 
onchange="if(this.selectedIndex==1) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uievent.add', 
eventParams[{id}]); if(this.selectedIndex==2) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uibooking.add', 
eventParams[{id}]); if(this.selectedIndex==3) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uiallocation.add', 
allocationParams[{id}])">
+                               <select name="create" 
onchange="if(this.selectedIndex==1) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uiallocation.add', 
allocationParams[{id}]); if(this.selectedIndex==2) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uibooking.add', 
eventParams[{id}]); if(this.selectedIndex==3) 
YAHOO.booking.postToUrl('index.php?menuaction=booking.uievent.add', 
eventParams[{id}]);">
                                        <xsl:if 
test="not(../case_officer/is_current_user)">
                                                <xsl:attribute 
name="disabled">disabled</xsl:attribute>         
                                        </xsl:if>
                                        
                                        <option><xsl:value-of 
select="php:function('lang', '- Actions -')" /></option>
-<!--
                                        <option><xsl:value-of 
select="php:function('lang', 'Create allocation')" /></option>
                                        <option><xsl:value-of 
select="php:function('lang', 'Create booking')" /></option>
--->
                                        <option><xsl:value-of 
select="php:function('lang', 'Create event')" /></option>
                                </select>
                                </xsl:if>

Modified: branches/Version-1_0-branch/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/inc/class.uisearch.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/bookingfrontend/inc/class.uisearch.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -27,11 +27,11 @@
                        {
                                $search = array(
                                        'results'    => 
$this->bo->search($searchterm),
-                                       'searchterm' => $searchterm,
+                                       'searchterm' => $searchterm
                                );
                        }
                        
-                       $params = is_null($search) ? array() : array('search' 
=> $search);
+                       $params = is_null($search) ? array('frontimage' => 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/bkbooking/images/newlayout/forsidebilde.jpg")
 : array('search' => $search);
 
                        self::render_template('search', $params);
                }

Modified: branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang     
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang     
2011-05-24 07:06:49 UTC (rev 7297)
@@ -324,8 +324,12 @@
 Agegroups kan not be larger than 9999 peoples  bookingfrontend no      
Estimert antall deltakere kan ikke være større en 9999 personer
 Contact information name is to long. max 50 characters bookingfrontend no      
Navn i kontakt informasjon er for langt. Maks 50 tegn
 Unable to fill report  bookingfrontend no      Greide ikke å fylle ut rapport
-Cancel booking bookingfrontend no      Avbestill booking
-Cancel allocation      bookingfrontend no      Avbestill tildeling
+Cancel until   bookingfrontend no      Avbestill til
+Cancel booking bookingfrontend no      Avbestill
+Cancel bookings        bookingfrontend no      Avbestill bookinger
+Cancel allocation also bookingfrontend no      Avbestill følgende 
+Recurring allocation cancelation       bookingfrontend no      Avbestill i 
intervall
+Cancel allocations     bookingfrontend no      Avbestill tildelinger
 Cancelation of allocation from bookingfrontend no      Avbestilling av 
tildeling fra
 Cancelation of booking from    bookingfrontend no      Avbestilling av booking 
fra
 To cancel booking use this link        bookingfrontend no      For å slette 
bookingen bruk lenken

Modified: 
branches/Version-1_0-branch/bookingfrontend/templates/base/booking_cancel.xsl
===================================================================
--- 
branches/Version-1_0-branch/bookingfrontend/templates/base/booking_cancel.xsl   
    2011-05-24 06:51:05 UTC (rev 7296)
+++ 
branches/Version-1_0-branch/bookingfrontend/templates/base/booking_cancel.xsl   
    2011-05-24 07:06:49 UTC (rev 7297)
@@ -2,7 +2,7 @@
     <div id="content">
 
        <dl class="form">
-       <dt class="heading"><xsl:value-of select="php:function('lang', 'Cancel 
Booking')"/></dt>
+       <dt class="heading"><xsl:value-of select="php:function('lang', 'Cancel 
bookings')"/></dt>
        </dl>
     <xsl:call-template name="msgbox"/>
        <xsl:call-template name="yui_booking_i18n"/>
@@ -34,7 +34,7 @@
                     <xsl:value-of select="booking/to_"/>
                 </div>
             </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation deletion')" /></label></dt>
+                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation cancelation')" 
/></label></dt>
                        <dd>
                                <label>
                                        <input type="checkbox" name="outseason" 
id="outseason">
@@ -52,7 +52,7 @@
                                                        <xsl:attribute 
name="checked">checked</xsl:attribute>
                                                </xsl:if>
                                        </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Delete until')" />
+                                       <xsl:value-of 
select="php:function('lang', 'Cancel until')" />
                                </label>
                        </dd>
                        <dd class="date-picker">
@@ -100,15 +100,24 @@
             <dd>
                         <xsl:value-of select="booking/season_name"/>
             </dd>
-                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Delete allocation also')" /></label></dt>
+                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Cancel allocation also')" /></label></dt>
                        <dd>
                                <label>
+                                       <input type="checkbox" 
name="delete_booking" id="delete_booking">
+                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                                       <xsl:attribute 
name="disabled">disabled</xsl:attribute>
+                                       </input>
+                                       <xsl:value-of 
select="php:function('lang', 'Cancel bookings')" />
+                               </label>
+                       </dd>
+                       <dd>
+                               <label>
                                        <input type="checkbox" 
name="delete_allocation" id="delete_allocation">
                                                <xsl:if 
test="delete_allocation='on'">
                                                        <xsl:attribute 
name="checked">checked</xsl:attribute>
                                                </xsl:if>
                                        </input>
-                                       <xsl:value-of 
select="php:function('lang', 'Delete allocations')" />
+                                       <xsl:value-of 
select="php:function('lang', 'Cancel allocations')" />
                                </label>
                        </dd>
         </dl>
@@ -137,7 +146,7 @@
         YAHOO.booking.group_id = '<xsl:value-of select="booking/group_id"/>';
         <![CDATA[
         var descEdit = new YAHOO.widget.SimpleEditor('field-message', {
-            height: '300px',
+            height: '150px',
             width: '522px',
             dompath: true,
             animate: true,

Modified: branches/Version-1_0-branch/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/templates/base/search.xsl       
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/bookingfrontend/templates/base/search.xsl       
2011-05-24 07:06:49 UTC (rev 7297)
@@ -34,18 +34,19 @@
        
        <xsl:if test="not(search)">     
                <div id="cloud">
-                       <div>Velkommen til Bergen kommune og <strong 
style="font-size: 120%">AktivBy</strong>.</div>
-                       <div>Her finner du informasjon om bygg, anlegg</div>
-                       <div>som leies ut av <strong>Idrett, Kultur</strong> og 
<strong>Grønn</strong> etat.</div>
-                       <div>Bruk <strong>søkefeltet</strong> til å finne det 
du ønsker informasjon om.</div>
-                       <div>Det enkelte bygg, anlegg har en 
<strong>kalender</strong> hvor du får</div>
-                       <div>oversikt over aktiviteter og hvilke tider som er 
<strong>ledige</strong> for leie/bruk.</div>
-                       <div>Ønsker du å søke om leie/bruk gjør du det fra 
kalenderen.</div>
+               <div>Velkommen til Bergen kommune og AktivBy.<br />
+                       Her finner du informasjon om bygg, anlegg<br />
+                       som leies ut av Idrett, Kultur og Grønn etat.</div>
                
-                       <div>Du kan også finne <strong>informasjon</strong> om 
aktiviteter,</div>
-                       <div>åpen hall, <strong>publikumstid</strong> i 
svømmehaller og <strong>kulturarrangementer</strong>.</div>
-               
                </div>
+               <div style="text-align:center;">
+                       <img alt="" >
+                               <xsl:attribute name="src">
+                                       <xsl:value-of select="frontimage"/> 
+                               </xsl:attribute>
+                       </img>
+               </div>  
+
        </xsl:if>
        
        <xsl:if test="search">  

Modified: 
branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css   
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css   
2011-05-24 07:06:49 UTC (rev 7297)
@@ -275,3 +275,96 @@
 .yui-skin-sam .yui-dt TABLE TD{
        border: none !important;
 }
+
+body{
+color: #575757;
+margin:0;
+padding:0;
+width:100%;
+height:100%;
+background: #fff url('../images/newlayout/bodyBg.gif') repeat-x;text-align: 
center;width:100%;
+}
+
+#wrapper{
+background-color: #fff;
+width: 1000px;
+textalign: left;
+margin: 0 auto;
+overflow: hidden;
+padding: 0 0px 40px;
+}
+
+#header{
+overflow: hidden;
+line-height: 1;
+width: 1000px;
+background-image: none !important;
+height: 130px !important;
+}
+
+#login-bar{
+margin-top:10px;
+}
+
+#login-bar a{
+border-right: 1px solid #575757;
+padding: 0 0.5em;
+line-height: 1.2em;
+}
+
+#logo{
+background: url(../images/newlayout/logo.png) no-repeat;
+float: left;
+height: 75px;
+width: 102px;
+margin: 14px 0 0 49px !important;
+}
+
+#centerimage{
+display: block !important;
+margin-right: 5px !important;
+width: 172px !important;
+height: 108px !important;
+background: url(../images/newlayout/aktivby_logo.jpg) no-repeat !important;
+background-position: bottom center !important;
+padding: 22px 0px 0px 150px !important;
+}
+
+#header-search{
+margin: -3em 1em 1em 1em;
+}
+
+#frontend{
+background-image: url(../images/newlayout/pageContainerBg.gif);
+background-repeat: repeat-x;
+}
+
+#line{
+border-top: 5px solid #B11F24; 
+clear: left;
+height: 30px;
+width: 960px;
+margin-left: 20px;
+}
+ #content{
+text-align:left;
+}
+
+#cloud{
+text-align:left;
+margin-left: 280px;
+}
+
+#footer{
+border: none !important;
+background:url('../images/newlayout/footerFjell_inkl_bunnlinje.gif') no-repeat 
scroll center top transparent;
+clear:both;
+overflow:auto;
+height:160px;
+}
+
+#footer_address{
+padding-top: 1.5em;
+}
+
+

Modified: branches/Version-1_0-branch/phpgwapi/templates/bkbooking/footer.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/footer.tpl 
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/footer.tpl 
2011-05-24 07:06:49 UTC (rev 7297)
@@ -1,3 +1,10 @@
                </div>
+<div id="footer">
+
+</div>
+<div id="footer_address">
+Bergen kommune | R&aring;dhusgt 10 | Postboks 7700 | 5020 Bergen
+</div>
+
        </body>
-</html>
\ No newline at end of file
+</html>

Modified: branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php       
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php       
2011-05-24 07:06:49 UTC (rev 7297)
@@ -117,6 +117,10 @@
        $app = lang($app);
        $tpl_vars = array
        (
+               'manual_text'   => lang('manual'),
+               'manual_url'    => 'logout.php',
+               'help_text'     => lang('help'),
+               'help_url'              => 'logout.php',
                'css'                   => $GLOBALS['phpgw']->common->get_css(),
                'javascript'    => $GLOBALS['phpgw']->common->get_javascript(),
                'img_icon'      => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),

Modified: branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.tpl   
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.tpl   
2011-05-24 07:06:49 UTC (rev 7297)
@@ -33,9 +33,9 @@
     <div id="wrapper">
     <div id="header">
        <div id="login-bar">
-               <a href="{login_url}">{login_text}</a>
+               <a href="{manual_url}">{manual_text}</a> <a 
href="{help_url}">{help_text}</a> <a href="{login_url}">{login_text}</a>
        </div>
-        <a href="index.php?menuaction=bookingfrontend.uisearch.index"><div 
id="logo" style="background: url({logofile}) no-repeat"></div></a>
+        <a href="index.php?menuaction=bookingfrontend.uisearch.index"><div 
id="logo"></div></a>
                <div id="centerimage"></div>
                <form action="index.php" method="get" id="header-search" 
class="{header_search_class}">
                        <input type="hidden" name="menuaction" 
value="bookingfrontend.uisearch.index" />
@@ -45,4 +45,5 @@
                </form>
     </div>
 <div class="yui-skin-sam" id='frontend'>
+<div id="line"></div>
   <div style='margin:0; padding: 0; line-height: 0'>&nbsp;</div>

Modified: branches/Version-1_0-branch/rental/inc/class.uibilling.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uibilling.inc.php      
2011-05-24 06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/rental/inc/class.uibilling.inc.php      
2011-05-24 07:06:49 UTC (rev 7297)
@@ -47,11 +47,13 @@
                                $existing_billing = 0;
                        }
                        $contract_ids = phpgw::get_var('contract'); // Ids of 
the contracts to bill
+                       
                        $contract_ids_override = 
phpgw::get_var('override_start_date'); //Ids of the contracts that should 
override billing start date with first day in period
                        $contract_bill_only_one_time = 
phpgw::get_var('bill_only_one_time');
                        if(($contract_ids != null && is_array($contract_ids) && 
count($contract_ids) > 0) || (isset($contract_bill_only_one_time) && 
is_array($contract_bill_only_one_time) && count($contract_bill_only_one_time) > 
0)) // User submitted contracts to bill
                        {
                                $missing_billing_info = 
rental_sobilling::get_instance()->get_missing_billing_info(phpgw::get_var('billing_term'),
 phpgw::get_var('year'), phpgw::get_var('month'), $contract_ids, 
$contract_ids_override, phpgw::get_var('export_format'));
+                               
                                if($missing_billing_info == null || 
count($missing_billing_info) == 0)
                                {
                                        $billing_job = 
rental_sobilling::get_instance()->create_billing(isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['currency_decimal_places'])
 ? 
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['currency_decimal_places'])
 : 2, phpgw::get_var('contract_type'), phpgw::get_var('billing_term'), 
phpgw::get_var('year'), phpgw::get_var('month'), phpgw::get_var('title'), 
$GLOBALS['phpgw_info']['user']['account_id'], $contract_ids, 
$contract_ids_override, phpgw::get_var('export_format'), $existing_billing, 
$contract_bill_only_one_time);
@@ -176,16 +178,17 @@
                                $title = $billing_tmp->get_title();
                        }
                        
+                                       
                        //Check to see if the period har been billed before
                        
if(rental_sobilling::get_instance()->has_been_billed($contract_type, 
$billing_term, $year, $month)) // Checks if period has been billed before
-                       {
+                       {       
                                // We only give a warning and let the user go 
to step 2
                                $warningMsgs[] = lang('the period has been 
billed before.');
                        }
                        else
                        {
                                //... and if not start retrieving contracts for 
billing
-                               
+                       
                                $socontract_price_item = 
rental_socontract_price_item::get_instance();
                                
                                //... 1. Contracts following regular billing 
cycle
@@ -213,7 +216,7 @@
                                        }
                                }
                
-                               
+                       
                                // Get the number of months in selected term 
for contract
                                $months = 
rental_socontract::get_instance()->get_months_in_term($billing_term);
                                
@@ -225,15 +228,26 @@
                                {       
                                        if(isset($contract))
                                        {
-                                               
                                                $total_price = 
$socontract_price_item->get_total_price_invoice($contract->get_id(), 
$billing_term, $month, $year);
                                                $type_id = 
$contract->get_contract_type_id();
+                                               $responsible_type_id = 
$contract->get_location_id();
                                                
+                                               // Gets location title from 
table rental_contract_responsibility
+                                               $location_title = 
rental_socontract::get_instance()->get_responsibility_title($responsible_type_id);
+                                               
                                                if($type_id == 4) // Remove 
contract of a specific type (KF)
                                                {
                                                        $warningMsgs[] = 
lang('billing_removed_KF_contract') . " " . $contract->get_old_contract_id();
                                                        unset($contracts[$id]);
                                                        
$removed_contracts[$contract->get_id()] = $contract;
+                                               }
+                                               // A contract with 
responibility type contract_type_eksternleie must have a rental_contract_type 
+                                               else if( ($type_id == 0 && 
strcmp($location_title, "contract_type_eksternleie") == 0) || (empty($type_id) 
&& strcmp($location_title, "contract_type_eksternleie") == 0 )) 
+                                               {
+                                                       
$contract->set_total_price($total_price);
+                                                       $warningMsgs[] = 
lang('billing_removed_contract_part_1') . " " . 
$contract->get_old_contract_id() . " " . 
lang('billing_removed_external_contract');
+                                                       unset($contracts[$id]);
+                                                       
$removed_contracts[$contract->get_id()] = $contract;
                                                } 
                                                else if(isset($total_price) && 
$total_price == 0) // Remove contract if total price is equal to zero
                                                {

Modified: branches/Version-1_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2011-05-24 
06:51:05 UTC (rev 7296)
+++ branches/Version-1_0-branch/rental/setup/phpgw_no.lang      2011-05-24 
07:06:49 UTC (rev 7297)
@@ -67,10 +67,11 @@
 billing_start  rental  no      Fakturastart
 billing_term   rental  no      Termin
 billing_terms  rental  no      Terminer
-billing_unit   rental  no      Ansvar-/tjenestested
+billing_unit   rental  no      Ansvar-/tjenestested    
 billing_removed_KF_contract    rental  no      Fjernet KF-kontrakt med id
 billing_removed_contract_part_1        rental  no      Fjernet kontrakt
 billing_removed_contract_part_2        rental  no      med total pris lik 0 
kroner
+billing_removed_external_contract      rental  no      siden kontrakt med 
ansvarsområde eksternleie mangler kontrakttype
 bill   rental  no      Faktura
 bill2  rental  no      Fakturér
 btn_add        rental  no      Deleger tilgang til bruker




reply via email to

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