fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7349] Merge 7339:7348 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7349] Merge 7339:7348 from trunk
Date: Mon, 06 Jun 2011 09:23:43 +0000

Revision: 7349
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7349
Author:   sigurdne
Date:     2011-06-06 09:23:43 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Merge 7339:7348 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/activitycalendarfrontend/inc/class.uiactivity.inc.php
    branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
    branches/Version-1_0-branch/booking/inc/class.menu.inc.php
    branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
    branches/Version-1_0-branch/booking/templates/base/group_edit.xsl
    branches/Version-1_0-branch/booking/templates/base/organization_edit.xsl
    branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
    branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.setup_process.inc.php
    branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css
    branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php
    branches/Version-1_0-branch/property/inc/class.soentity.inc.php
    branches/Version-1_0-branch/property/inc/class.soexportentity.inc.php

Added Paths:
-----------
    branches/Version-1_0-branch/activitycalendarfrontend/templates/base/

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,7281-7332,7334-7338
   + 
/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-7332,7334-7338,7340-7348

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2011-06-06 09:23:43 UTC (rev 7349)
@@ -194,6 +194,7 @@
                        $columns[] = 'activity.contact_person_1';
                        $columns[] = 'activity.contact_person_2';
                        $columns[] = 'activity.special_adaptation';
+                       $columns[] = 'activity.secret';
                        
                        $cols = implode(',',$columns);
                }
@@ -358,6 +359,7 @@
                        
$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'));
                        
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
 'bool')));
+                       
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
                }
                return $activity;
        }

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2011-06-06 09:23:43 UTC (rev 7349)
@@ -93,17 +93,18 @@
                $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('edit');
                // Get the contract part id
                $activity_id = (int)phpgw::get_var('id');
+               $so_activity = activitycalendar_soactivity::get_instance();
                //var_dump($activity_id);
                
-               $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()->get_districts();
+               $categories = $so_activity->get_categories();
+               $targets = $so_activity->get_targets();
+               $offices = $so_activity->select_district_list();
+               $districts = $so_activity->get_districts();
                                
                // 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); 
