fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8119] bkbooking: nsf update


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [8119] bkbooking: nsf update
Date: Thu, 17 Nov 2011 07:44:21 +0000

Revision: 8119
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8119
Author:   kjell
Date:     2011-11-17 07:44:21 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
bkbooking: nsf update

Modified Paths:
--------------
    branches/dev-thomasez/booking/inc/class.bobuilding.inc.php
    branches/dev-thomasez/booking/inc/class.boresource.inc.php
    branches/dev-thomasez/booking/inc/class.sobuilding.inc.php
    branches/dev-thomasez/booking/inc/class.soresource.inc.php
    branches/dev-thomasez/booking/inc/class.uibuilding.inc.php
    branches/dev-thomasez/booking/inc/class.uiresource.inc.php
    branches/dev-thomasez/booking/js/booking/application.js
    branches/dev-thomasez/booking/js/booking/schedule.js
    branches/dev-thomasez/booking/setup/phpgw_no.lang
    branches/dev-thomasez/booking/setup/tables_current.inc.php
    branches/dev-thomasez/booking/setup/tables_update.inc.php
    branches/dev-thomasez/booking/templates/base/application.xsl
    branches/dev-thomasez/booking/templates/base/application_edit.xsl
    branches/dev-thomasez/booking/templates/base/application_new.xsl
    branches/dev-thomasez/booking/templates/base/building.xsl
    branches/dev-thomasez/booking/templates/base/building_form.xsl
    branches/dev-thomasez/booking/templates/base/css/base.css
    branches/dev-thomasez/booking/templates/base/resource.xsl
    branches/dev-thomasez/booking/templates/base/resource_form.xsl
    branches/dev-thomasez/bookingfrontend/setup/phpgw_no.lang
    branches/dev-thomasez/bookingfrontend/setup/setup.inc.php
    branches/dev-thomasez/bookingfrontend/templates/base/building.xsl

Modified: branches/dev-thomasez/booking/inc/class.bobuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.bobuilding.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.bobuilding.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -20,7 +20,8 @@
                                        ),
                                        booking_sopermission::ROLE_CASE_OFFICER 
=> array
                                        (
-                                               'write' => 
array_fill_keys(array('name', 'homepage', 'description', 'email', 'phone', 
'street', 'zip_code', 'city', 
'district','deactivate_application','deactivate_calendar','deactivate_sendmessage','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time'),
 true),
+                                               'write' => 
array_fill_keys(array('name', 'homepage', 'description', 'email', 'phone', 
'street', 'zip_code', 'city', 
'district','deactivate_application','deactivate_calendar','deactivate_sendmessage','internal_cost','external_cost','cost_type','campsites','bedspaces',
+'heating','kitchen','water','location','communication','usage_time','weather_url','map_url'),
 true),
                                        ),
                                        'global' => array
                                        (

Modified: branches/dev-thomasez/booking/inc/class.boresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.boresource.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.boresource.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -58,7 +58,7 @@
                                        ),
                                        booking_sopermission::ROLE_CASE_OFFICER 
