[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6502] merge 6495:6501 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6502] merge 6495:6501 from trunk |
Date: |
Tue, 19 Oct 2010 20:52:16 +0000 |
Revision: 6502
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6502
Author: sigurdne
Date: 2010-10-19 20:52:15 +0000 (Tue, 19 Oct 2010)
Log Message:
-----------
merge 6495:6501 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
branches/Version-1_0-branch/booking/inc/class.uigroup.inc.php
branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
branches/Version-1_0-branch/booking/js/booking/event.js
branches/Version-1_0-branch/booking/setup/phpgw_no.lang
branches/Version-1_0-branch/booking/setup/setup.inc.php
branches/Version-1_0-branch/booking/setup/tables_current.inc.php
branches/Version-1_0-branch/booking/setup/tables_update.inc.php
branches/Version-1_0-branch/booking/templates/base/event_edit.xsl
branches/Version-1_0-branch/booking/templates/base/event_new.xsl
branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
branches/Version-1_0-branch/property/inc/class.botts.inc.php
branches/Version-1_0-branch/property/inc/class.uitts.inc.php
branches/Version-1_0-branch/property/inc/hook_home.inc.php
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501
Modified: branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/inc/class.soevent.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -12,6 +12,7 @@
'activity_id' => array('type' =>
'int', 'required' => true),
'application_id' => array('type'
=> 'int', 'required' => false),
'description' => array('type' =>
'string', 'required'=> true, 'query' => true),
+ 'building_name' => array('type' =>
'string', 'required'=> true, 'query' => true),
'from_' => array('type' =>
'string', 'required'=> true),
'to_' => array('type' =>
'string', 'required'=> true),
'cost' => array('type' =>
'decimal', 'required' => true),
@@ -23,8 +24,10 @@
'is_public' => array('type' =>
'int', 'required' => true, 'nullable' => false, 'default' => '1'),
'secret' => array('type' =>
'string', 'required' => true),
'sms_total' => array('type'
=> 'int', 'required' => false),
+ 'customer_organization_name' =>
array('type' => 'string', 'required' => False, 'query' => true),
+ 'customer_organization_id'
=> array('type' => 'int', 'required' => False),
'customer_identifier_type'
=> array('type' => 'string', 'required' => False),
- 'customer_ssn'
=> array('type' => 'string', 'sf_validator' =>
createObject('booking.sfValidatorNorwegianSSN'), 'required' => false),
+ 'customer_ssn'
=> array('type' => 'string', 'sf_validator' =>
createObject('booking.sfValidatorNorwegianSSN'), 'required' => false),
'customer_organization_number' =>
array('type' => 'string', 'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid'))),
'customer_internal'
=> array('type' => 'int', 'required'=>true),
'activity_name' => array('type' =>
'string',
Modified: branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -119,7 +119,6 @@
$bookings = $this->bo->read();
foreach($bookings['results'] as &$booking) {
$building =
$this->building_bo->read_single($booking['building_id']);
- //print_r($building);
$booking['building_name'] = $building['name'];
$booking['from_'] =
pretty_timestamp($booking['from_']);
$booking['to_'] =
pretty_timestamp($booking['to_']);
Modified: branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -22,6 +22,7 @@
$this->activity_bo = CreateObject('booking.boactivity');
$this->agegroup_bo = CreateObject('booking.boagegroup');
$this->audience_bo = CreateObject('booking.boaudience');
+ $this->organization_bo =
CreateObject('booking.boorganization');
self::set_active_menu('booking::applications::events');
$this->fields = array('activity_id', 'description',
'resources', 'cost', 'application_id',
@@ -108,8 +109,6 @@
foreach($events['results'] as &$event)
{
- $building_info =
$this->bo->so->get_building_info($event['id']);
- $event['building_name'] =
$building_info['name'];
$event['from_'] =
pretty_timestamp($event['from_']);
$event['to_'] = pretty_timestamp($event['to_']);
}
@@ -270,6 +269,30 @@
array_set_default($event, 'agegroups', array());
$event['secret'] = $this->generate_secret();
$event['is_public'] = 1;
+ $event['building_name'] =
$_POST['building_name'];
+
+ if ($_POST['organization_name']) {
+ $event['customer_organization_name'] =
$_POST['organization_name'];
+ $event['customer_organization_id'] =
$_POST['organization_id'];
+ $organization =
$this->organization_bo->read_single(intval(phpgw::get_var('organization_id',
'POST')));
+ if ($organization['customer_internal']
== 0) {
+
$event['customer_identifier_type'] = $organization['customer_identifier_type'];
+ $event['customer_internal'] =
$organization['customer_internal'];
+ if
(strlen($organization['customer_organization_number']) == 9) {
+
$event['customer_organization_number'] =
$organization['customer_organization_number'];
+ } else {
+
$errors['organization_number'] = lang('The organization number is wrong or not
present');
+ }
+ } else {
+
$event['customer_identifier_type'] = $organization['customer_identifier_type'];
+ $event['customer_internal'] =
$organization['customer_internal'];
+ if
(strlen($organization['customer_number']) == 5) {
+
$event['customer_organization_number'] = $organization['customer_number'];
+ } else {
+
$errors['resource_number'] = lang('The resource number is wrong or not
present');
+ }
+ }
+ }
if (!$_POST['application_id'])
{
@@ -402,18 +425,54 @@
$event['building_name'] = $building_info['name'];
$errors = array();
$customer = array();
- if ($event['customer_organization_number'])
+ if ($event['customer_identifier_type'])
{
$customer['customer_identifier_type'] =
$event['customer_identifier_type'];
$customer['customer_ssn'] =
$event['customer_ssn'];
$customer['customer_organization_number'] =
$event['customer_organization_number'];
+ $customer['customer_internal'] =
$event['customer_internal'];
}
list($event, $errors) =
$this->extract_and_validate($event);
+
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
+ if (!$_POST['organization_name']) {
+ $event['customer_organization_name'] =
Null;
+ $event['customer_organization_id'] =
Null;
+ }
array_set_default($_POST, 'resources', array());
+
+ if ($_POST['organization_name']) {
+ $event['customer_organization_name'] =
$_POST['organization_name'];
+ $event['customer_organization_id'] =
$_POST['organization_id'];
+ $organization =
$this->organization_bo->read_single(intval(phpgw::get_var('organization_id',
'POST')));
- if(!$errors['event'])
+ if ($organization['customer_internal']
== 0) {
+
$event['customer_identifier_type'] = $organization['customer_identifier_type'];
+ $event['customer_internal'] =
$organization['customer_internal'];
+ if
(strlen($organization['customer_organization_number']) == 9) {
+
$event['customer_organization_number'] =
$organization['customer_organization_number'];
+ } else {
+
$errors['organization_number'] = lang('The organization number is wrong or not
present');
+ }
+ } else {
+
$event['customer_identifier_type'] = $organization['customer_identifier_type'];
+ $event['customer_internal'] =
$organization['customer_internal'];
+ if
(strlen($organization['customer_number']) == 5) {
+
$event['customer_organization_number'] = $organization['customer_number'];
+ } else {
+
$errors['resource_number'] = lang('The resource number is wrong or not
present');
+ }
+ }
+ } elseif ($_POST['customer_identifier_type'] ==
'ssn') {
+ $event['customer_identifier_type'] =
'ssn';
+ $event['customer_ssn'] =
$organization['customer_ssn'];
+
+ } elseif ($_POST['customer_identifier_type'] ==
'organization_number') {
+ $event['customer_identifier_type'] =
'organization_number';
+ $event['customer_organization_number']
= $organization['customer_organization_number'];
+ }
+ if(!$errors['event'] and
!$errors['resource_number'] and !$errors['organization_number'])
{
if (phpgw::get_var('mail', 'POST'))
{
@@ -472,12 +531,14 @@
$errors['booking'] = lang('Event created,
Overlaps with existing booking, Remember to send a notification');
}
$this->flash_form_errors($errors);
- if ($customer['customer_organization_number'])
+ if ($customer['customer_identifier_type'])
{
$event['customer_identifier_type'] =
$customer['customer_identifier_type'];
$event['customer_ssn'] =
$customer['customer_ssn'];
$event['customer_organization_number'] =
$customer['customer_organization_number'];
+ $event['customer_internal'] =
$customer['customer_internal'];
}
+
self::add_javascript('booking', 'booking', 'event.js');
$event['resources_json'] =
json_encode(array_map('intval', $event['resources']));
$event['application_link'] =
self::link(array('menuaction' => 'booking.uiapplication.show', 'id'=>
$event['application_id']));
Modified: branches/Version-1_0-branch/booking/inc/class.uigroup.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uigroup.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/inc/class.uigroup.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -243,7 +243,11 @@
{
$group['active'] = '1';
}
+
$errors = $this->bo->validate($group);
+ if(strlen($_POST['shortname']) > 11){
+ $errors['shortname'] = lang('Lengt of
shortname is to long, max 11 characters long');
+ }
if(!$errors)
{
if ($id)
Modified: branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/inc/class.uiorganization.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -184,6 +184,9 @@
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
list($organization, $errors) =
$this->extract_and_validate(array('active' => 1));
+ if(strlen($_POST['shortname']) > 11){
+ $errors['shortname'] = lang('Lengt of
shortname is to long, max 11 characters long');
+ }
if(!$errors)
{
$receipt =
$this->bo->add($organization);
@@ -214,6 +217,9 @@
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
list($organization, $errors) =
$this->extract_and_validate($organization);
+ if(strlen($_POST['shortname']) > 11){
+ $errors['shortname'] = lang('Lengt of
shortname is to long, max 11 characters long');
+ }
if(!$errors)
{
$organization['shortname'] =
$_POST['shortname'];
Modified: branches/Version-1_0-branch/booking/js/booking/event.js
===================================================================
--- branches/Version-1_0-branch/booking/js/booking/event.js 2010-10-19
13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/js/booking/event.js 2010-10-19
20:52:15 UTC (rev 6502)
@@ -51,8 +51,9 @@
a.onclick = removeDateRow;
YAHOO.booking.setupDatePickers();
YAHOO.util.Event.stopEvent(e);
- });
-
+ });
+
YAHOO.booking.autocompleteHelper('index.php?menuaction=booking.uiorganization.index&phpgw_return_as=json&',
+ 'field_org_name', 'field_org_id',
'org_container');
});
Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2010-10-19
13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2010-10-19
20:52:15 UTC (rev 6502)
@@ -463,3 +463,6 @@
E-mail address booking no E-postadresse
Confirm e-mail address booking no Bekreft e-postadressen
The e-mail addresses you entered do not match booking no E-postadressene
er ikke like
+Lengt of shortname is to long, max 11 characters long booking no
Kortnavn er for langt, maks 11 tegn
+The organization number is wrong or not present booking no Det er
ikke registrert et organisjonsnummer på denne organisasjonen
+The resource number is wrong or not present booking no Det er ikke
registert et ressursnummer på denne organisasjonen
Modified: branches/Version-1_0-branch/booking/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/setup.inc.php 2010-10-19
13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/setup/setup.inc.php 2010-10-19
20:52:15 UTC (rev 6502)
@@ -1,6 +1,6 @@
<?php
$setup_info['booking']['name'] = 'booking';
- $setup_info['booking']['version'] = '0.1.97';
+ $setup_info['booking']['version'] = '0.1.98';
$setup_info['booking']['app_order'] = 9;
$setup_info['booking']['enable'] = 1;
$setup_info['booking']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/booking/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/tables_current.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/setup/tables_current.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -512,10 +512,13 @@
'from_' => array('type' =>
'timestamp','nullable' => False),
'to_' => array('type' => 'timestamp','nullable'
=> False),
'cost' => array('type' => 'decimal',
'precision' => 10, 'scale' => 2,'nullable' => False),
+ 'building_name' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'contact_name' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'contact_email' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'contact_phone' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'completed' => array('type' => 'int',
'precision' => 4,'nullable' => False,'default' => '0'),
+ 'customer_organization_name' => array('type' =>
'varchar', 'precision' => 50,'nullable' => True),
+ 'customer_organization_id' => array('type' =>
'int', 'precision' => 4,'nullable' => True),
'customer_identifier_type' => array('type' =>
'varchar', 'precision' => 255,'nullable' => True),
'customer_organization_number' => array('type'
=> 'varchar', 'precision' => 9,'nullable' => True),
'customer_ssn' => array('type' => 'varchar',
'precision' => 12,'nullable' => True),
Modified: branches/Version-1_0-branch/booking/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/tables_update.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/setup/tables_update.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -2332,4 +2332,21 @@
return $GLOBALS['setup_info']['booking']['currentver'];
}
}
+ $test[] = '0.1.97';
+ function booking_upgrade0_1_97()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_organization_id integer");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_organization_name varchar(50)");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 'changeme'");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE bb_event
SET building_name = b2.name FROM bb_building b2 WHERE EXISTS (select 1 from
bb_event e,bb_event_resource er,bb_resource r,bb_building b WHERE
e.id=er.event_id AND er.resource_id=r.id AND r.building_id=b.id AND b2.id=b.id
AND bb_event.id=e.id)");
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['booking']['currentver'] =
'0.1.98';
+ return $GLOBALS['setup_info']['booking']['currentver'];
+ }
+ }
+
Modified: branches/Version-1_0-branch/booking/templates/base/event_edit.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/event_edit.xsl
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/templates/base/event_edit.xsl
2010-10-19 20:52:15 UTC (rev 6502)
@@ -203,6 +203,20 @@
</dl>
<dl class="form-col">
<dt class="heading"><xsl:value-of
select="php:function('lang', 'Invoice information')" /></dt>
+
+ <dt><label for="field_org"><xsl:value-of
select="php:function('lang', 'Organization')" /></label></dt>
+ <dd>
+ <div class="autocomplete">
+ <input id="field_org_id" name="organization_id"
type="hidden">
+ <xsl:attribute name="value"><xsl:value-of
select="event/customer_organization_id"/></xsl:attribute>
+ </input>
+ <input id="field_org_name" name="organization_name"
type="text">
+ <xsl:attribute name="value"><xsl:value-of
select="event/customer_organization_name"/></xsl:attribute>
+ </input>
+ <div id="org_container"/>
+ </div>
+ </dd>
+
<xsl:copy-of
select="phpgw:booking_customer_identifier(event, '')"/>
<dt><label for="field_customer_internal"><xsl:value-of
select="php:function('lang', 'Internal Customer')"/></label></dt>
Modified: branches/Version-1_0-branch/booking/templates/base/event_new.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/event_new.xsl
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/booking/templates/base/event_new.xsl
2010-10-19 20:52:15 UTC (rev 6502)
@@ -163,9 +163,25 @@
</dd>
</dl>
<dl class="form-col">
+
<dt class="heading"><xsl:value-of
select="php:function('lang', 'Invoice information')" /></dt>
+
+ <dt><label for="field_org"><xsl:value-of
select="php:function('lang', 'Organization')" /></label></dt>
+ <dd>
+ <div class="autocomplete">
+ <input id="field_org_id" name="organization_id"
type="hidden">
+ <xsl:attribute name="value"><xsl:value-of
select="event/organization_id"/></xsl:attribute>
+ </input>
+ <input id="field_org_name" name="organization_name"
type="text">
+ <xsl:attribute name="value"><xsl:value-of
select="event/organization_name"/></xsl:attribute>
+ </input>
+ <div id="org_container"/>
+ </div>
+ </dd>
+
<xsl:copy-of
select="phpgw:booking_customer_identifier(event, '')"/>
-
+
+
<dt><label for="field_customer_internal"><xsl:value-of
select="php:function('lang', 'Internal Customer')"/></label></dt>
<dd><xsl:copy-of
select="phpgw:option_checkbox(event/customer_internal,
'customer_internal')"/></dd>
</dl>
Modified: branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/bookingfrontend/setup/phpgw_no.lang
2010-10-19 20:52:15 UTC (rev 6502)
@@ -319,3 +319,4 @@
E-mail address bookingfrontend no E-postadresse
Confirm e-mail address bookingfrontend no Bekreft e-postadressen
The e-mail addresses you entered do not match bookingfrontend no
E-postadressene er ikke like
+Lengt of shortname is to long, max 11 characters long bookingfrontend no
Kortnavn er for langt, maks 11 tegn
Modified: branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -21,7 +21,7 @@
$setup_info['bookingfrontend']['depends'][] = array(
'appname' => 'booking',
- 'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95',
'0.1.96', '0.1.97')
+ 'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95',
'0.1.96', '0.1.97', '0.1.98')
);
$setup_info['bookingfrontend']['depends'][] = array(
Modified: branches/Version-1_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.botts.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/property/inc/class.botts.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -574,93 +574,89 @@
$record_history = array();
$i=0;
- if (is_array($history_array))
+ foreach ($history_array as $value)
{
- foreach ($history_array as $value)
+ $record_history[$i]['value_date'] =
$GLOBALS['phpgw']->common->show_date($value['datetime']);
+ $record_history[$i]['value_user'] =
$value['owner'];
+
+ switch ($value['status'])
{
- $record_history[$i]['value_date']
= $GLOBALS['phpgw']->common->show_date($value['datetime']);
- $record_history[$i]['value_user']
= $value['owner'];
+ case 'R': $type = lang('Re-opened');
break;
+ case 'X': $type = lang('Closed');
break;
+ case 'O': $type = lang('Opened');
break;
+ case 'A': $type = lang('Re-assigned');
break;
+ case 'G': $type = lang('Re-assigned
group'); break;
+ case 'P': $type = lang('Priority
changed'); break;
+ case 'T': $type = lang('Category
changed'); break;
+ case 'S': $type = lang('Subject
changed'); break;
+ case 'H': $type = lang('Billable hours
changed'); break;
+ case 'B': $type = lang('Budget
changed'); break;
+ // case 'B': $type =
lang('Billable rate changed'); break;
+ case 'F': $type = lang('finnish date
changed'); break;
+ case 'IF': $type = lang('Initial
finnish date'); break;
+ case 'L': $type = lang('Location
changed'); break;
+ case 'AC': $type = lang('actual cost
changed'); break;
+ case 'M':
+ $type = lang('Sendt by email
to');
+ $this->order_sent_adress =
$value['new_value']; // in case we want to resend the order as an reminder
+ break;
+ default:
+ // nothing
+ }
+ // if ( $value['status'] == 'X' ||
$value['status'] == 'R' || (strlen($value['status']) == 2 &&
substr($value['new_value'], 0, 1) == 'C') ) // if custom status
+ if ( $value['status'] == 'X' ||
$value['status'] == 'R' || preg_match('/^C/i', $value['status']) || (
$value['status'] == 'R' && preg_match('/^C/i', $value['new_value']))) // if
custom status
+ {
switch ($value['status'])
{
- case 'R': $type =
lang('Re-opened'); break;
- case 'X': $type =
lang('Closed'); break;
- case 'O': $type =
lang('Opened'); break;
- case 'A': $type =
lang('Re-assigned'); break;
- case 'G': $type =
lang('Re-assigned group'); break;
- case 'P': $type =
lang('Priority changed'); break;
- case 'T': $type =
lang('Category changed'); break;
- case 'S': $type = lang('Subject
changed'); break;
- case 'H': $type =
lang('Billable hours changed'); break;
- case 'B': $type = lang('Budget
changed'); break;
- // case 'B': $type =
lang('Billable rate changed'); break;
- case 'F': $type = lang('finnish
date changed'); break;
- case 'IF': $type =
lang('Initial finnish date'); break;
- case 'L': $type =
lang('Location changed'); break;
- case 'AC': $type = lang('actual
cost changed'); break;
- case 'M':
- $type = lang('Sendt by
email to');
-
$this->order_sent_adress = $value['new_value']; // in case we want to resend
the order as an reminder
+ case 'R':
+ $type =
lang('Re-opened');
break;
- default: break;
+ case 'X':
+ $type = lang('Closed');
+ break;
+ default:
+ $type = lang('Status
changed');
}
+ $value['new_value'] =
$status_text[$value['new_value']];
+ $value['old_value'] =
$status_text[$value['old_value']];
+ }
- if ( $value['status'] == 'X' ||
$value['status'] == 'R' || (strlen($value['status']) == 2 &&
substr($value['new_value'], 0, 1) == 'C') ) // if custom status
+ $record_history[$i]['value_action'] =
$type?$type:'';
+ unset($type);
+ if ($value['status'] == 'A' || $value['status']
== 'G')
+ {
+ if ((int)$value['new_value']>0)
{
- switch ($value['status'])
- {
- case 'R':
- $type =
lang('Re-opened');
- break;
- case 'X':
- $type =
lang('Closed');
- break;
- default:
- $type =
lang('Status changed')
- ;break;
- }
-
- $value['new_value'] =
$status_text[$value['new_value']];
- $value['old_value'] =
$status_text[$value['old_value']];
+
$record_history[$i]['value_new_value'] =
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
+
$record_history[$i]['value_old_value'] = $value['old_value'] ?
$GLOBALS['phpgw']->accounts->id2name($value['old_value']) : '';
}
-
- $record_history[$i]['value_action']
= $type?$type:'';
- unset($type);
- if ($value['status'] == 'A' ||
$value['status'] == 'G')
- {
- if ((int)$value['new_value']>0)
- {
-
$record_history[$i]['value_new_value'] =
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
-
$record_history[$i]['value_old_value'] = $value['old_value'] ?
$GLOBALS['phpgw']->accounts->id2name($value['old_value']) : '';
- }
- else
- {
-
$record_history[$i]['value_new_value'] = lang('None');
-
$record_history[$i]['value_old_value'] = lang('None');
- }
- }
- else if ($value['status'] == 'T')
- {
-
$record_history[$i]['value_new_value'] =
$this->get_category_name($value['new_value']);
-
$record_history[$i]['value_old_value'] =
$this->get_category_name($value['old_value']);
- }
- else if (($value['status'] == 'F') ||
($value['status'] =='IF'))
- {
-
$record_history[$i]['value_new_value'] =
$GLOBALS['phpgw']->common->show_date($value['new_value'],$this->dateformat);
- }
- else if ($value['status'] != 'O' &&
$value['new_value'])
- {
-
$record_history[$i]['value_new_value'] = $value['new_value'];
-
$record_history[$i]['value_old_value'] = $value['old_value'];
- }
else
{
-
$record_history[$i]['value_new_value'] = '';
-
+
$record_history[$i]['value_new_value'] = lang('None');
+
$record_history[$i]['value_old_value'] = lang('None');
}
-
- $i++;
}
+ else if ($value['status'] == 'T')
+ {
+ $record_history[$i]['value_new_value']
= $this->get_category_name($value['new_value']);
+ $record_history[$i]['value_old_value']
= $this->get_category_name($value['old_value']);
+ }
+ else if (($value['status'] == 'F') ||
($value['status'] =='IF'))
+ {
+ $record_history[$i]['value_new_value']
= $GLOBALS['phpgw']->common->show_date($value['new_value'],$this->dateformat);
+ }
+ else if ($value['status'] != 'O' &&
$value['new_value'])
+ {
+ $record_history[$i]['value_new_value']
= $value['new_value'];
+ $record_history[$i]['value_old_value']
= $value['old_value'];
+ }
+ else
+ {
+ $record_history[$i]['value_new_value']
= '';
+ }
+
+ $i++;
}
return $record_history;
Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2010-10-19 13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2010-10-19 20:52:15 UTC (rev 6502)
@@ -2559,6 +2559,7 @@
$note_def[] = array('key' =>
'publish_note','label'=>lang('publish
text'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterCenter');
foreach($additional_notes as &$note)
{
+ $note['value_note'] =
nl2br($note['value_note']);
$_checked = $note['value_publish'] ? 'checked'
: '';
$note['publish_note'] = "<input type='checkbox'
{$_checked} name='values[publish_note][]' value='{$id}_{$note['value_id']}'
title='".lang('Check to publish text at frontend')."'>";
}
Modified: branches/Version-1_0-branch/property/inc/hook_home.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/hook_home.inc.php 2010-10-19
13:52:15 UTC (rev 6501)
+++ branches/Version-1_0-branch/property/inc/hook_home.inc.php 2010-10-19
20:52:15 UTC (rev 6502)
@@ -317,25 +317,25 @@
}
$status = array();
- $status['X'] = array
- (
- 'name' =>
lang('closed'),
- );
- $status['O'] = array
- (
- 'name' => lang('open'),
- );
+ $status['X'] = array
+ (
+ 'name' =>
lang('closed'),
+ );
+ $status['O'] = array
+ (
+ 'name' => lang('open'),
+ );
- $custom_status =
execMethod('property.botts.get_custom_status');
-
- foreach($custom_status as $custom)
- {
- $status["C{$custom['id']}"] = array
- (
- 'status'
=> $custom['name'],
- );
- }
+ $custom_status =
execMethod('property.botts.get_custom_status');
+ foreach($custom_status as $custom)
+ {
+ $status["C{$custom['id']}"] = array
+ (
+ 'status'
=> $custom['name'],
+ );
+ }
+
$category_name = array(); // caching
$portalbox->data = array();
@@ -659,7 +659,8 @@
if ( isset($prefs['property']['mainscreen_showapprovals'])
&& $prefs['property']['mainscreen_showapprovals'] == 'yes' )
{
- $title =
isset($prefs['property']['mainscreen_showapprovals_title']) &&
$prefs['property']['mainscreen_showapprovals_title']?
"{$prefs['property']['mainscreen_showapprovals_title']} ({$total_records})" :
lang('approvals') . " ({$total_records})";
+ $total_records = 0;
+ $title = 'dummy';
//TODO Make listbox css compliant
$portalbox = CreateObject('phpgwapi.listbox', array
(
@@ -715,6 +716,7 @@
'text' => 'Prosjekt venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
// echo "\n".'<!-- BEGIN approval info
-->'."\n".$portalbox->draw()."\n".'<!-- END approval info -->'."\n";
@@ -741,6 +743,7 @@
'text' => 'Ordre venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
$action_params = array
@@ -765,7 +768,12 @@
'text' => 'Melding venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
+ //Hack
+ $title =
isset($prefs['property']['mainscreen_showapprovals_title']) &&
$prefs['property']['mainscreen_showapprovals_title']?
"{$prefs['property']['mainscreen_showapprovals_title']} ({$total_records})" :
lang('approvals') . " ({$total_records})";
+ $portalbox->setvar('title', $title);
+ $portalbox->start_template();
echo "\n".'<!-- BEGIN approval info
-->'."\n".$portalbox->draw()."\n".'<!-- END approval info -->'."\n";
unset($portalbox);
@@ -775,7 +783,8 @@
if ( isset($prefs['property']['mainscreen_showvendor_reminder'])
&& $prefs['property']['mainscreen_showvendor_reminder'] ==
'yes' )
{
- $title =
isset($prefs['property']['mainscreen_showvendor_reminder_title']) &&
$prefs['property']['mainscreen_showvendor_reminder_title']?
"{$prefs['property']['mainscreen_showvendor_reminder_title']}
({$total_records})" : lang('vendor reminder') . " ({$total_records})";
+ $total_records = 0;
+ $title = 'dummy';
//TODO Make listbox css compliant
$portalbox = CreateObject('phpgwapi.listbox', array
(
@@ -836,8 +845,13 @@
'text' => "påminning nr {$entry['reminder']}
til leverandør {$vendor_name}- ordre nr: {$entry['item_id']}",
'link' => $entry['url']
);
+ $total_records++;
}
+ $title =
isset($prefs['property']['mainscreen_showvendor_reminder_title']) &&
$prefs['property']['mainscreen_showvendor_reminder_title']?
"{$prefs['property']['mainscreen_showvendor_reminder_title']}
({$total_records})" : lang('vendor reminder') . " ({$total_records})";
+ $portalbox->setvar('title', $title);
+ $portalbox->start_template();
+
echo "\n".'<!-- BEGIN reminder info
-->'."\n".$portalbox->draw()."\n".'<!-- END reminder info -->'."\n";
unset($pending_reminder);
unset($portalbox);
Modified:
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
===================================================================
---
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
2010-10-19 13:52:15 UTC (rev 6501)
+++
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
2010-10-19 20:52:15 UTC (rev 6502)
@@ -217,9 +217,11 @@
make &&\
make install &&\
# Configure httpd
+#cd ../../ &&\
+#./configure --with-apr=/usr/local/apr-httpd/\
+# --with-apr-util=/usr/local/apr-util-httpd/\
cd ../../ &&\
-./configure --with-apr=/usr/local/apr-httpd/\
- --with-apr-util=/usr/local/apr-util-httpd/\
+./configure --with-included-apr\
--with-mpm=prefork\
--enable-so\
--enable-deflate\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6502] merge 6495:6501 from trunk,
Sigurd Nes <=