+                       $activity = $so_activity->get_single($activity_id); 
                }
                else
                {
@@ -149,7 +150,7 @@
                                $activity->set_contact_persons($persons);
                                
$activity->set_special_adaptation(phpgw::get_var('special_adaptation'));
                                
-                               
if(activitycalendar_soactivity::get_instance()->store($activity)) // ... and 
then try to store the object
+                               if($so_activity->store($activity)) // ... and 
then try to store the object
                                {
                                        $message = lang('messages_saved_form'); 
                                }
@@ -160,7 +161,7 @@
 
                                if($new_state == 3 || $new_state == 4 || 
$new_state == 5 )
                                {
-                                       $kontor = 
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
+                                       $kontor = 
$so_activity->get_office_name($activity->get_office());
                                        $subject = "Melding fra AktivBy";
                                        $body = lang('mail_body_state_' . 
$new_state, $kontor);
                                        
@@ -347,7 +348,7 @@
                        try
                        {
                                //var_dump('inne i try');
-                               $GLOBALS['phpgw']->send->msg('email', 
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'plain');
+                               $GLOBALS['phpgw']->send->msg('email', 
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'html');
                        }
                        catch (phpmailerException $e)
                        {
@@ -377,7 +378,7 @@
                {
                        try
                        {
-                               $send->msg('email', $mailtoAddress, $subject, 
$body, '', '', '', $from, '', 'plain');
+                               $send->msg('email', $mailtoAddress, $subject, 
$body, '', '', '', $from, '', 'html');
                        }
                        catch (phpmailerException $e)
                        {

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-06-06 08:47:21 UTC (rev 7348)
+++ 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php   
    2011-06-06 09:23:43 UTC (rev 7349)
@@ -26,6 +26,7 @@
                protected $contact_person_1;
                protected $contact_person_2;
                protected $special_adaptation;
+               protected $secret;
                
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
@@ -181,6 +182,13 @@
                
                public function get_special_adaptation() { return 
$this->special_adaptation; }
                
+               public function set_secret($secret)
+               {
+                       $this->secret = $secret;
+               }
+               
+               public function get_secret() { return $this->secret; }
+               
                /**
                 * Get a static reference to the storage object associated with 
this model object
                 * 

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendarfrontend/inc/class.uiactivity.inc.php
   2011-06-06 08:47:21 UTC (rev 7348)
+++ 
branches/Version-1_0-branch/activitycalendarfrontend/inc/class.uiactivity.inc.php
   2011-06-06 09:23:43 UTC (rev 7349)
@@ -1,6 +1,8 @@
 <?php
        phpgw::import_class('activitycalendar.uiactivities');
        phpgw::import_class('activitycalendar.soactivity');
+       
+       include_class('activitycalendar', 'activity', 'inc/model/');
 
        class activitycalendarfrontend_uiactivity extends 
activitycalendar_uiactivities
        {
@@ -11,19 +13,43 @@
                        'view'                  =>      true,
                        'index'                 =>      true
                );
+               
+               function view()
+               {
+                       $errorMsgs = array();
+                       $infoMsgs = array();
+                       $activity = 
activitycalendar_soactivity::get_instance()->get_single((int)phpgw::get_var('id'));
+                       
+                       if($activity == null) // Not found
+                       {
+                               $errorMsgs[] = lang('Could not find specified 
activity.');
+                       }
+       
+                       $data = array
+                       (
+                               'activity' => $activity,
+                               'errorMsgs' => $errorMsgs,
+                               'infoMsgs' => $infoMsgs
+                       );
+                       $this->render('activity.php', $data);
+               }
 
                function edit()
                {
                        $id = intval(phpgw::get_var('id', 'GET'));
-                       var_dump($id);
+                       //var_dump($id);
                        $so = activitycalendar_soactivity::get_instance();
                        $activity = $so->get_single($id);
+                       
+                       //var_dump(phpgw::get_var('secret', 'GET'));
+                       //var_dump($activity->get_secret());
 
                        if($activity->get_secret() != phpgw::get_var('secret', 
'GET'))
                        {
                                $this->redirect(array('menuaction' => 
'bookingfrontend.uisearch.index'));
                        }
                        
+                       //var_dump($activity->get_title());
                        //$this->redirect(array('menuaction' => 
'activitycalendar.uiactivities.edit', 'id' => $id, 'frontend' => 'true'));
                                                
 /*                     $application['resource_ids'] = $resource_ids;
@@ -33,6 +59,29 @@
                        $audience = $audience['results'];
                        self::render_template('application', 
array('application' => $application, 'audience' => $audience, 'agegroups' => 
$agegroups, 'frontend'=>'true'));
 */
+                       $categories = $so->get_categories();
+                       $targets = $so->get_targets();
+                       $offices = $so->select_district_list();
+                       $districts = $so->get_districts();
+                       $arenas = 
activitycalendar_soarena::get_instance()->get(null, null, null, null, null, 
null, null);
+                       $organizations = 
activitycalendar_soorganization::get_instance()->get(null, null, null, null, 
null, null, null);
+                       $groups = 
activitycalendar_sogroup::get_instance()->get(null, null, null, null, null, 
null, null);
+
+                       $this->render('activity.php', array
+                                               (
+                                                       'activity'      => 
$activity,
+                                                       'organizations' => 
$organizations,
+                                                       'groups' => $groups,
+                                                       'arenas' => $arenas,
+                                                       'categories' => 
$categories,
+                                                       'targets' => $targets,
+                                                       'districts' => 
$districts,
+                                                       'offices' => $offices,
+                                                       'editable' => true,
+                                                       'message' => 
isset($message) ? $message : phpgw::get_var('message'),
+                                                       'error' => 
isset($error) ? $error : phpgw::get_var('error')
+                                               )
+                       );
                }
                
                function index()

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2011-06-06 09:23:43 UTC (rev 7349)
@@ -1,2 +1,48 @@
 activitycalendarfrontend       common  no      Aktivitetsoversikt Frontend
-Activitycalendarfrontend       common  no      Aktivitetsoversikt Frontend
\ No newline at end of file
+Activitycalendarfrontend       common  no      Aktivitetsoversikt Frontend
+office activitycalendarfrontend        no      Kontor
+arena  activitycalendarfrontend        no      Arena
+description    activitycalendarfrontend        no      Beskrivelse
+date_start     activitycalendarfrontend        no      Startdato
+date_end       activitycalendarfrontend        no      Sluttdato
+special_adaptation     activitycalendarfrontend        no      Spesielt 
tilpasset for utviklingshemmede
+target activitycalendarfrontend        no      Målgruppe
+contact_person_1       activitycalendarfrontend        no      Kontaktperson 1
+contact_person_2       activitycalendarfrontend        no      Kontaktperson 2
+Activities     activitycalendarfrontend        no      Aktiviteter
+activities     activitycalendarfrontend        no      Aktiviteter
+Arena  activitycalendarfrontend        no      Arena
+arenas activitycalendarfrontend        no      Arena
+OrganizationList       activitycalendarfrontend        no      
Organisasjoner/Grupper
+f_new_activity activitycalendarfrontend        no      Ny aktivitet
+f_new_arena    activitycalendarfrontend        no      Ny arena
+search_for     activitycalendarfrontend        no      Søk etter
+activity_type  activitycalendarfrontend        no      Aktivitetstype
+all    activitycalendarfrontend        no      Alle
+not_internal   activitycalendarfrontend        no      Ikke intern
+organization_id        activitycalendarfrontend        no      Organisasjon ID
+arena_type     activitycalendarfrontend        no      Arenatype
+internal_arena_id      activitycalendarfrontend        no      Intern arena ID
+reset  activitycalendarfrontend        no      Nullstill
+organization_number    activitycalendarfrontend        no      
Organisasjonsnummer
+elements_pr_page       activitycalendarfrontend        no      elementer per 
side
+shows_from     activitycalendarfrontend        no      Viser fra
+of_total       activitycalendarfrontend        no      av totalt
+DATATABLE_MSG_EMPTY    activitycalendarfrontend        no      Ingen elementer
+export_to      activitycalendarfrontend        no      Eksporter til
+activity_state activitycalendarfrontend        no      Status
+processed      activitycalendarfrontend        no      Behandlet
+show   activitycalendarfrontend        no      Vis
+last_change_date       activitycalendarfrontend        no      Sist endret
+first  activitycalendarfrontend        no      Første
+last   activitycalendarfrontend        no      Siste
+previous       activitycalendarfrontend        no      Forrige
+state  activitycalendarfrontend        no      Status
+state_0        activitycalendarfrontend        no      Ingen
+state_1        activitycalendarfrontend        no      Ny
+state_2        activitycalendarfrontend        no      Endring
+state_3        activitycalendarfrontend        no      Akseptert
+state_4        activitycalendarfrontend        no      Behandlet
+state_5        activitycalendarfrontend        no      Avvist
+district       activitycalendarfrontend        no      Bydel
+title  activitycalendarfrontend        no      Tittel
\ No newline at end of file

Modified: branches/Version-1_0-branch/booking/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.menu.inc.php  2011-06-06 
08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/booking/inc/class.menu.inc.php  2011-06-06 
09:23:43 UTC (rev 7349)
@@ -3,6 +3,9 @@
        {
                function get_menu()
                {
+                       $bodoc = CreateObject('booking.bodocumentation');
+                       $manual  =  $bodoc->so->getBackendDoc();        
+
                        $incoming_app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $GLOBALS['phpgw_info']['flags']['currentapp'] = 
'booking';
                        $menus = array();
@@ -17,7 +20,7 @@
                                        'order' => 10,
                                        'group' => 'office'
                                )
-                       );
+               );
 
                        $menus['navigation'] =  array
                        (
@@ -277,6 +280,15 @@
                                                        ),
                                                )
                                        );
+                                       if ($manual !== null)
+                                       {
+                                               
$menus['navigation']['documentation'] = array
+                                               (
+                                                       'text'  => 
lang('Documentation'),
+                                                       'url'   => $manual,
+                                                       'image' => 
array('property', 'documentation'),
+                                               );
+                                       }
                        }
 
                        if ( $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin')
@@ -321,6 +333,8 @@
                                        ),
                                );
                        }