=> array
                                        (
-                                               'write' => 
array_fill_keys(array('name', 'description', 'activity_id', 
'type','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time'),
 true),
+                                               'write' => 
array_fill_keys(array('name', 'description', 'activity_id', 
'type','internal_cost','external_cost','cost_type','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time'),
 true),
                                        ),
                                        'parent_role_permissions' => array
                                        (

Modified: branches/dev-thomasez/booking/inc/class.sobuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.sobuilding.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.sobuilding.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -3,6 +3,10 @@
        
        class booking_sobuilding extends booking_socommon
        {
+               const COST_TYPE_PH      = 'Perhour';
+               const COST_TYPE_PD      = 'Perday';
+               const COST_TYPE_PW      = 'Perweek';
+
                function __construct()
                {
                        parent::__construct('bb_building', 
@@ -22,6 +26,9 @@
                                        'district'              => array('type' 
=> 'string', 'query' => true),
                                        'city'                  => array('type' 
=> 'string', 'query' => true),
                                        'active' => array('type' => 'int'),
+                                       'internal_cost'         => array('type' 
=> 'int'),
+                                       'external_cost'         => array('type' 
=> 'int'),
+                                       'cost_type'             => array('type' 
=> 'string'),
                                        'campsites'  => array('type' => 'int'),
                                        'bedspaces'  => array('type' => 'int'),
                                        'heating'               => array('type' 
=> 'string', 'query' => true),
@@ -29,11 +36,18 @@
                                        'kitchen'               => array('type' 
=> 'string', 'query' => true),
                                        'location'              => array('type' 
=> 'string', 'query' => true),
                                        'communication' => array('type' => 
'string', 'query' => true),
-                                       'usage_time'    => array('type' => 
'string', 'query' => true)
+                                       'usage_time'    => array('type' => 
'string', 'query' => true),
+                                       'weather_url'           => array('type' 
=> 'string'),
+                                       'map_url'               => array('type' 
=> 'string')
                                )
                        );
                }
-               
+
+               public static function allowed_cost_types()
+               {
+                       return array(self::COST_TYPE_PH, self::COST_TYPE_PD, 
self::COST_TYPE_PW);
+               }
+       
                /**
                 * Returns buildings used by the organization with the 
specified id
                 * within the last 300 days.

Modified: branches/dev-thomasez/booking/inc/class.soresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.soresource.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.soresource.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -7,7 +7,11 @@
                const TYPE_HOUSE = 'House';
                const TYPE_EQUIPMENT = 'Equipment';
                const TYPE_CAMPSITE = 'Campsite';
-               
+               const COST_TYPE_PH      = 'Perhour';
+               const COST_TYPE_PD      = 'Perday';
+               const COST_TYPE_PW      = 'Perweek';
+                       
+
                function __construct()
                {
                        parent::__construct('bb_resource', 
@@ -28,6 +32,9 @@
                                        'location'              => array('type' 
=> 'string', 'query' => true),
                                        'communication' => array('type' => 
'string', 'query' => true),
                                        'usage_time'    => array('type' => 
'string', 'query' => true),
+                                       'internal_cost'         => array('type' 
=> 'int'),
+                                       'external_cost'         => array('type' 
=> 'int'),
+                                       'cost_type'             => array('type' 
=> 'string'),
                                        'building_name' => array('type' => 
'string',
                                                  'query'               => true,
                                                  'join'                => 
array(
@@ -76,6 +83,11 @@
                {
                        return array(self::TYPE_LOCATION, self::TYPE_EQUIPMENT, 
self::TYPE_HOUSE, self::TYPE_CAMPSITE);
                }
+
+               public static function allowed_cost_types()
+               {
+                       return array(self::COST_TYPE_PH, self::COST_TYPE_PD, 
self::COST_TYPE_PW);
+               }
                
                function doValidate($entity, booking_errorstack $errors)
                {

Modified: branches/dev-thomasez/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uibuilding.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.uibuilding.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -26,9 +26,17 @@
                        
                        $this->bo = CreateObject('booking.bobuilding');
                        self::set_active_menu('booking::buildings');
-                       $this->fields = array('name', 'homepage', 
'description', 'email', 'street', 'zip_code', 'city', 'district', 'phone', 
'active', 
'location_code','deactivate_application','deactivate_calendar','deactivate_sendmessage','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time');
+                       $this->fields = array('name', 'homepage', 
'description', 'email', 'street', 'zip_code', 'city', 'district', 'phone', 
'active', 
'location_code','deactivate_application','deactivate_calendar','deactivate_sendmessage','internal_cost','external_cost','cost_type','campsites','bedspaces',
+'heating','kitchen','water','location','communication','usage_time','weather_url','map_url');
                }
                
+               protected function building_cost_types()
+               {
+                       $types = array();
+                       foreach($this->bo->allowed_cost_types() as $type) { 
$types[$type] = self::humanize($type); }
+                       return $types;
+               }
+
                public function properties()
                {
                        $q = phpgw::get_var('query', 'str', 'REQUEST', null);
@@ -152,6 +160,15 @@
                                $building = extract_values($_POST, 
$this->fields);
                                $building['active'] = '1';
                                $errors = $this->bo->validate($building);
+                               if (strlen($_POST['heating']) > 50 ||  
strlen($_POST['kitchen']) > 50 || strlen($_POST['water']) > 50  ||  
strlen($_POST['location']) > 50  ||  strlen($_POST['communication']) > 50  ||  
strlen($_POST['usage_time']) > 50)
+                               {
+                                       $errors['extrafields'] = lang('Max 50 
characters in text fields');
+                               }       
+                               if (strlen($_POST['map_url']) > 250 || 
strlen($_POST['weather_url']) > 250)
+                               {
+                                       $errors['urlfields'] = lang('Max 250 
characters in url fields');
+                               }
+
                                if(!$errors)
                                {
                                        $receipt = $this->bo->add($building);
@@ -159,6 +176,7 @@
                                }
                        }
                        $this->flash_form_errors($errors);
+                       $building['cost_types'] = $this->building_cost_types();
                        $building['buildings_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.index'));
                        $building['cancel_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.index'));
                        $this->use_yui_editor();
@@ -170,6 +188,7 @@
                        $id = intval(phpgw::get_var('id', 'GET'));
                        $building = $this->bo->read_single($id);
                        $building['id'] = $id;
+                       $building['cost_types'] = $this->building_cost_types();
                        $building['buildings_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.index'));
                        $building['cancel_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.show', 'id' => 
$building['id']));
                        $building['top-nav-bar-buildings'] = lang('Buildings');
@@ -183,8 +202,11 @@
                                {
                                        $errors['extrafields'] = lang('Max 50 
characters in text fields');
                                }       
+                               if (strlen($_POST['map_url']) > 250 || 
strlen($_POST['weather_url']) > 250)
+                               {
+                                       $errors['urlfields'] = lang('Max 250 
characters in url fields');
+                               }
 
-
                                if(!$errors)
                                {
                                        $receipt = $this->bo->update($building);

Modified: branches/dev-thomasez/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uiresource.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/inc/class.uiresource.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -23,7 +23,7 @@
                        
                        $this->bo = CreateObject('booking.boresource');
                        $this->activity_bo = CreateObject('booking.boactivity');
-                       $this->fields = array('name', 'building_id', 
'building_name','description','activity_id', 'active', 'type', 
'sort','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time');
+                       $this->fields = array('name', 'building_id', 
'building_name','description','activity_id', 'active', 'type', 
'sort','internal_cost','external_cost','cost_type','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time');
                        self::set_active_menu('booking::resources');
                }
                
@@ -146,6 +146,7 @@
                        phpgwapi_yui::load_widget('autocomplete');
                        $activity_data = $this->activity_bo->fetch_activities();
                        $resource['types'] = $this->resource_types();
+                       $resource['cost_types'] = $this->resource_cost_types();
                        $resource['cancel_link'] = 
self::link(array('menuaction' => 'booking.uiresource.index'));
                        $this->use_yui_editor();
                        self::render_template('resource_form', array('resource' 
=> $resource, 'activitydata' => $activity_data, 'new_form' => true));
@@ -158,6 +159,13 @@
                        return $types;
                }
 
+               protected function resource_cost_types()
+               {
+                       $types = array();
+                       foreach($this->bo->allowed_cost_types() as $type) { 
$types[$type] = self::humanize($type); }
+                       return $types;
+               }
+
                public function edit()
                {
                        $id = intval(phpgw::get_var('id', 'GET'));
@@ -167,6 +175,7 @@
                        $resource['buildings_link'] = 
self::link(array('menuaction' => 'booking.uibuilding.index'));
                        $resource['cancel_link'] = 
self::link(array('menuaction' => 'booking.uiresource.index'));
                        $resource['types'] = $this->resource_types();
+                       $resource['cost_types'] = $this->resource_cost_types();
                        
                        $errors = array();
                        if($_SERVER['REQUEST_METHOD'] == 'POST')

Modified: branches/dev-thomasez/booking/js/booking/application.js
===================================================================
--- branches/dev-thomasez/booking/js/booking/application.js     2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/js/booking/application.js     2011-11-17 
07:44:21 UTC (rev 8119)
@@ -54,7 +54,7 @@
 populateResourceTable = function(building_id, selection) {
     YAHOO.booking.checkboxTableHelper('resources_container', 
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id='
 +  building_id + '&phpgw_return_as=json&',
     'resources[]', selection, {
-               additional_fields: [{key: 'type', label: lang['Resource 
Type']}], 
+               additional_fields: [{key: 'type', label: lang['Resource 
Type']},{key: 'internal_cost', label: lang['Internal Cost']},{key: 
'external_cost', label: lang['External Cost']},{key: 'cost_type', label: 
lang['Cost Type']}], 
                onSelectionChanged: function(selectedItems) { 
regulationsTable.setResources(selectedItems); regulationsTable.update(); } 
         });
 }

Modified: branches/dev-thomasez/booking/js/booking/schedule.js
===================================================================
--- branches/dev-thomasez/booking/js/booking/schedule.js        2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/js/booking/schedule.js        2011-11-17 
07:44:21 UTC (rev 8119)
@@ -44,11 +44,18 @@
                        else    
                                elCell.innerHTML = 
YAHOO.booking.shorten(booking.name, 9);
                }
-               elCell.onclick = function() 
{YAHOO.booking.showBookingInfo(booking,elCell); return false; };
+               if (booking.name == 'Ledig tid' || booking.name == 'Ledig' || 
booking.name == 'Åpen' || booking.name == 'Åpent') {
+                       var data = oRecord.getData();
+                       YAHOO.util.Dom.addClass(elCell, 'freegreen');
+                       elCell.onclick = function() 
{YAHOO.booking.newApplicationForm(YAHOO.booking.dates[oColumn.field], 
data._from, data._to, elCell); return false; };
+               } else {
+                       elCell.onclick = function() 
{YAHOO.booking.showBookingInfo(booking,elCell); return false; };
+               }
+
        }
        else {
-               YAHOO.util.Dom.addClass(elCell, 'freegreen');
-               elCell.innerHTML = 'Ledig';
+//             YAHOO.util.Dom.addClass(elCell, 'freegreen');
+               elCell.innerHTML = '...';
                var data = oRecord.getData();
                elCell.ondblclick = function() 
{YAHOO.booking.newApplicationForm(YAHOO.booking.dates[oColumn.field], 
data._from, data._to, elCell); return false; };
        }
@@ -108,8 +115,8 @@
                elCell.innerHTML = YAHOO.booking.bookingToHtml(booking);
        }
        else {
-               YAHOO.util.Dom.addClass(elCell, 'freegreen');
-               elCell.innerHTML = 'Ledig';
+//             YAHOO.util.Dom.addClass(elCell, 'freegreen');
+               elCell.innerHTML = '...';
        }
 };
 
@@ -126,8 +133,8 @@
                        elCell.innerHTML = YAHOO.booking.link(booking.name, 
null, 9);
        }
        else {
-               YAHOO.util.Dom.addClass(elCell, 'freegreen');
-               elCell.innerHTML = 'Ledig';
+//             YAHOO.util.Dom.addClass(elCell, 'freegreen');
+               elCell.innerHTML = '...';
        }
 };
 

Modified: branches/dev-thomasez/booking/setup/phpgw_no.lang
===================================================================
--- branches/dev-thomasez/booking/setup/phpgw_no.lang   2011-11-16 15:11:55 UTC 
(rev 8118)
+++ branches/dev-thomasez/booking/setup/phpgw_no.lang   2011-11-17 07:44:21 UTC 
(rev 8119)
@@ -107,7 +107,7 @@
 jul    booking no      juli
 jun    booking no      juni
 last modified  booking no      Sist endret
-joading...     booking no      Laster...
+loading...     booking no      Laster...
 location       booking no      Møtelokale
 male   booking no      Mann
 mar    booking no      mars
@@ -529,5 +529,13 @@
 Locality       booking no      Beliggenhet
 communication  booking no      Kommunikasjon
 Usage time     booking no      Brukstid
-
-
+Internal Cost  booking no      Pris medlem
+External Cost  booking no      Pris ikke-medlem
+Cost Type      booking no      Pristype
+Perhour        booking no      Per time
+Perday booking no      Per dag
+Perweek        booking no      Per uke
+Select Cost type       booking no      Velg pristype
+Map url        booking no      Kart
+Weather url    booking no      Været
+Click here     booking no      Klikk her

Modified: branches/dev-thomasez/booking/setup/tables_current.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_current.inc.php  2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/setup/tables_current.inc.php  2011-11-17 
07:44:21 UTC (rev 8119)
@@ -40,6 +40,11 @@
                                'location' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
                                'communication' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
                                'usage_time' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+                               'internal_cost' => array('type' => 'int', 
'nullable' => True,'precision' => '4', 'default' => NULL),
+                               'external_cost' => array('type' => 'int', 
'nullable' => True,'precision' => '4', 'default' => NULL),
+                               'cost_type' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+                               'map_url' => array('type' => 
'varchar','precision' => '250','nullable' => True, 'default' => NULL),
+                               'weather_url' => array('type' => 
'varchar','precision' => '250','nullable' => True, 'default' => NULL),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -129,6 +134,9 @@
                                'location' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
                                'communication' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
                                'usage_time' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+                               'internal_cost' => array('type' => 'int', 
'nullable' => True,'precision' => '4', 'default' => NULL),
+                               'external_cost' => array('type' => 'int', 
'nullable' => True,'precision' => '4', 'default' => NULL),
+                               'cost_type' => array('type' => 
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
                        ),
                        'pk' => array('id'),
                        'fk' => array(

Modified: branches/dev-thomasez/booking/setup/tables_update.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_update.inc.php   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/setup/tables_update.inc.php   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -2662,7 +2662,7 @@
        }
 
        /**
-       * Update booking version from 0.2.09 to 0.2.10
+       * Update booking version from 0.2.10 to 0.2.11
        * Update bb_building with som new fields.
        * 
        */
@@ -2679,6 +2679,14 @@
                $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN location varchar(50) DEFAULT NULL");
                $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN communication varchar(50) DEFAULT NULL");
                $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN usage_time varchar(50) DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN internal_cost integer DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN external_cost integer DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_resource ADD COLUMN cost_type varchar(50) DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_building ADD COLUMN internal_cost integer DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_building ADD COLUMN external_cost integer DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_building ADD COLUMN cost_type varchar(50) DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_building ADD COLUMN map_url varchar(250) DEFAULT NULL");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_building ADD COLUMN weather_url varchar(250) DEFAULT NULL");
 
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {

Modified: branches/dev-thomasez/booking/templates/base/application.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/application.xsl        
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/application.xsl        
2011-11-17 07:44:21 UTC (rev 8119)
@@ -126,6 +126,7 @@
                                                      return 
false;"><xsl:value-of select="php:function('lang', 'Building schedule')" 
/></a>)</dd>
             <dd><div id="resources_container"/></dd>
         </dl>
