[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8073] bkbooking: nsf building and resource update
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [8073] bkbooking: nsf building and resource update |
Date: |
Thu, 10 Nov 2011 13:59:45 +0000 |
Revision: 8073
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8073
Author: kjell
Date: 2011-11-10 13:59:45 +0000 (Thu, 10 Nov 2011)
Log Message:
-----------
bkbooking: nsf building and resource 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/setup/phpgw_no.lang
branches/dev-thomasez/booking/setup/setup.inc.php
branches/dev-thomasez/booking/setup/tables_current.inc.php
branches/dev-thomasez/booking/setup/tables_update.inc.php
branches/dev-thomasez/booking/templates/base/building.xsl
branches/dev-thomasez/booking/templates/base/building_form.xsl
branches/dev-thomasez/booking/templates/base/resource.xsl
branches/dev-thomasez/booking/templates/base/resource_form.xsl
branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
branches/dev-thomasez/bookingfrontend/templates/nsf/building.xsl
Modified: branches/dev-thomasez/booking/inc/class.bobuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.bobuilding.inc.php 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.bobuilding.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -20,7 +20,7 @@
),
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'),
true),
+ '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),
),
'global' => array
(
Modified: branches/dev-thomasez/booking/inc/class.boresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.boresource.inc.php 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.boresource.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -58,7 +58,7 @@
),
booking_sopermission::ROLE_CASE_OFFICER
=> array
(
- 'write' =>
array_fill_keys(array('name', 'description', 'activity_id', 'type'), true),
+ 'write' =>
array_fill_keys(array('name', 'description', 'activity_id',
'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-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.sobuilding.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -26,6 +26,7 @@
'bedspaces' => array('type' => 'int'),
'heating' => array('type'
=> 'string', 'query' => true),
'water' => array('type'
=> 'string', 'query' => true),
+ '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)
Modified: branches/dev-thomasez/booking/inc/class.soresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.soresource.inc.php 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.soresource.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -20,6 +20,14 @@
'type' => array('type'
=> 'string', 'query' => true, 'required' => true),
'description' =>
array('type' => 'string', 'query' => true, 'required' => false),
'activity_id' =>
array('type' => 'int', 'required' => false),
+ 'campsites' => array('type' => 'int'),
+ 'bedspaces' => array('type' => 'int'),
+ 'heating' => array('type'
=> 'string', 'query' => true),
+ 'water' => array('type'
=> 'string', 'query' => true),
+ '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),
'building_name' => array('type' =>
'string',
'query' => true,
'join' =>
array(
Modified: branches/dev-thomasez/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uibuilding.inc.php 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.uibuilding.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -26,7 +26,7 @@
$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');
+ $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');
}
public function properties()
@@ -179,6 +179,12 @@
$building = array_merge($building,
extract_values($_POST, $this->fields));
$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(!$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-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/inc/class.uiresource.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -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');
+ $this->fields = array('name', 'building_id',
'building_name','description','activity_id', 'active', 'type',
'sort','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time');
self::set_active_menu('booking::resources');
}
@@ -172,6 +172,13 @@
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$resource = array_merge($resource,
extract_values($_POST, $this->fields));
+ $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');
+ }
+
$errors = $this->bo->validate($resource);
if(!$errors)
{
Modified: branches/dev-thomasez/booking/setup/phpgw_no.lang
===================================================================
--- branches/dev-thomasez/booking/setup/phpgw_no.lang 2011-11-10 13:45:19 UTC
(rev 8072)
+++ branches/dev-thomasez/booking/setup/phpgw_no.lang 2011-11-10 13:59:45 UTC
(rev 8073)
@@ -521,3 +521,13 @@
Are you sure you want to delete? booking no Er du sikker på at
søknad skal avvises?
House booking no Hytte/hus
Campsite booking no Leirplass
+Campsites booking no Teltplasser
+Bedspaces booking no Sengeplasser
+Heating booking no Oppvarming
+Kitchen booking no Kjøkken
+Water booking no Vann
+Locality booking no Beliggenhet
+communication booking no Kommunikasjon
+Usage time booking no Brukstid
+
+
Modified: branches/dev-thomasez/booking/setup/setup.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/setup.inc.php 2011-11-10 13:45:19 UTC
(rev 8072)
+++ branches/dev-thomasez/booking/setup/setup.inc.php 2011-11-10 13:59:45 UTC
(rev 8073)
@@ -1,6 +1,6 @@
<?php
+ $setup_info['booking']['version'] = '0.2.11';
$setup_info['booking']['name'] = 'booking';
- $setup_info['booking']['version'] = '0.2.10';
$setup_info['booking']['app_order'] = 9;
$setup_info['booking']['enable'] = 1;
$setup_info['booking']['app_group'] = 'office';
Modified: branches/dev-thomasez/booking/setup/tables_current.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -32,6 +32,14 @@
'district' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
'city' => array('type' => 'varchar','precision'
=> '255', 'nullable' => True),
'description' => array('type' => 'text',
'nullable' => True),
+ 'campsites' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'bedspaces' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'heating' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'kitchen' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'water' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ '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),
),
'pk' => array('id'),
'fk' => array(),
@@ -60,6 +68,14 @@
'phone' => array('type' =>
'varchar','precision' => '50','nullable' => True),
'email' => array('type' =>
'varchar','precision' => '50','nullable' => True),
'description' => array('type' =>
'varchar','precision' => '1000','nullable' => True),
+ 'campsites' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'bedspaces' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'heating' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
+ 'kitchen' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
+ 'water' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
+ 'location' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
+ 'communication' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
+ 'usage_time' => array('type' =>
'varchar','precision' => '20','nullable' => True, 'default' => NULL),
),
'pk' => array('id'),
'fk' => array(),
@@ -105,6 +121,14 @@
'description' => array('type' => 'text',
'nullable' => True),
'activity_id' => array('type' =>
'int','precision' => '4','nullable' => False),
'sort' => array('type' => 'int','precision' =>
'4','nullable' => True,'default' => 0),
+ 'campsites' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'bedspaces' => array('type' => 'int',
'nullable' => True,'precision' => '4', 'default' => NULL),
+ 'heating' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'kitchen' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'water' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ '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),
),
'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-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/setup/tables_update.inc.php 2011-11-10
13:59:45 UTC (rev 8073)
@@ -2647,12 +2647,12 @@
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN campsites integer DEFAULT NULL");
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN bedspaces integer DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN heating varchar(20) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN kitchen varchar(20) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN water varchar(20) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN location varchar(20) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN communication varchar(20) DEFAULT NULL");
- $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN usage_time varchar(20) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN heating varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN kitchen varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN water varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN location varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN communication varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN usage_time varchar(50) DEFAULT NULL");
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
@@ -2661,3 +2661,29 @@
}
}
+ /**
+ * Update booking version from 0.2.09 to 0.2.10
+ * Update bb_building with som new fields.
+ *
+ */
+ $test[] = '0.2.10';
+ function booking_upgrade0_2_10()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN campsites integer DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN bedspaces integer DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN heating varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN kitchen varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN water varchar(50) DEFAULT NULL");
+ $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");
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['booking']['currentver'] =
'0.2.11';
+ return $GLOBALS['setup_info']['booking']['currentver'];
+ }
+ }
+
Modified: branches/dev-thomasez/booking/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building.xsl 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/templates/base/building.xsl 2011-11-10
13:59:45 UTC (rev 8073)
@@ -57,6 +57,44 @@
<dd><xsl:value-of select="building/phone"/></dd>
</dl>
+ <div class="clr"/>
+ <dl class="form-col">
+ <xsl:if test="not(building/campsites='')">
+ <dt><label for="field_campsites"><xsl:value-of
select="php:function('lang', 'Campsites')"/></label></dt>
+ <dd><xsl:value-of
select="building/campsites"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/bedspaces='')">
+ <dt><label for="field_bedspaces"><xsl:value-of
select="php:function('lang', 'Bedspaces')"/></label></dt>
+ <dd><xsl:value-of
select="building/bedspaces"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/heating='')">
+ <dt><label for="field_heating"><xsl:value-of
select="php:function('lang', 'Heating')"/></label></dt>
+ <dd><xsl:value-of
select="building/heating"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/kitchen='')">
+ <dt><label for='field_kitchen'><xsl:value-of
select="php:function('lang', 'Kitchen')"/></label></dt>
+ <dd><xsl:value-of
select="building/kitchen"/></dd>
+ </xsl:if>
+ </dl>
+ <dl class="form-col">
+ <xsl:if test="not(building/water='')">
+ <dt><label for="field_water"><xsl:value-of
select="php:function('lang', 'Water')"/></label></dt>
+ <dd><xsl:value-of select="building/water"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/location='')">
+ <dt><label for="field_location"><xsl:value-of
select="php:function('lang', 'Locality')"/></label></dt>
+ <dd><xsl:value-of
select="building/location"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/communication='')">
+ <dt><label
for='field_communication'><xsl:value-of select="php:function('lang',
'Communication')"/></label></dt>
+ <dd><xsl:value-of
select="building/communication"/></dd>
+ </xsl:if>
+ <xsl:if test="not(building/usage_time='')">
+ <dt><label for='field_usage_time'><xsl:value-of
select="php:function('lang', 'Usage time')"/></label></dt>
+ <dd><xsl:value-of
select="building/usage_time"/></dd>
+ </xsl:if>
+ </dl>
+
<div class="form-buttons">
<xsl:if test="building/permission/write">
<button>
Modified: branches/dev-thomasez/booking/templates/base/building_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building_form.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/templates/base/building_form.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -96,7 +96,7 @@
<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>
- <dt><label for="field_location"><xsl:value-of
select="php:function('lang', 'Location')"/></label></dt>
+ <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>
<dt><label
for='field_communication'><xsl:value-of select="php:function('lang',
'Communication')"/></label></dt>
Modified: branches/dev-thomasez/booking/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource.xsl 2011-11-10
13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/templates/base/resource.xsl 2011-11-10
13:59:45 UTC (rev 8073)
@@ -34,6 +34,43 @@
<dt><xsl:value-of select="php:function('lang',
'Resource Type')" /></dt>
<dd><xsl:value-of select="php:function('lang',
string(resource/type))"/></dd>
</dl>
+ <div class="clr"/>
+ <dl class="form-col">
+ <xsl:if test="resource/campsites!=''">
+ <dt><label for="field_campsites"><xsl:value-of
select="php:function('lang', 'Campsites')"/></label></dt>
+ <dd><xsl:value-of
select="resource/campsites"/></dd>
+ </xsl:if>
+ <xsl:if test="resource/bedspaces!=''">
+ <dt><label for="field_bedspaces"><xsl:value-of
select="php:function('lang', 'Bedspaces')"/></label></dt>
+ <dd><xsl:value-of
select="resource/bedspaces"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/heating='')">
+ <dt><label for="field_heating"><xsl:value-of
select="php:function('lang', 'Heating')"/></label></dt>
+ <dd><xsl:value-of
select="resource/heating"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/kitchen='')">
+ <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">
+ <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>
+ </xsl:if>
+ <xsl:if test="not(resource/location='')">
+ <dt><label for="field_location"><xsl:value-of
select="php:function('lang', 'Locality')"/></label></dt>
+ <dd><xsl:value-of
select="resource/location"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/communication='')">
+ <dt><label
for='field_communication'><xsl:value-of select="php:function('lang',
'Communication')"/></label></dt>
+ <dd><xsl:value-of
select="resource/communication"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/usage_time='')">
+ <dt><label for='field_usage_time'><xsl:value-of
select="php:function('lang', 'Usage time')"/></label></dt>
+ <dd><xsl:value-of
select="resource/usage_time"/></dd>
+ </xsl:if>
+ </dl>
<div class='clr'/>
Modified: branches/dev-thomasez/booking/templates/base/resource_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource_form.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/booking/templates/base/resource_form.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -89,10 +89,39 @@
</dd>
</xsl:if>
</dl>
-
<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>
+ <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>
+
+
+ <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>
+
+ <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>
+
+ </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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ </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/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -78,8 +78,43 @@
</dl>
<dl class="proplist-col images">
<div id="images_container"></div>
+
+ <xsl:if test="not(campsites='')">
+ <dt><label for="field_campsites"><xsl:value-of
select="php:function('lang', 'Campsites')"/></label></dt>
+ <dd><xsl:value-of select="campsites"/></dd>
+ </xsl:if>
+ <xsl:if test="not(bedspaces='')">
+ <dt><label for="field_bedspaces"><xsl:value-of
select="php:function('lang', 'Bedspaces')"/></label></dt>
+ <dd><xsl:value-of select="bedspaces"/></dd>
+ </xsl:if>
+ <xsl:if test="not(heating='')">
+ <dt><label for="field_heating"><xsl:value-of
select="php:function('lang', 'Heating')"/></label></dt>
+ <dd><xsl:value-of select="heating"/></dd>
+ </xsl:if>
+ <xsl:if test="not(kitchen='')">
+ <dt><label for='field_kitchen'><xsl:value-of
select="php:function('lang', 'Kitchen')"/></label></dt>
+ <dd><xsl:value-of select="kitchen"/></dd>
+ </xsl:if>
+ <xsl:if test="not(water='')">
+ <dt><label for="field_water"><xsl:value-of
select="php:function('lang', 'Water')"/></label></dt>
+ <dd><xsl:value-of select="water"/></dd>
+ </xsl:if>
+ <xsl:if test="not(location='')">
+ <dt><label for="field_location"><xsl:value-of
select="php:function('lang', 'Locality')"/></label></dt>
+ <dd><xsl:value-of select="location"/></dd>
+ </xsl:if>
+ <xsl:if test="not(communication='')">
+ <dt><label
for='field_communication'><xsl:value-of select="php:function('lang',
'Communication')"/></label></dt>
+ <dd><xsl:value-of select="communication"/></dd>
+ </xsl:if>
+ <xsl:if test="not(usage_time='')">
+ <dt><label for='field_usage_time'><xsl:value-of
select="php:function('lang', 'Usage time')"/></label></dt>
+ <dd><xsl:value-of select="usage_time"/></dd>
+ </xsl:if>
+
+
+
</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')"/>;
Modified: branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -38,8 +38,41 @@
<div id="documents_container"/>
</dl>
<dl class="proplist-col images">
- <div id="images_container">
- </div>
+ <div id="images_container"></div>
+
+ <xsl:if test="not(resource/campsites='')">
+ <dt><label for="field_campsites"><xsl:value-of
select="php:function('lang', 'Campsites')"/></label></dt>
+ <dd><xsl:value-of
select="resource/campsites"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/bedspaces='')">
+ <dt><label for="field_bedspaces"><xsl:value-of
select="php:function('lang', 'Bedspaces')"/></label></dt>
+ <dd><xsl:value-of
select="resource/bedspaces"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/heating='')">
+ <dt><label for="field_heating"><xsl:value-of
select="php:function('lang', 'Heating')"/></label></dt>
+ <dd><xsl:value-of
select="resource/heating"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/kitchen='')">
+ <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>
+ <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>
+ </xsl:if>
+ <xsl:if test="not(resource/location='')">
+ <dt><label for="field_location"><xsl:value-of
select="php:function('lang', 'Locality')"/></label></dt>
+ <dd><xsl:value-of
select="resource/location"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/communication='')">
+ <dt><label
for='field_communication'><xsl:value-of select="php:function('lang',
'Communication')"/></label></dt>
+ <dd><xsl:value-of
select="resource/communication"/></dd>
+ </xsl:if>
+ <xsl:if test="not(resource/usage_time='')">
+ <dt><label for='field_usage_time'><xsl:value-of
select="php:function('lang', 'Usage time')"/></label></dt>
+ <dd><xsl:value-of
select="resource/usage_time"/></dd>
+ </xsl:if>
+
</dl>
</div>
Modified: branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -45,7 +45,6 @@
</xsl:attribute>
</img>
</div>
-
</xsl:if>
<xsl:if test="search">
Modified: branches/dev-thomasez/bookingfrontend/templates/nsf/building.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/nsf/building.xsl
2011-11-10 13:45:19 UTC (rev 8072)
+++ branches/dev-thomasez/bookingfrontend/templates/nsf/building.xsl
2011-11-10 13:59:45 UTC (rev 8073)
@@ -11,7 +11,7 @@
</li>
</ul>
- <xsl:for-each select="building">
+ <xsl:for-each select="building">
<xsl:if test="deactivate_calendar=0">
<div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8073] bkbooking: nsf building and resource update,
Kjell Arne Espedal <=