+
+                       
                        $menus['folders'] = 
phpgwapi_menu::get_categories('bergen');
 
                        $GLOBALS['phpgw_info']['flags']['currentapp'] = 
$incoming_app;

Modified: branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/booking/inc/class.uievent.inc.php       
2011-06-06 09:23:43 UTC (rev 7349)
@@ -579,7 +579,7 @@
                                                        {
                                                                
$comment_text_log = phpgw::get_var('mail', 'POST');
                                                                
$this->send_mailnotification($event['contact_email'], lang('Event changed'), 
$comment_text_log);
-                                                               $comment = 
$comment_text_log.' Denne er sendt til '.$event['contact_email'];
+                                                               $comment = 
$comment_text_log.'. Denne er sendt til '.$event['contact_email'];
                                                                
$this->add_comment($event,$comment);                    
                
                                                        }
@@ -616,7 +616,7 @@
                                                                } 
                                                                else 
                                                                {
-                                                                       
$comment = $comment_text_log.' Denne er sendt til '.$mail_sendt_to;
+                                                                       
$comment = $comment_text_log.'. Denne er sendt til '.$mail_sendt_to;
                                                                        
$this->add_comment($event,$comment);                    
                                                                }
                                                                

Modified: branches/Version-1_0-branch/booking/templates/base/group_edit.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/group_edit.xsl   
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/booking/templates/base/group_edit.xsl   
2011-06-06 09:23:43 UTC (rev 7349)
@@ -77,6 +77,7 @@
                                        </select>
                                </dd>
                        </xsl:if>