+        <div class="clr"/>
         <dl class="proplist-col">
             <dt class="heading">4. <xsl:value-of select="php:function('lang', 
'When?')" /></dt>
                        <script type="text/javascript">
@@ -156,6 +157,8 @@
                        </xsl:for-each>
         </dl>
         <dl class="proplist-col">
+               </dl>
+        <dl class="proplist-col">
             <dt class="heading">5. <xsl:value-of select="php:function('lang', 
'Who?')" /></dt>
             <dt><xsl:value-of select="php:function('lang', 'Target audience')" 
/></dt>
                        <dd>
@@ -310,7 +313,7 @@
         if (!resourceIds || resourceIds == "") {
                resourceIds = false;
         }
-       var lang = <xsl:value-of select="php:function('js_lang', 'Resources', 
'Resource Type', 'ID', 'Type', 'From', 'To', 'Document')"/>;
+       var lang = <xsl:value-of select="php:function('js_lang', 'Resources', 
'Resource Type', 'ID', 'Type', 'From', 'To', 'Document','Internal 
Cost','External Cost','Cost Type')"/>;
        var app_id = <xsl:value-of select="application/id"/>;
        var building_id = <xsl:value-of select="application/building_id"/>;     
        var resources = <xsl:value-of select="application/resources"/>;
