[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9292] Added support for keywords to buildings and re
From: |
Alexander Stevenson |
Subject: |
[Fmsystem-commits] [9292] Added support for keywords to buildings and resources. |
Date: |
Mon, 07 May 2012 10:15:44 +0000 |
Revision: 9292
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9292
Author: andvare
Date: 2012-05-07 10:15:43 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Added support for keywords to buildings and resources.
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/setup/setup.inc.php
Modified: branches/dev-thomasez/booking/inc/class.bobuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.bobuilding.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.bobuilding.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -21,7 +21,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','internal_cost','external_cost','cost_type','campsites','bedspaces',
-'heating','kitchen','water','location','communication','usage_time','weather_url','map_url','swiming','sanitation_facilities','animals','internett_phone','handicap'),
true),
+'heating','kitchen','water','location','communication','usage_time','weather_url','map_url','swiming','sanitation_facilities','animals','internett_phone','handicap','keywords'),
true),
),
'global' => array
(
Modified: branches/dev-thomasez/booking/inc/class.boresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.boresource.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.boresource.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -58,7 +58,7 @@
),
booking_sopermission::ROLE_CASE_OFFICER
=> array
(
- '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','swiming','sanitation_facilities','animals','internett_phone','handicap'),
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','swiming','sanitation_facilities','animals','internett_phone','handicap','keywords'),
true),
),
'parent_role_permissions' => array
(
Modified: branches/dev-thomasez/booking/inc/class.sobuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.sobuilding.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.sobuilding.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -43,7 +43,8 @@
'sanitation_facilities'
=> array('type' => 'string', 'query' => true),
'animals' => array('type'
=> 'string', 'query' => true),
'internett_phone' =>
array('type' => 'string', 'query' => true),
- 'handicap' => array('type'
=> 'string', 'query' => true)
+ 'handicap' => array('type'
=> 'string', 'query' => true),
+ 'keywords' => array('type' => 'string',
'query' => true, 'required' => false ),
)
);
}
Modified: branches/dev-thomasez/booking/inc/class.soresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.soresource.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.soresource.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -79,7 +79,8 @@
'fkey' =>
'activity_id',
'key' => 'id',
'column' =>
'name'
- ))
+ )),
+ 'keywords' =>
array('type' => 'string', 'query' => true, 'required' => false),
)
);
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
Modified: branches/dev-thomasez/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uibuilding.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.uibuilding.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -27,7 +27,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','internal_cost','external_cost','cost_type','campsites','bedspaces',
-'heating','kitchen','water','location','communication','usage_time','weather_url','map_url','swiming','sanitation_facilities','animals','internett_phone','handicap');
+'heating','kitchen','water','location','communication','usage_time','weather_url','map_url','swiming','sanitation_facilities','animals','internett_phone','handicap',
'keywords');
}
protected function building_cost_types()
Modified: branches/dev-thomasez/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uiresource.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/inc/class.uiresource.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -24,7 +24,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','internal_cost','external_cost','cost_type','campsites','bedspaces','heating','kitchen','water','location','communication','usage_time',
-'swiming','sanitation_facilities','animals','internett_phone','handicap');
+'swiming','sanitation_facilities','animals','internett_phone','handicap','keywords');
self::set_active_menu('booking::resources');
}
Modified: branches/dev-thomasez/booking/setup/phpgw_no.lang
===================================================================
--- branches/dev-thomasez/booking/setup/phpgw_no.lang 2012-05-07 08:59:06 UTC
(rev 9291)
+++ branches/dev-thomasez/booking/setup/phpgw_no.lang 2012-05-07 10:15:43 UTC
(rev 9292)
@@ -576,3 +576,4 @@
View search terms booking no Vis søkeord
Term booking no Ord/begrep
Count booking no Antall
+Keywords booking no Nøkkelord
Modified: branches/dev-thomasez/booking/setup/setup.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/setup.inc.php 2012-05-07 08:59:06 UTC
(rev 9291)
+++ branches/dev-thomasez/booking/setup/setup.inc.php 2012-05-07 10:15:43 UTC
(rev 9292)
@@ -1,5 +1,5 @@
<?php
- $setup_info['booking']['version'] = '0.2.14';
+ $setup_info['booking']['version'] = '0.2.15';
$setup_info['booking']['name'] = 'booking';
$setup_info['booking']['app_order'] = 9;
$setup_info['booking']['enable'] = 1;
Modified: branches/dev-thomasez/booking/setup/tables_current.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_current.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/setup/tables_current.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -50,6 +50,7 @@
'animals' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
'internett_phone' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
'handicap' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'keywords' => array( 'type' => 'text',
'nullable' => True )
),
'pk' => array('id'),
'fk' => array(),
@@ -147,6 +148,7 @@
'animals' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
'internett_phone' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
'handicap' => array('type' =>
'varchar','precision' => '50','nullable' => True, 'default' => NULL),
+ 'keywords' => array( 'type' => 'text',
'nullable' => True )
),
'pk' => array('id'),
'fk' => array(
Modified: branches/dev-thomasez/booking/setup/tables_update.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_update.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/setup/tables_update.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -2767,9 +2767,20 @@
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
$GLOBALS['setup_info']['booking']['currentver'] =
'0.2.14';
- echo( "SUxESS!!" );
return $GLOBALS['setup_info']['booking']['currentver'];
}
- echo( "Feil!!" );
}
+ $test[] = '0.2.14';
+ function booking_upgrade0_2_14()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_resource ADD COLUMN keywords text DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_building ADD COLUMN keywords text DEFAULT NULL");
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['booking']['currentver'] =
'0.2.15';
+ return $GLOBALS['setup_info']['booking']['currentver'];
+ }
+ }
+
Modified: branches/dev-thomasez/booking/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building.xsl 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/templates/base/building.xsl 2012-05-07
10:15:43 UTC (rev 9292)
@@ -22,8 +22,6 @@
<div class="description"><xsl:value-of select="building/description"
disable-output-escaping="yes"/></div>
<dl class="proplist-col">
- <dt><xsl:value-of select="php:function('lang',
'Street')" /></dt>
- <dd><xsl:value-of select="building/street"/></dd>
<dt><xsl:value-of select="php:function('lang', 'Zip
code')" /></dt>
<dd><xsl:value-of select="building/zip_code"/></dd>
@@ -34,6 +32,9 @@
<dt><xsl:value-of select="php:function('lang',
'District')" /></dt>
<dd><xsl:value-of select="building/district"/></dd>
+ <dt><xsl:value-of select="php:function('lang',
'Keywords')" /></dt>
+ <dd><xsl:value-of select="building/keywords"/></dd>
+
<xsl:if test="building/location_code">
<dt><xsl:value-of select="php:function('lang',
'Location Code')" /></dt>
<dd><a href="{building/location_link}"><xsl:value-of
select="building/location_code"/></a></dd>
Modified: branches/dev-thomasez/booking/templates/base/building_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/building_form.xsl
2012-05-07 08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/templates/base/building_form.xsl
2012-05-07 10:15:43 UTC (rev 9292)
@@ -249,6 +249,15 @@
<div class="clr"/>
+ <dl class="form-col">
+ <dt><label for="field_keywords"><xsl:value-of
select="php:function('lang', 'Keywords')"/></label></dt>
+ <dd>
+ <dd><input name="keywords" type="text"
value="{building/keywords}"/></dd>
+ </dd>
+ </dl>
+
+ <div class="clr"/>
+
<div class="form-buttons">
<input type="submit">
<xsl:attribute name="value">
Modified: branches/dev-thomasez/booking/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource.xsl 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/templates/base/resource.xsl 2012-05-07
10:15:43 UTC (rev 9292)
@@ -35,6 +35,10 @@
</dl>
<div class="clr"/>
<dl class="form-col">
+ <xsl:if test="resource/keywords!=''">
+ <dt><label for="field_keywords"><xsl:value-of
select="php:function('lang', 'keywords')"/></label></dt>
+ <dd><xsl:value-of
select="resource/keywords"/></dd>
+ </xsl:if>
<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>
Modified: branches/dev-thomasez/booking/templates/base/resource_form.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource_form.xsl
2012-05-07 08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/booking/templates/base/resource_form.xsl
2012-05-07 10:15:43 UTC (rev 9292)
@@ -171,6 +171,12 @@
</dl>
<div class="clr"/>
+ <dl class="form-col">
+ <dt><label for="field_keywords"><xsl:value-of
select="php:function('lang', 'Keywords')"/></label></dt>
+ <dd><input id="field_keywords" name="keywords"
type="text" value="{resource/keywords}"/></dd>
+ </dl>
+
+ <div class="clr"/>
<div class="form-buttons">
<input type="submit" id="button">
Modified: branches/dev-thomasez/bookingfrontend/setup/setup.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/setup/setup.inc.php 2012-05-07
08:59:06 UTC (rev 9291)
+++ branches/dev-thomasez/bookingfrontend/setup/setup.inc.php 2012-05-07
10:15:43 UTC (rev 9292)
@@ -21,7 +21,7 @@
$setup_info['bookingfrontend']['depends'][] = array(
'appname' => 'booking',
- 'versions' => Array( '0.2.14' )
+ 'versions' => Array( '0.2.14', '0.2.15' )
);
$setup_info['bookingfrontend']['depends'][] = array(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9292] Added support for keywords to buildings and resources.,
Alexander Stevenson <=