+                       <xsl:if test="not(new_form) and (currentapp = 
'booking')">
                        <dt><label for="field_show_in_portal"><xsl:value-of 
select="php:function('lang', 'Show in portal')"/></label></dt>
                        <dd>
                           <select id="field_show_in_portal" 
name="show_in_portal">
@@ -94,6 +95,7 @@
                               </option>
                           </select>
                        </dd>
+                       </xsl:if>
                </dl>
                
                <div style='clear:left; padding:0; margin:0'/>

Modified: 
branches/Version-1_0-branch/booking/templates/base/organization_edit.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/organization_edit.xsl    
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/booking/templates/base/organization_edit.xsl    
2011-06-06 09:23:43 UTC (rev 7349)
@@ -81,21 +81,6 @@
                     <input name="customer_number" type="text" 
id="field_customer_number" readonly="true" 
value="{organization/customer_number}"/>
                 </xsl:if>
             </dd>
-                       <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
-                       <dd>
-                               <select name="activity_id" id="field_activity">
-                                       <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
-                                       <xsl:for-each select="activities">
-                                               <option>
-                                                       <xsl:if 
test="../organization/activity_id = id">
-                                                               <xsl:attribute 
name="selected">selected</xsl:attribute>
-                                                       </xsl:if>
-                                                       <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
-                                                       <xsl:value-of 
select="name"/>
-                                               </option>
-                                       </xsl:for-each>
-                               </select>
-                       </dd>
                        <dt><label for="field_homepage"><xsl:value-of 