@@ -328,7 +331,7 @@
            var url = 
'index.php?menuaction=booking.uiresource.index&sort=name&phpgw_return_as=json&' 
+ resourceIds;
            var url2 = 
'index.php?menuaction=booking.uiapplication.associated&phpgw_return_as=json&filter_application_id='
 + app_id;
                ]]>
-           var colDefs = [{key: 'name', label: lang['Resources'], formatter: 
YAHOO.booking.formatLink}, {key: 'type', label: lang['Resource Type']}];
+           var colDefs = [{key: 'name', label: lang['Resources'], formatter: 
YAHOO.booking.formatLink}, {key: 'type', label: lang['Resource Type']},{key: 
'internal_cost', label: lang['Internal Cost']},{key: 'external_cost', label: 
lang['External Cost']},{key: 'cost_type', label: lang['Cost Type']}];
            YAHOO.booking.inlineTableHelper('resources_container', url, 
colDefs);
            var colDefs = [
                {key: 'id', label: lang['ID'], formatter: 
YAHOO.booking.formatLink},

Modified: branches/dev-thomasez/booking/templates/base/application_edit.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/application_edit.xsl   
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/application_edit.xsl   
2011-11-17 07:44:21 UTC (rev 8119)
@@ -67,6 +67,7 @@
                                <div id="resources_container"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></div>
                        </dd>
                </dl>
+               <div class="clr"/>
                <dl class="form-col">
                        <div class="heading">3. <xsl:value-of 
select="php:function('lang', 'When?')" /></div>
                        <div id="dates-container">
@@ -89,6 +90,8 @@
                        <dt><a href="#" id="add-date-link"><xsl:value-of 
select="php:function('lang', 'Add another date')" /></a></dt>
                </dl>
                <dl class="form-col">
+               </dl>
+               <dl class="form-col">
                        <div class="heading">4. <xsl:value-of 
select="php:function('lang', 'Who?')" /></div>
                        <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label></dt>
                        <dd>
@@ -178,6 +181,6 @@
                YAHOO.booking.initialDocumentSelection = <xsl:value-of 
select="application/accepted_documents_json"/>;
                YAHOO.booking.initialAcceptAllTerms = true;
                YAHOO.booking.initialSelection = <xsl:value-of 
select="application/resources_json"/>;
-               var lang = <xsl:value-of select="php:function('js_lang', 
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept 
to follow all terms and conditions of lease first.')"/>;
+               var lang = <xsl:value-of select="php:function('js_lang', 
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept 
to follow all terms and conditions of lease first.','Internal Cost','External 
Cost','Cost Type')"/>;
        </script>
 </xsl:template>

Modified: branches/dev-thomasez/booking/templates/base/application_new.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/application_new.xsl    
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/application_new.xsl    
2011-11-17 07:44:21 UTC (rev 8119)
@@ -95,6 +95,7 @@
                                <div id="resources_container"><xsl:value-of 
select="php:function('lang', 'Select a building first')" /></div>
                        </dd>
                </dl>
+               <div class="clr"/>
                <dl class="form-col">
                        <div class="heading">4. <xsl:value-of 
select="php:function('lang', 'When?')" /></div>
                        <p>Velg fra dato og angi fra klokkeslett. Velg til dato 
og angi klokkeslett. Dato velges fra kalender. Klokkeslett angis med            
                timer:minutter. Du kan søke om flere tider ved å velge Legg til 
dato. For søknad om fast tid i en gitt periode legg inn startdato og            
                klokkeslett for den første gangen her og oppgi intervall og 
sluttdato i felt 1: "Informasjon om aktiviteten"</p>
@@ -122,6 +123,8 @@
                        <dt><a href="#" id="add-date-link"><xsl:value-of 
select="php:function('lang', 'Add another date')" /></a></dt>
                </dl>
                <dl class="form-col">
+               </dl>
+               <dl class="form-col">
                        <div class="heading">5. <xsl:value-of 
select="php:function('lang', 'Who?')" /></div>
                        <p>Kryss av for hvilken målgruppe 
arrangementet/treningen er rettet mot. Du kan krysse av for flere.</p>
                        <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'Target audience')" /></label></dt>
@@ -191,6 +194,6 @@
                YAHOO.booking.initialAcceptAllTerms = false;
                YAHOO.booking.initialSelection = <xsl:value-of 
select="application/resources_json"/>;
                YAHOO.booking.initialAudience = <xsl:value-of 
select="application/audience_json"/>;
-               var lang = <xsl:value-of select="php:function('js_lang', 
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept 
to follow all terms and conditions of lease first.')"/>;
+               var lang = <xsl:value-of select="php:function('js_lang', 
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept 
to follow all terms and conditions of lease first.','Internal Cost','External 
Cost','Cost Type')"/>;
        </script>
 </xsl:template>

Modified: branches/dev-thomasez/booking/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building.xsl   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/building.xsl   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -94,6 +94,41 @@
                                <dd><xsl:value-of 
select="building/usage_time"/></dd>
                        </xsl:if>
                </dl>
+               <div class="clr"/>
+                       <dl class="form-col">
+                               <dt><label for="field_map_url"><xsl:value-of 
select="php:function('lang', 'Map url')"/></label></dt>
+                               <dd><a target="_blank">
+                <xsl:attribute name="href"><xsl:value-of 
select="building/map_url"/></xsl:attribute>
+                <xsl:value-of select="php:function('lang', 'Click here')" 
/></a>
+                               </dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label 
for="field_weather_url"><xsl:value-of select="php:function('lang', 'Weather 
url')"/></label></dt>
+                               <dd><a target="_blank">
+                <xsl:attribute name="href"><xsl:value-of 
select="building/weather_url"/></xsl:attribute>
+                <xsl:value-of select="php:function('lang', 'Click here')" 
/></a>
+                               </dd>
+                       </dl>
+               <div class='clr'/>
+               <dl class="form-col">
+                       <xsl:if test="building/internal_cost!=''">              
                
+                               <dt><label 
for="field_internal_cost"><xsl:value-of select="php:function('lang', 'Internal 
cost')"/></label></dt>
+                               <dd><xsl:value-of 
select="building/internal_cost"/></dd>
+                       </xsl:if>
+               </dl>
+               <dl class="form-col">
+                       <xsl:if test="building/external_cost!=''">              
                
+                               <dt><label 
for="field_external_cost"><xsl:value-of select="php:function('lang', 'External 
cost')"/></label></dt>
+                               <dd><xsl:value-of 
select="building/external_cost"/></dd>
+                       </xsl:if>
+               </dl>
+               <dl class="form-col">
+                       <xsl:if test="building/cost_type!=''">                  
        
+                               <dt><label for="field_cost_type"><xsl:value-of 
select="php:function('lang', 'Cost type')"/></label></dt>
+                   <dd><xsl:value-of select="php:function('lang', 
string(building/cost_type))"/></dd>
+                       </xsl:if>
+               </dl>
+               <div class='clr'/>
 
         <div class="form-buttons">
                        <xsl:if test="building/permission/write">