select="php:function('lang', 'Homepage')" /></label></dt>
                        <dd>
                            <input id="field_homepage" name="homepage" 
type="text">
@@ -114,6 +99,21 @@
                                <xsl:attribute name="value"><xsl:value-of 
select="organization/email"/></xsl:attribute>
                            </input>
                        </dd>
+                       <dt><label for="field_activity"><xsl:value-of 
select="php:function('lang', 'Activity')" /></label></dt>
+                       <dd>
+                               <select name="activity_id" id="field_activity">
+                                       <option value=""><xsl:value-of 
select="php:function('lang', '-- select an activity --')" /></option>
+                                       <xsl:for-each select="activities">
+                                               <option>
+                                                       <xsl:if 
test="../organization/activity_id = id">
+                                                               <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                                       </xsl:if>
+                                                       <xsl:attribute 
name="value"><xsl:value-of select="id"/></xsl:attribute>
+                                                       <xsl:value-of 
select="name"/>
+                                               </option>
+                                       </xsl:for-each>
+                               </select>
+                       </dd>
 
 
                        <dt><label for="field_description"><xsl:value-of 
select="php:function('lang', 'Description')" /></label></dt>
@@ -169,6 +169,7 @@
                           </select>
                        </dd>
                        </xsl:if>
+                       <xsl:if test="not(new_form) and (currentapp = 
'booking')">
                        <dt><label for="field_show_in_portal"><xsl:value-of 
select="php:function('lang', 'Show in portal')"/></label></dt>
                        <dd>
                           <select id="field_show_in_portal" 
name="show_in_portal">
@@ -186,6 +187,7 @@
                               </option>
                           </select>
                        </dd>
+                       </xsl:if>
                </dl>
 
                <div style='clear:left; padding:0; margin:0'/>

Modified: branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang     
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang     
2011-06-06 09:23:43 UTC (rev 7349)
@@ -335,4 +335,4 @@
 To cancel booking use this link        bookingfrontend no      For å slette 
bookingen bruk lenken
 To cancel allocation use this link     bookingfrontend no      For å slette 
tildelingen bruk lenken
 manual common  no      Veiledning lag og organisasjoner