@@ -126,11 +161,11 @@
 
 <script type="text/javascript">
 var building_id = <xsl:value-of select="building/id"/>;
-       var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Category', 'Actions', 'Account', 'Role', 'Edit', 'Delete', 'Resource Type', 
'Sort order')"/>;
+       var lang = <xsl:value-of select="php:function('js_lang', 'Name', 
'Category', 'Actions', 'Account', 'Role', 'Edit', 'Delete', 'Resource Type', 
'Sort order','Internal Cost','External Cost','Cost Type')"/>;
     <![CDATA[
 YAHOO.util.Event.addListener(window, "load", function() {
     var url = 
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' + 
building_id + '&phpgw_return_as=json&';
-    var colDefs = [{key: 'sort', label: lang['Sort order']},{key: 'name', 
label: lang['Name'], formatter: YAHOO.booking.formatLink}, {key: 'type', label: 
lang['Resource Type']}];
+    var colDefs = [{key: 'sort', label: lang['Sort order']},{key: 'name', 
label: lang['Name'], formatter: YAHOO.booking.formatLink}, {key: 'type', label: 
lang['Resource Type']},{key: 'internal_cost', label: lang['Internal 
Cost']},{key: 'external_cost', label: lang['External Cost']},{key: 'cost_type', 
label: lang['Cost Type']}];
     YAHOO.booking.inlineTableHelper('resources_container', url, colDefs);
 
        var url = 
'index.php?menuaction=booking.uidocument_building.index&sort=name&filter_owner_id='
 + building_id + '&phpgw_return_as=json&';

Modified: branches/dev-thomasez/booking/templates/base/building_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building_form.xsl      
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/building_form.xsl      
2011-11-17 07:44:21 UTC (rev 8119)
@@ -78,6 +78,17 @@
                        </dl>
                        <div class="clr"/>
                        <dl class="form-col">
+                               <dt><label for="field_map_url"><xsl:value-of 
select="php:function('lang', 'Map url')"/></label></dt>
+                               <dd><input id="field_map_url" name="map_url" 
type="text" value="{building/map_url}"/></dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label 
for="field_weather_url"><xsl:value-of select="php:function('lang', 'Weather 
ul')"/></label></dt>
+                               <dd><input type="text" name="weather_url" 
id="field_weather_url" value="{building/weather_url}"/></dd>
+                       </dl>
+                       <div class="clr"/>
+                       
+                       <div class="clr"/>
+                       <dl class="form-col">
                                <dt><label for="field_campsites"><xsl:value-of 
select="php:function('lang', 'Campsites')"/></label></dt>
                                <dd><input id="field_campsites" 
name="campsites" type="text" value="{building/campsites}"/></dd>
 
@@ -107,7 +118,35 @@
                                
                        </dl>
                        <div class="clr"/>
+
                        <dl class="form-col">
+                               <dt><label 
for="field_internal_cost"><xsl:value-of select="php:function('lang', 'Internal 
cost')"/></label></dt>
+                               <dd><input id="field_internal_cost" 
name="internal_cost" type="text" value="{building/internal_cost}"/></dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label 
for="field_external_cost"><xsl:value-of select="php:function('lang', 'External 
cost')"/></label></dt>
+                               <dd><input id="field_external_cost" 
name="external_cost" type="text" value="{building/external_cost}"/></dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label for="field_cost_type"><xsl:value-of 
select="php:function('lang', 'Cost type')"/></label></dt>
+                               <dd>
+                                       <select name='cost_type' 
id='field_cost_type'>
+                                               <option value=''><xsl:value-of 
select="php:function('lang', 'Select Cost type')" />...</option>
+                                               <xsl:for-each 
select="building/cost_types/*">
+                                                       <option 
value="{local-name()}">
+                                                               <xsl:if 
test="../../cost_type = local-name()">
+                                                                       
<xsl:attribute name="selected">selected</xsl:attribute>
+                                                               </xsl:if>
+
+                                                               <xsl:value-of 
select="php:function('lang', string(node()))"/>
+                                                       </option>
+                                               </xsl:for-each>
+                                       </select>
+                               </dd>
+                       </dl>
+                       <div class="clr"/>
+
+                       <dl class="form-col">
                                <xsl:if test="not(new_form)">
                                        <dt><label 
for="field_deactivate_application"><xsl:value-of select="php:function('lang', 
'Deactivate application')"/></label></dt>
                                        <dd>

Modified: branches/dev-thomasez/booking/templates/base/css/base.css
===================================================================
--- branches/dev-thomasez/booking/templates/base/css/base.css   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/css/base.css   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -202,7 +202,7 @@
 #schedule_container .color18 { background-color: #bdb76b;} /* darkkhaki */
 #schedule_container .color19 { background-color: #32cd32;} /* limegreen */
 #schedule_container .color20 { background-color: #ffe4b5;} /* moccasin */
-#schedule_container .freegreen { color: #339933; font-weight: bold;} /* Green 
*/
+#schedule_container .freegreen { color: #339933; font-weight: bold; 
background-color: white;} /* Green */
 
 #boundary-table td, #boundary-table th { 
     padding: .1em .2em;

Modified: branches/dev-thomasez/booking/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource.xsl   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/resource.xsl   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -52,8 +52,8 @@
                                <dt><label for='field_kitchen'><xsl:value-of 
select="php:function('lang', 'Kitchen')"/></label></dt>
                                <dd><xsl:value-of 
select="resource/kitchen"/></dd>
                        </xsl:if>
-                       </dl>
-                       <dl class="form-col">
+               </dl>
+               <dl class="form-col">
                        <xsl:if test="not(resource/water='')">                  
        
                                <dt><label for="field_water"><xsl:value-of 
select="php:function('lang', 'Water')"/></label></dt>
                                <dd><xsl:value-of select="resource/water"/></dd>
@@ -71,8 +71,27 @@
                                <dd><xsl:value-of 
select="resource/usage_time"/></dd>
                        </xsl:if>
                </dl>
-               
+       
                <div class='clr'/>
+               <dl class="form-col">
+                       <xsl:if test="resource/internal_cost!=''">              
                
+                               <dt><label 
for="field_internal_cost"><xsl:value-of select="php:function('lang', 'Internal 
cost')"/></label></dt>
+                               <dd><xsl:value-of 
select="resource/internal_cost"/></dd>
+                       </xsl:if>
+               </dl>
+               <dl class="form-col">
+                       <xsl:if test="resource/external_cost!=''">              
                
+                               <dt><label 
for="field_external_cost"><xsl:value-of select="php:function('lang', 'External 
cost')"/></label></dt>
+                               <dd><xsl:value-of 
select="resource/external_cost"/></dd>
+                       </xsl:if>
+               </dl>
+               <dl class="form-col">
+                       <xsl:if test="resource/cost_type!=''">                  
        
+                               <dt><label for="field_cost_type"><xsl:value-of 
select="php:function('lang', 'Cost type')"/></label></dt>
+                   <dd><xsl:value-of select="php:function('lang', 
string(resource/cost_type))"/></dd>
+                       </xsl:if>
+               </dl>
+               <div class='clr'/>
                
                <div class="form-buttons">
                        <xsl:if test="resource/permission/write">

Modified: branches/dev-thomasez/booking/templates/base/resource_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource_form.xsl      
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/booking/templates/base/resource_form.xsl      
2011-11-17 07:44:21 UTC (rev 8119)
@@ -92,36 +92,64 @@
                        <div class="clr"/>
                        <dl class="form-col">
                                <dt><label for="field_campsites"><xsl:value-of 
select="php:function('lang', 'Campsites')"/></label></dt>
-                               <dd><input id="field_campsites" 
name="campsites" type="text" value="{building/campsites}"/></dd>
+                               <dd><input id="field_campsites" 
name="campsites" type="text" value="{resource/campsites}"/></dd>
 
                                <dt><label for="field_bedspaces"><xsl:value-of 
select="php:function('lang', 'Bedspaces')"/></label></dt>
-                               <dd><input id="field_bedspaces" 
name="bedspaces" type="text" value="{building/bedspaces}"/></dd>
+                               <dd><input id="field_bedspaces" 
name="bedspaces" type="text" value="{resource/bedspaces}"/></dd>
 
 
                                <dt><label for="field_heating"><xsl:value-of 
select="php:function('lang', 'Heating')"/></label></dt>
-                               <dd><input type="text" name="heating" 
id="field_heating" value="{building/heating}"/></dd>
+                               <dd><input type="text" name="heating" 
id="field_heating" value="{resource/heating}"/></dd>
 
                                <dt><label for='field_kitchen'><xsl:value-of 
select="php:function('lang', 'Kitchen')"/></label></dt>
-                               <dd><input type="text" name="kitchen" 
id="field_kitchen" value="{building/kitchen}"/></dd>
+                               <dd><input type="text" name="kitchen" 
id="field_kitchen" value="{resource/kitchen}"/></dd>
                                
                        </dl>
                        <dl class="form-col">
                                <dt><label for="field_water"><xsl:value-of 
select="php:function('lang', 'Water')"/></label></dt>
-                               <dd><input type="text" name="water" 
id="field_water" value="{building/water}"/></dd>
+                               <dd><input type="text" name="water" 
id="field_water" value="{resource/water}"/></dd>
 
                                <dt><label for="field_location"><xsl:value-of 
select="php:function('lang', 'Locality')"/></label></dt>
-                               <dd><input type="text" name="location" 
id="field_location" value="{building/location}"/></dd>
+                               <dd><input type="text" name="location" 
id="field_location" value="{resource/location}"/></dd>
 
                                <dt><label 
for='field_communication'><xsl:value-of select="php:function('lang', 
'Communication')"/></label></dt>
-                               <dd><input type="text" name="communication" 
id="field_communication" value="{building/communication}"/></dd>
+                               <dd><input type="text" name="communication" 
id="field_communication" value="{resource/communication}"/></dd>
 
                                <dt><label for='field_usage_time'><xsl:value-of 
select="php:function('lang', 'Usage time')"/></label></dt>
-                               <dd><input type="text" name="usage_time" 
id="field_usage_time" value="{building/usage_time}"/></dd>
+                               <dd><input type="text" name="usage_time" 
id="field_usage_time" value="{resource/usage_time}"/></dd>
                                
                        </dl>
                        <div class="clr"/>
 
                        <dl class="form-col">
+                               <dt><label 
for="field_internal_cost"><xsl:value-of select="php:function('lang', 'Internal 
cost')"/></label></dt>
+                               <dd><input id="field_internal_cost" 
name="internal_cost" type="text" value="{resource/internal_cost}"/></dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label 
for="field_external_cost"><xsl:value-of select="php:function('lang', 'External 
cost')"/></label></dt>
+                               <dd><input id="field_external_cost" 
name="external_cost" type="text" value="{resource/external_cost}"/></dd>
+                       </dl>
+                       <dl class="form-col">
+                               <dt><label for="field_cost_type"><xsl:value-of 
select="php:function('lang', 'Cost type')"/></label></dt>
+                               <dd>
+                                       <select name='cost_type' 
id='field_cost_type'>
+                                               <option value=''><xsl:value-of 
select="php:function('lang', 'Select Cost type')" />...</option>
+                                               <xsl:for-each 
select="resource/cost_types/*">
+                                                       <option 
value="{local-name()}">
+                                                               <xsl:if 
test="../../cost_type = local-name()">
+                                                                       
<xsl:attribute name="selected">selected</xsl:attribute>
+                                                               </xsl:if>
+
+                                                               <xsl:value-of 
select="php:function('lang', string(node()))"/>
+                                                       </option>
+                                               </xsl:for-each>
+                                       </select>
+                               </dd>
+                       </dl>
+
+                       <div class="clr"/>
+                       
+                       <dl class="form-col">
                                <dt><label 
for="field_description"><xsl:value-of select="php:function('lang', 
'Description')" /></label></dt>
                                <dd class="yui-skin-sam">
                                        <textarea id="field_description" 
name="description" type="text"><xsl:value-of 
select="resource/description"/></textarea>

Modified: branches/dev-thomasez/bookingfrontend/setup/phpgw_no.lang
===================================================================
--- branches/dev-thomasez/bookingfrontend/setup/phpgw_no.lang   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/bookingfrontend/setup/phpgw_no.lang   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -335,6 +335,11 @@
 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
-House  booking no      Hytte/hus
-Campsite       booking no      Leirplass
-
+House  bookingfrontend no      Hytte/hus
+Campsite       bookingfrontend no      Leirplass
+Internal Cost  bookingfrontend no      Medlems pris
+External Cost  bookingfrontend no      Pris
+Cost Type      bookingfrontend no      Pris type
+Perhour        bookingfrontend no      Per time
+Perday bookingfrontend no      Per dag
+Perweek        bookingfrontend no      Per uke

Modified: branches/dev-thomasez/bookingfrontend/setup/setup.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/setup/setup.inc.php   2011-11-16 
15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/bookingfrontend/setup/setup.inc.php   2011-11-17 
07:44:21 UTC (rev 8119)
@@ -21,7 +21,7 @@
 
        $setup_info['bookingfrontend']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => Array('0.2.00', 
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10')
+               'versions' => Array('0.2.00', 
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10','0.2.11','0.2.12')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(

Modified: branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/building.xsl   
2011-11-16 15:11:55 UTC (rev 8118)
+++ branches/dev-thomasez/bookingfrontend/templates/base/building.xsl   
2011-11-17 07:44:21 UTC (rev 8119)
@@ -64,6 +64,21 @@
                                                                <xsl:value-of 
select="district"/>
                                                        </dd>
                                                </xsl:if>
+                                               <xsl:if test="map_url">
+                                                       <dt><label 
for="field_map_url"><xsl:value-of select="php:function('lang', 'Map 
url')"/></label></dt>
+                                                       <dd><a target="_blank">
+                                       <xsl:attribute 
name="href"><xsl:value-of select="map_url"/></xsl:attribute>
+                                       <xsl:value-of 
select="php:function('lang', 'Click here')" /></a>
+                                                       </dd>
+                                               </xsl:if>
+                                               <xsl:if test="weather_url">
+                                                       <dt><label 
for="field_weather_url"><xsl:value-of select="php:function('lang', 'Weather 
url')"/></label></dt>
+                                                       <dd><a target="_blank">
+                                       <xsl:attribute 
name="href"><xsl:value-of select="weather_url"/></xsl:attribute>
+                                       <xsl:value-of 
select="php:function('lang', 'Click here')" /></a>
+                                                       </dd>
+                                               </xsl:if>
+
                                        </dl>
                                </xsl:if>
                                
@@ -117,12 +132,12 @@
                        </dl>
                        <script type="text/javascript">
                                var building_id = <xsl:value-of select="id"/>;
-                               var lang = <xsl:value-of 
select="php:function('js_lang', 'Name', 'category', 'Activity', 'Resource 
Type')"/>;
+                               var lang = <xsl:value-of 
select="php:function('js_lang', 'Name', 'category', 'Activity', 'Resource 
Type','Internal Cost','External Cost','Cost Type')"/>;
                                <![CDATA[
                                
                                YAHOO.util.Event.addListener(window, "load", 
function() {
                                var url = 
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id='
 + building_id + '&phpgw_return_as=json&';
-                               var colDefs = [{key: 'name', label: 
lang['Name'], formatter: YAHOO.booking.formatLink}, {key: 'type', label: 
lang['Resource Type']}, {key: 'activity_name', label: lang['Activity']}];
+                               var colDefs = [{key: 'name', label: 
lang['Name'], formatter: YAHOO.booking.formatLink}, {key: 'type', label: 
lang['Resource Type']}, {key: 'activity_name', label: lang['Activity']},{key: 
'internal_cost', label: lang['Internal Cost']},{key: 'external_cost', label: 
lang['External Cost']},{key: 'cost_type', label: lang['Cost Type']}];
                                
YAHOO.booking.inlineTableHelper('resources_container', url, colDefs);
                                });
                                




reply via email to

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