-
+Cancel allocation      bookingfrontend no      Avbestill tildelinger

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2011-06-06 09:23:43 UTC (rev 7349)
@@ -308,7 +308,7 @@
                */
                public function query($sql, $line = '', $file = '', $exec = 
false, $fetch_single = false)
                {
-
+//_Debug_Array($sql);
                        $this->_get_fetchmode();
                        $this->fetch_single = $fetch_single;
 
@@ -319,7 +319,7 @@
 
                        if(!$exec)
                        {
-                               if(preg_match('/(^INSERT INTO|^DELETE 
FROM|^CREATE TABLE|^DROP TABLE|^ALTER TABLE|^UPDATE)/i', $sql)) // need it for 
MySQL
+                               if(preg_match('/(^INSERT INTO|^DELETE 
FROM|^CREATE|^DROP|^ALTER|^UPDATE)/i', $sql)) // need it for MySQL and Oracle
                                {
                                        $exec = true;
                                }
@@ -564,18 +564,22 @@
                public function transaction_abort()
                {
                        $ret = false;
-                       $this->Transaction = false;
-                       try
+
+                       if($this->Transaction)
                        {
-                               $ret = $this->db->rollBack();
-                       }
-                       catch(PDOException $e)
-                       {
-                               if ( $e )
+                               $this->Transaction = false;
+                               try
                                {
-                                       trigger_error('Error: ' . 
$e->getMessage(), E_USER_ERROR);
-       //                              throw $e;
+                                       $ret = $this->db->rollBack();
                                }
+                               catch(PDOException $e)
+                               {
+                                       if ( $e )
+                                       {
+                                               trigger_error('Error: ' . 
$e->getMessage(), E_USER_ERROR);
+       //                                      throw $e;
+                                       }
+                               }
                        }
                        return $ret;
                }

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc.inc.php  
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc.inc.php  
2011-06-06 09:23:43 UTC (rev 7349)
@@ -482,29 +482,42 @@
                        {
                                if($bNullable == False)
                                {
-                                       //$sBufNullable = ' NOT NULL';
-                                       $sFieldSQL .= ' NOT NULL';
+                                       $sBufNullable = ' NOT NULL';
+                                       //$sFieldSQL .= ' NOT NULL';
                                }
                                else
                                {
-                                       $sFieldSQL .= ' NULL';
+                                       $sBufNullable = ' NULL';
+                                       //$sFieldSQL .= ' NULL';
                                }
                                
                                if($sDefault === '0' || $sDefault === 0)
                                {
-                                       $sFieldSQL .= ' DEFAULT 0';
+                                       $sBufDefault = ' DEFAULT 0';
+                                       //$sFieldSQL .= ' DEFAULT 0';
                                }                                               
                
                                elseif(!is_numeric($sDefault) && $sDefault != 
'')
                                {
                                        if($DEBUG) { echo '<br>_GetFieldSQL(): 
Calling TranslateDefault for "' . $sDefault . '"'; }
                                        // Get default DDL - useful for 
differences in date defaults (eg, now() vs. getdate())
                                        $sTranslatedDefault = 
$this->m_oTranslator->TranslateDefault($sDefault);
-                                       $sFieldSQL .= " DEFAULT 
$sTranslatedDefault";
+                                       $sBufDefault = " DEFAULT 
$sTranslatedDefault";
+                                       //$sFieldSQL .= " DEFAULT 
$sTranslatedDefault";
                                }
                                elseif($sDefault)
                                {
-                                       $sFieldSQL .= " DEFAULT $sDefault";
+                                       $sBufDefault .= " DEFAULT $sDefault";
+                                       //$sFieldSQL .= " DEFAULT $sDefault";
                                }
+                               
+                               if($this->dbms == 'oracle')
+                               {
+                                       $sFieldSQL .= 
"{$sBufDefault}{$sBufNullable}";
+                               }
+                               else
+                               {
+                                       $sFieldSQL .= 
"{$sBufNullable}{$sBufDefault}";
+                               }
                                if($DEBUG) { echo '<br>_GetFieldSQL(): Outgoing 
SQL:   ' . $sFieldSQL; }
                                return true;
                        }

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.setup_process.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.setup_process.inc.php        
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.setup_process.inc.php        
2011-06-06 09:23:43 UTC (rev 7349)
@@ -259,6 +259,7 @@
                        }
                        $GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
 
+                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
                        if ( !is_array($setup_info) )
                        {
                                $setup_info = array();
@@ -329,7 +330,7 @@
                                }
                                if($DEBUG) { echo '<br>process->current(): 
Outgoing status: ' . $appname . ',status: '. $setup_info[$key]['status']; }
                        }
-
+                       
$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
                        /* Done, return current status */
                        return ($setup_info);
                }

Modified: branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php   
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/setup/tables_current.inc.php   
2011-06-06 09:23:43 UTC (rev 7349)
@@ -276,7 +276,7 @@
                                'owner_id' => array('type' => 'int','precision' 
=> 4,'nullable' => False),
                                'createdby_id' => array('type' => 
'int','precision' => 4,'nullable' => True),
                                'modifiedby_id' => array('type' => 
'int','precision' => 4,'nullable' => True),
-                               'created' => array('type' => 'date','nullable' 
=> False,'default' => '1970-01-01'),
+                               'created' => array('type' => 'date','nullable' 
=> False,'default' => 'current_date'),
                                'modified' => array('type' => 'date','nullable' 
=> True),
                                'size' => array('type' => 'int','precision' => 
4,'nullable' => True),
                                'mime_type' => array('type' => 
'varchar','precision' => '150','nullable' => True),

Modified: 
branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css   
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/css/frontend.css   
2011-06-06 09:23:43 UTC (rev 7349)
@@ -328,7 +328,7 @@
 height: 108px !important;
 background: url(../images/newlayout/aktivby_logo.jpg) no-repeat !important;
 background-position: bottom center !important;
-padding: 22px 0px 0px 400px !important;
+padding: 22px 0px 0px 100px !important;
 }
 
 #header-search{

Modified: branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php       
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/phpgwapi/templates/bkbooking/head.inc.php       
2011-06-06 09:23:43 UTC (rev 7349)
@@ -116,14 +116,11 @@
 
        $bodoc = CreateObject('booking.bodocumentation');
        
-       $test  =  $bodoc->so->getFrontendDoc(); 
+       $manual  =  $bodoc->so->getFrontendDoc();       
+
        $app = lang($app);
        $tpl_vars = array
        (
-               'manual_text'   => lang('manual'),
-               'manual_url'    => $test,
-#              'help_text'     => lang('help'),
-#              'help_url'              => '#',
                'css'                   => $GLOBALS['phpgw']->common->get_css(),
                'javascript'    => $GLOBALS['phpgw']->common->get_javascript(),
                'img_icon'      => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
@@ -136,6 +133,13 @@
                'logofile'              => $logofile_frontend,
                'header_search_class'   => (isset($_GET['menuaction']) && 
$_GET['menuaction'] == 'bookingfrontend.uisearch.index' ? 'hidden' : '')
        );
+       if ($manual !== null) 
+       {
+               $tpl_vars['manual_text'] = lang('manual');
+               $tpl_vars['manual_url'] = $manual;
+#              $tpl_vars['help_text'] = lang('help');
+#              $tpl_vars['help_url'] = => '#';
+       }
        $bouser = CreateObject('bookingfrontend.bouser');
        if($bouser->is_logged_in())
        {

Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2011-06-06 09:23:43 UTC (rev 7349)
@@ -120,6 +120,7 @@
                        $criteria_id    = isset($data['criteria_id']) ? 
$data['criteria_id'] : '';
                        $attrib_filter  = $data['attrib_filter'] ? 
$data['attrib_filter'] : array();
                        $p_num                  = isset($data['p_num']) ? 
$data['p_num'] : '';
+                       $custom_condition= isset($data['custom_condition']) ? 
$data['custom_condition'] : '';
 
                        if(!$entity_id || !$cat_id)
                        {
@@ -401,6 +402,12 @@
                                $where= 'AND';                  
                        }
 
+                       if ($custom_condition)
+                       {
+                               $filtermethod .= " {$where} 
{$custom_condition}";
+                               $where= 'AND';                  
+                       }
+
                        if ($p_num)
                        {
                                $filtermethod .= " $where 
$entity_table.p_num='$p_num'";

Modified: branches/Version-1_0-branch/property/inc/class.soexportentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soexportentity.inc.php       
2011-06-06 08:47:21 UTC (rev 7348)
+++ branches/Version-1_0-branch/property/inc/class.soexportentity.inc.php       
2011-06-06 09:23:43 UTC (rev 7349)
@@ -163,36 +163,55 @@
 
                        $criteria = array
                        (
-                               'start'                 => 
isset($data['start']) && $data['start'] ? (int)$data['start'] : 0,
-                               'query'                 => 
isset($data['query']) ? $data['query'] : '',
-                               'sort'                  => isset($data['sort']) 
? $data['sort'] : '',
-                               'order'                 => 
isset($data['order']) ? $data['order'] : '',
-                               'filter'                => 
isset($data['filter']) ? $data['filter'] : '',
-                               'cat_id'                => $this->cat_id,
-                               'district_id'   => isset($data['district_id']) 
&& $data['district_id'] ? (int)$data['district_id'] : 0,
-                               'lookup'                => 
isset($data['lookup'])?$data['lookup']:'',
-                               'allrows'               => 
isset($data['allrows'])?$data['allrows']:'',
-                               'entity_id'             => 
(int)$this->entity_id,
-                               'cat_id'                => (int)$this->cat_id,
-                               'status'                => 
isset($data['status']) ? $data['status'] : '',
-                               'start_date'    => 
phpgwapi_datetime::date_to_timestamp($data['start_date']),
-                               'end_date'              => 
phpgwapi_datetime::date_to_timestamp($data['end_date']),
-                               'dry_run'               => $data['dry_run'],
-                               'type'                  => $data['type'],
-                               'location_code' => 
isset($data['location_code']) ? $data['location_code'] : '',
-                               'criteria_id'   => $data['criteria_id'],
-                               'attrib_filter' => $attrib_filter,
-                               'p_num'                 => $this->p_num
+                               'start'                         => 
isset($data['start']) && $data['start'] ? (int)$data['start'] : 0,
+                               'query'                         => 
isset($data['query']) ? $data['query'] : '',
+                               'sort'                          => 
isset($data['sort']) ? $data['sort'] : '',
+                               'order'                         => 
isset($data['order']) ? $data['order'] : '',
+                               'filter'                        => 
isset($data['filter']) ? $data['filter'] : '',
+                               'cat_id'                        => 
$this->cat_id,
+                               'district_id'           => 
isset($data['district_id']) && $data['district_id'] ? (int)$data['district_id'] 
: 0,
+                               'lookup'                        => 
isset($data['lookup'])?$data['lookup']:'',
+                               'allrows'                       => 
isset($data['allrows'])?$data['allrows']:'',
+                               'entity_id'                     => 
(int)$this->entity_id,
+                               'cat_id'                        => 
(int)$this->cat_id,
+                               'status'                        => 
isset($data['status']) ? $data['status'] : '',
+                               'start_date'            => 
phpgwapi_datetime::date_to_timestamp($data['start_date']),
+                               'end_date'                      => 
phpgwapi_datetime::date_to_timestamp($data['end_date']),
+                               'dry_run'                       => 
$data['dry_run'],
+                               'type'                          => 
$data['type'],
+                               'location_code'         => 
isset($data['location_code']) ? $data['location_code'] : '',
+                               'criteria_id'           => $data['criteria_id'],
+                               'attrib_filter'         => $attrib_filter,
+                               'p_num'                         => $this->p_num,
+                               'custom_condition'      => 
$data['custom_condition']
                        );
 
                        $values = $soentity->read($criteria);
-//_debug_array($values);                               
-                       foreach($values as &$entry)
+
+                       $solocation     = CreateObject('property.solocation');
+                       $custom                 = 
createObject('property.custom_fields');
+
+                       $_values['attributes'] = 
$custom->find('property','.location.1', 0, '', 'ASC', 'attrib_sort', true, 
true);
+
+                       if( isset($data['get_location_info']) && 
$data['get_location_info'])
                        {
-                               $entry['address'] = 
utf8_decode($entry['address']);
-                               $entry['user_id'] = 
utf8_decode($entry['user_id']);
+                               foreach($values as &$entry)
+                               {
+       //                              $entry['address'] = 
utf8_decode($entry['address']);
+       //                              $entry['user'] = 
utf8_decode($entry['user_id']);
+                                       $__values = 
$solocation->read_single($entry['loc1'],$_values);
+       //                              $entry['location_data'] = 
$solocation->read_single($entry['loc1'],$_values);
+                                       $entry['location_data'] = 
$custom->prepare($__values, 'property',".location.1", true);
+                               }
                        }
 
-                       return $values;
+                       $resultset = array
+                       (
+                               'total_records' => $soentity->total_records,
+                               'values'                => $values
+                       );
+
+//_debug_array($resultset);
+                       return $resultset;
                }
        }




reply via email to

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