[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7142] Merge 7132:7141 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7142] Merge 7132:7141 from trunk |
Date: |
Thu, 24 Mar 2011 14:09:35 +0000 |
Revision: 7142
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7142
Author: sigurdne
Date: 2011-03-24 14:09:35 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
Merge 7132:7141 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/booking/inc/class.uiallocation.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/jasper/templates/application.jrxml
branches/Version-1_0-branch/booking/setup/phpgw_no.lang
branches/Version-1_0-branch/booking/templates/base/booking_new_preview.xsl
branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
branches/Version-1_0-branch/property/setup/phpgw_no.lang
branches/Version-1_0-branch/property/templates/base/request.xsl
branches/Version-1_0-branch/rental/inc/SnappyMedia.php
branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
branches/Version-1_0-branch/rental/inc/hook_config.inc.php
branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php
branches/Version-1_0-branch/rental/setup/phpgw_no.lang
branches/Version-1_0-branch/rental/templates/base/config.tpl
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141
Modified: branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -151,7 +151,7 @@
$errors = $this->bo->validate($allocation);
- if (!$errors)
+ if (!$errors['booking'] &&
!$errors['season_boundary'])
{
$step++;
}
@@ -164,7 +164,7 @@
$errors['global'] = lang('Could
not add object due to insufficient permissions');
}
}
- else if ($_POST['outseason'] == 'on' &&
!$errors && $step > 1)
+ else if ($_POST['outseason'] == 'on' &&
!$errors['booking'] && !$errors['season_boundary'] && $step > 1)
{
$repeat_until =
strtotime($season['to_'])+60*60*24;
@@ -228,7 +228,7 @@
$allocation['resources_json'] =
json_encode(array_map('intval', $allocation['resources']));
$allocation['cancel_link'] =
self::link(array('menuaction' => 'booking.uiallocation.index'));
array_set_default($allocation, 'cost', '0');
-
+
if ($step < 2)
{
if($_SERVER['REQUEST_METHOD'] == 'POST' &&
$errors) {
Modified: branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/inc/class.uibooking.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -192,9 +192,11 @@
$time_to = split(" ",phpgw::get_var('to_', 'str',
'GET'));
$step = phpgw::get_var('step', 'str', 'POST');
if (! isset($step)) $step = 1;
+ if (! isset($noallocation)) $noallocation = 1;
$invalid_dates = array();
$valid_dates = array();
+
if(isset($allocation_id))
{
$allocation =
$this->allocation_bo->read_single($allocation_id);
@@ -207,7 +209,10 @@
$booking['organization_id'] =
$allocation['organization_id'];
$booking['organization_name'] =
$allocation['organization_name'];
} else {
- $season =
$this->season_bo->read_single($_POST['season_id']);
+ $season =
$this->season_bo->read_single($_POST['season_id']);
+ $booking['organization_id'] =
$_POST['organization_id'];
+ $booking['organization_name'] =
$_POST['organization_name'];
+ $noallocation = 1;
}
if($_SERVER['REQUEST_METHOD'] == 'POST')
@@ -235,7 +240,6 @@
$errors = $this->bo->validate($booking);
-
# if (strtotime($_POST['from_']) < $today[0])
# {
# if($_POST['recurring'] == 'on' ||
$_POST['outseason'] == 'on')
@@ -252,17 +256,37 @@
$errors['booking'] = lang('This booking
is not connected to a season');
}
- if (!$errors)
+ if (!$errors['booking'] &&
!$errors['season_boundary'])
{
$step++;
}
if (!$errors && $_POST['recurring'] != 'on' &&
$_POST['outseason'] != 'on' )
{
- $receipt = $this->bo->add($booking);
+ if( isset($noallocation)) {
+ $allocation['resources'] = $booking['resources'];
+ $allocation['cost'] = $booking['cost'];
+ $allocation['building_id'] = $booking['building_id'];
+ $allocation['building_name'] =
$booking['building_name'];
+ $allocation['season_id'] = $booking['season_id'];
+ $allocation['organization_id'] =
$booking['organization_id'];
+ $allocation['organization_name'] =
$booking['organization_name'];
+ $allocation['from_'] = $booking['from_'];
+ $allocation['to_'] = $booking['to_'];
+ $allocation['active'] = '1';
+ $allocation['completed'] = '0';
+ $receipt = $this->allocation_bo->add($allocation);
+ $booking['allocation_id'] = $receipt['id'];
+ $booking['secret'] = $this->generate_secret();
+ $receipt = $this->bo->add($booking);
+ } else {
+ $booking['secret'] = $this->generate_secret();
+ $receipt = $this->bo->add($booking);
+ }
+
$this->redirect(array('menuaction' =>
'booking.uimassbooking.schedule', 'id'=>$booking['building_id']));
}
- else if ( ($_POST['recurring'] == 'on' ||
$_POST['outseason'] == 'on') && !$errors && $step > 1)
+ else if ( ($_POST['recurring'] == 'on' ||
$_POST['outseason'] == 'on') && !$errors['booking'] &&
!$errors['season_boundary'] && $step > 1)
{
if ($_POST['recurring'] == 'on') {
$repeat_until =
strtotime($_POST['repeat_until'])+60*60*24;
@@ -284,7 +308,9 @@
$todate = date('Y-m-d H:i',
strtotime($_POST['to_']) + ($interval*$i));
$booking['from_'] = $fromdate;
$booking['to_'] = $todate;
+
$err =
$this->bo->validate($booking);
+
if ($err)
{
$invalid_dates[$i]['from_'] = $fromdate;
@@ -296,8 +322,27 @@
$valid_dates[$i]['to_']
= $todate;
if ($step == 3)
{
-
$booking['secret'] = $this->generate_secret();
- $receipt =
$this->bo->add($booking);
+ if( isset($noallocation)) {
+ $allocation['resources'] =
$booking['resources'];
+ $allocation['cost'] = $booking['cost'];
+ $allocation['building_id'] =
$booking['building_id'];
+ $allocation['building_name'] =
$booking['building_name'];
+ $allocation['season_id'] =
$booking['season_id'];
+ $allocation['organization_id'] =
$booking['organization_id'];
+ $allocation['organization_name'] =
$booking['organization_name'];
+ $allocation['from_'] = $booking['from_'];
+ $allocation['to_'] = $booking['to_'];
+ $allocation['active'] =
'1';
+ $allocation['completed'] = '0';
+ $receipt =
$this->allocation_bo->add($allocation);
+ $booking['allocation_id'] = $receipt['id'];
+
$booking['secret'] = $this->generate_secret();
+ $receipt =
$this->bo->add($booking);
+ $booking['allocation_id'] = '';
+ } else {
+
$booking['secret'] = $this->generate_secret();
+ $receipt =
$this->bo->add($booking);
+ }
}
}
$i++;
@@ -324,11 +369,7 @@
$groups = $groups['results'];
$resouces_full =
$this->resource_bo->so->read(array('filters'=>array('id'=>$booking['resources']),
'sort'=>'name'));
- $res_names = array();
- foreach($resouces_full['results'] as $res)
- {
- $res_names[] = array('id' => $res['id'],'name'
=> $res['name']);
- }
+
if ($step < 2)
{
self::render_template('booking_new',
array('booking' => $booking,
@@ -343,7 +384,7 @@
'outseason' => $_POST['outseason'],
'date_from' => $time_from[0],
'date_to' => $time_to[0],
- 'res_names' => $res_names)
+ 'noallocation' => $noallocation)
);
}
else if ($step == 2)
@@ -361,7 +402,8 @@
'to_date' => $_POST['to_'],
'valid_dates' => $valid_dates,
'invalid_dates' => $invalid_dates,
- 'groups' => $groups)
+ 'groups' => $groups,
+ 'noallocation' => $noallocation)
);
}
}
Modified: branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/inc/class.uievent.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -71,9 +71,13 @@
'source' =>
self::link(array('menuaction' => 'booking.uievent.index', 'phpgw_return_as' =>
'json')),
'field' => array(
array(
+ 'key' => 'id',
+ 'label' => lang('ID'),
+ 'formatter' =>
'YAHOO.booking.formatLink'
+ ),
+ array(
'key' => 'description',
'label' =>
lang('Event'),
- 'formatter' =>
'YAHOO.booking.formatLink'
),
array(
'key' =>
'activity_name',
@@ -372,6 +376,9 @@
$this->redirect(array('menuaction' =>
'booking.uievent.edit', 'id'=>$receipt['id'], 'secret'=>$event['secret'],
'warnings'=>$errors));
}
}
+ if ($errors['event']) {
+ $errors['warning'] = lang('NB! No data will be saved, if you
navigate away you will loose all.');
+ }
$default_dates = array_map(array(self,
'_combine_dates'), '','');
array_set_default($event, 'dates', $default_dates);
Modified: branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
===================================================================
--- branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
2011-03-24 14:09:35 UTC (rev 7142)
@@ -2,7 +2,7 @@
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports
http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1"
language="groovy" pageWidth="595" pageHeight="842" columnWidth="555"
leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="0.9090909090909091"/>
<property name="ireport.x" value="0"/>
- <property name="ireport.y" value="478"/>
+ <property name="ireport.y" value="384"/>
<property name="net.sf.jasperreports.export.pdf.tagged" value="true"/>
<property name="net.sf.jasperreports.export.pdf.tag.language"
value="EN-US"/>
<style name="table">
@@ -20,11 +20,11 @@
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
- <style name="headers" isDefault="false" forecolor="#808080"
fontName="Serif" fontSize="14"/>
+ <style name="headers" forecolor="#808080" fontName="Serif"
fontSize="14"/>
<style name="Sans_Normal" isDefault="true" fontName="Serif"
fontSize="10" isBold="false" isItalic="false" isUnderline="false"
isStrikeThrough="false"/>
- <style name="Sans_Bold" isDefault="false" fontName="Serif"
fontSize="10" isBold="true" isItalic="false" isUnderline="false"
isStrikeThrough="false"/>
- <style name="Sans_Italic" isDefault="false" fontName="Serif"
fontSize="10" isBold="false" isItalic="true" isUnderline="false"
isStrikeThrough="false"/>
- <style name="Sans_Bold_Italic" isDefault="false" fontName="Serif"
fontSize="10" isBold="true" isItalic="true" isUnderline="false"
isStrikeThrough="false"/>
+ <style name="Sans_Bold" fontName="Serif" fontSize="10" isBold="true"
isItalic="false" isUnderline="false" isStrikeThrough="false"/>
+ <style name="Sans_Italic" fontName="Serif" fontSize="10" isBold="false"
isItalic="true" isUnderline="false" isStrikeThrough="false"/>
+ <style name="Sans_Bold_Italic" fontName="Serif" fontSize="10"
isBold="true" isItalic="true" isUnderline="false" isStrikeThrough="false"/>
<subDataset name="resources">
<parameter name="APPLICATION_ID" class="java.lang.Integer"/>
<queryString>
@@ -53,7 +53,7 @@
<parameter name="APPLICATION_ID" class="java.lang.Integer"/>
<queryString language="SQL">
<![CDATA[SELECT
- to_char(time,'DD/MM/YYYY HH24:MI') AS date, author, comment FROM
"bb_application_comment" bb_application_comment WHERE
bb_application_comment.application_id = $P!{APPLICATION_ID} AND
bb_application_comment.type = 'comment']]>
+ to_char(time,'DD/MM/YYYY HH24:MI') AS date, author, comment FROM
"bb_application_comment" bb_application_comment WHERE
bb_application_comment.application_id = $P!{APPLICATION_ID} AND
bb_application_comment.type = 'comment' OFFSET 1]]>
</queryString>
<field name="date" class="java.lang.String"/>
<field name="author" class="java.lang.String"/>
@@ -212,7 +212,7 @@
<textElement>
<font pdfFontName="Helvetica"
isPdfEmbedded="true"/>
</textElement>
- <textFieldExpression
class="java.lang.String"><![CDATA["Status: " + ( $F{application_status} ==
"CONFIRMED" ? "Bekreftet" : $F{application_status} )]]></textFieldExpression>
+ <textFieldExpression
class="java.lang.String"><![CDATA["Status: " + ( $F{application_status} ==
"ACCEPTED" ? "Bekreftet" : $F{application_status} )]]></textFieldExpression>
</textField>
<textField>
<reportElement x="84" y="326" width="455"
height="13"/>
@@ -322,11 +322,6 @@
</jr:column>
</jr:table>
</componentElement>
- <textField>
- <reportElement style="Sans_Normal" x="244"
y="79" width="197" height="13"/>
- <textElement/>
- <textFieldExpression
class="java.lang.String"><![CDATA["E-post: " +
$F{contact_email}]]></textFieldExpression>
- </textField>
</band>
<band height="306">
<elementGroup>
Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2011-03-24
14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2011-03-24
14:09:35 UTC (rev 7142)
@@ -488,3 +488,4 @@
Allocations with existing allocations or bookings (%1) booking no
Tildeinger med eksisterende tildelinger eller bookinger (%1)
Contact information name is to long. max 50 characters booking no Navn i
kontakt informasjon er for langt. Maks 50 tegn
Show in portal booking no Vis i portal
+NB! No data will be saved, if you navigate away you will loose all. booking
no NB! Ingen data er lagret, viss du navigerer vekk så mister du alt.
Modified:
branches/Version-1_0-branch/booking/templates/base/booking_new_preview.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/booking_new_preview.xsl
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/booking/templates/base/booking_new_preview.xsl
2011-03-24 14:09:35 UTC (rev 7142)
@@ -13,7 +13,10 @@
<input type="hidden" name="season_id"
value="{booking/season_id}"/>
<input type="hidden" name="building_id"
value="{booking/building_id}"/>
<input type="hidden" name="building_name"
value="{booking/building_name}"/>
+ <input type="hidden" name="organization_id"
value="{booking/organization_id}"/>
+ <input type="hidden" name="organization_name"
value="{booking/organization_name}"/>
<input type="hidden" name="allocation_id"
value="{booking/allocation_id}"/>
+ <input type="hidden" name="noallocation"
value="{noallocation}" />
<input type="hidden" name="step" value="{step}" />
<input type="hidden" name="from_" value="{from_date}" />
<input type="hidden" name="to_" value="{to_date}" />
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.categories.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -703,9 +703,10 @@
$cat_list[] = array
(
- 'cat_id' => $cat['id'],
- 'name' => $name,
- 'selected' => $sel_cat
+ 'cat_id' => $cat['id'],
+ 'name' => $name,
+ 'description' => $cat['description'],
+ 'selected' => $sel_cat
);
}
Modified: branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/phpgwapi/templates/base/categories.xsl
2011-03-24 14:09:35 UTC (rev 7142)
@@ -40,13 +40,16 @@
</xsl:template>
<xsl:template match="cat_list">
- <xsl:variable name="cat_id"><xsl:value-of
select="cat_id"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="selected != ''">
- <option value="{$cat_id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="name"/></option>
- </xsl:when>
- <xsl:otherwise>
- <option value="{$cat_id}"><xsl:value-of
disable-output-escaping="yes" select="name"/></option>
- </xsl:otherwise>
- </xsl:choose>
+ <option value="{cat_id}">
+ <xsl:if test="selected != ''">
+ <xsl:attribute name="selected" value="selected"
/>
+ </xsl:if>
+ <xsl:if test="description != ''">
+ <xsl:attribute name="title">
+ <xsl:value-of select="description"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
</xsl:template>
+
Modified: branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/property/inc/class.uirequest.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -1413,7 +1413,7 @@
'condition_list'
=> $this->bo->select_conditions($id),
'building_part_list'
=> array('options' =>
$this->bocommon->select_category_list(array('type'=> 'building_part','selected'
=>$values['building_part'], 'order' => 'id', 'id_in_name' => 'num' ))),
);
-//_debug_array($data['regulations']);die();
+//_debug_array($data);die();
phpgwapi_yui::load_widget('dragdrop');
phpgwapi_yui::load_widget('datatable');
phpgwapi_yui::load_widget('menu');
@@ -1504,7 +1504,7 @@
$tabs = array
(
'general' =>
array('label' => lang('general'), 'link' => '#general'),
- 'location' =>
array('label' => lang('importance'), 'link' => '#importance'),
+ 'condition' =>
array('label' => lang('condition'), 'link' => '#condition'),
'budget' =>
array('label' => lang('documents'), 'link' => '#documents'),
'history' =>
array('label' => lang('history'), 'link' => '#history')
);
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-03-24
14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-03-24
14:09:35 UTC (rev 7142)
@@ -339,6 +339,7 @@
communication descriptions manager property no Kommunikasjons
beskrivelse
communication types manager property no Type kommunikasjon
composites property no Leieobjekter
+condition property no Tilstand
condidtion degree property no Tilstandsgrad
config property no Konfigurer
configuration property no Konfigurasjon
Modified: branches/Version-1_0-branch/property/templates/base/request.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/request.xsl
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/property/templates/base/request.xsl
2011-03-24 14:09:35 UTC (rev 7142)
@@ -438,7 +438,7 @@
</tr>
</table>
</div>
- <div id="importance">
+ <div id="condition">
<table>
<tr>
<td>
Modified: branches/Version-1_0-branch/rental/inc/SnappyMedia.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/SnappyMedia.php 2011-03-24
14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/inc/SnappyMedia.php 2011-03-24
14:09:35 UTC (rev 7142)
@@ -23,6 +23,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
*/
abstract class SnappyMedia
{
Modified: branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -200,10 +200,19 @@
$composite->set_custom_postcode($this->unmarshal($this->db->f('postcode',
true), 'string'));
$composite->set_custom_place($this->unmarshal($this->db->f('place', true),
'string'));
$composite->set_area($this->unmarshal($this->db->f('area', true), 'float'));
-
$composite->set_status($this->unmarshal($this->db->f('status', true),
'string'));
}
// Location code
$location_code = $this->unmarshal($this->db->f('location_code',
true), 'string');
+
+ //Status
+ $database_status = $this->unmarshal($this->db->f('status',
true), 'string');
+ $composite_status = $composite->get_status();
+
+ if($composite_status != 'Ikke ledig')
+ {
+ $composite->set_status($database_status);
+ }
+
if(!$composite->contains_unit($location_code))
{
//composite inneholder ikke unit -> legg den til
Modified: branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/inc/class.uicontract.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -204,7 +204,19 @@
if(!$export){
//Add context menu columns (actions and labels)
- array_walk($rows, array($this, 'add_actions'),
array($type,$ids,$adjustment_id));
+ $config =
CreateObject('phpgwapi.config','rental');
+
+ //Check if user has access to Catch module
+ $access =
$this->acl->check('.',PHPGW_ACL_READ,'catch');
+ if($access)
+ {
+ $config->read();
+ $entity_id =
$config->config_data['entity_config_move_in_out'];
+ $category_id_in =
$config->config_data['category_config_move_in'];
+ $category_id_out =
$config->config_data['category_config_move_out'];
+ }
+
+ array_walk($rows, array($this, 'add_actions'),
array($type,$ids,$adjustment_id,$entity_id,$category_id_in,$category_id_out));
}
//var_dump("Usage " .memory_get_usage() . " bytes after
menu");
@@ -230,7 +242,11 @@
$type = $params[0];
$ids = $params[1];
$adjustment_id = $params[2];
+ $entity_id = $params[3];
+ $category_id_in = $params[4];
+ $category_id_out = $params[5];
+
switch($type)
{
case 'last_edited_by':
@@ -296,6 +312,20 @@
$value['labels'][] =
lang('make_pdf').": ". $pdf_template[0];
$temlate_counter++;
}
+
//http://portico/pe/index.php?menuaction=property.uientity.index&second_display=1&entity_id=3&cat_id=1&type=catch&district_id=0&query=Tes&start_date=&end_date=&click_history=06014d0abc7293bfb52ff5d1c04f3cb8&phpgw_return_as=json
+ if(isset($entity_id) && $entity_id !=
'' && isset($category_id_in) && $category_id_in != '')
+ {
+ $value['ajax'][] = false;
+ $value['actions'][] =
html_entity_decode(self::link(array('menuaction' => 'property.uientity.index',
'entity_id' => $entity_id, 'cat_id' => $category_id_in,'query' =>
$value['old_contract_id'], 'type' => 'catch')));
+ $value['labels'][] =
lang('show_move_in_reports');
+ }
+
+ if(isset($entity_id) && $entity_id !=
'' && isset($category_id_out) && $category_id_out != '')
+ {
+ $value['ajax'][] = false;
+ $value['actions'][] =
html_entity_decode(self::link(array('menuaction' => 'property.uientity.index',
'entity_id' => $entity_id, 'cat_id' => $category_id_out,'query' =>
$value['old_contract_id'], 'type' => 'catch')));
+ $value['labels'][] =
lang('show_move_out_reports');
+ }
}
}
Modified: branches/Version-1_0-branch/rental/inc/hook_config.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/hook_config.inc.php 2011-03-24
14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/inc/hook_config.inc.php 2011-03-24
14:09:35 UTC (rev 7142)
@@ -1,4 +1,4 @@
-<?php
+ <?php
/**
* Rental - configuration hook
*
@@ -32,7 +32,7 @@
$group_assigned =
isset($config['create_user_based_on_email_group']) ?
$config['create_user_based_on_email_group'] : '';
$out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
-
+
foreach ( $groups as $group => $label)
{
$selected = '';
@@ -46,4 +46,98 @@
HTML;
}
return $out;
+ }
+
+ function entity_config_move_in_out($config)
+ {
+ $entity =
CreateObject('property.soadmin_entity');
+ $entities = $entity->read(array('allrows' => true, 'type'
=> 'catch'));
+ $selected_entity = isset($config['entity_config_move_in_out'])
? $config['entity_config_move_in_out'] : '';
+ $out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
+ if ( is_array($entities) && count($entities) )
+ {
+ foreach($entities as $entry)
+ {
+
+ $id = $entry['id'];
+ $selected = '';
+ if ( $selected_entity == $id )
+ {
+ $selected = ' selected';
+ }
+
+ $out .= <<<HTML
+ <option
value="{$id}"{$selected}>{$entry['name']}</option>
+
+HTML;
+ }
+ }
+ return $out;
+ }
+
+ function category_config_move_in($config)
+ {
+ $selected_entity = isset($config['entity_config_move_in_out'])
? $config['entity_config_move_in_out'] : '';
+ $selected_category = isset($config['category_config_move_in'])
? $config['category_config_move_in'] : '';
+ $out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
+
+ if(isset($selected_entity) && $selected_entity != '')
+ {
+ $entity =
CreateObject('property.soadmin_entity');
+ $cat_list =
$entity->read_category(array('allrows'=>true,'entity_id'=>$selected_entity,
'type' => 'catch'));
+
+
+ if (is_array($cat_list) && count($cat_list) )
+ {
+
+ foreach($cat_list as $entry)
+ {
+ $id = $entry['id'];
+ if ( $selected_category == $id )
+ {
+ $selected = ' selected';
+ }
+
+ $out .= <<<HTML
+ <option
value="{$id}"{$selected}>{$entry['name']}</option>
+
+HTML;
+
+ }
+ }
+ }
+ return $out;
+ }
+
+ function category_config_move_out($config)
+ {
+ $selected_entity = isset($config['entity_config_move_in_out'])
? $config['entity_config_move_in_out'] : '';
+ $selected_category = isset($config['category_config_move_out'])
? $config['category_config_move_out'] : '';
+ $out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
+
+ if(isset($selected_entity) && $selected_entity != '')
+ {
+ $entity =
CreateObject('property.soadmin_entity');
+ $cat_list =
$entity->read_category(array('allrows'=>true,'entity_id'=>$selected_entity,
'type' => 'catch'));
+
+ if (is_array($cat_list) && count($cat_list) )
+ {
+
+ foreach($cat_list as $entry)
+ {
+ $id = $entry['id'];
+ if ( $selected_category == $id )
+ {
+ $selected = ' selected';
+ }
+
+ $out .= <<<HTML
+ <option
value="{$id}"{$selected}>{$entry['name']}</option>
+
+HTML;
+
+ }
+ }
+ }
+ return $out;
}
\ No newline at end of file
Modified: branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/inc/model/class.contract.inc.php
2011-03-24 14:09:35 UTC (rev 7142)
@@ -142,7 +142,17 @@
* @return string with UNIX time.
*/
public function get_billing_start_date() {
- return isset($this->billing_start_date) ?
$this->billing_start_date : isset($this->contract_date) ?
$this->contract_date->get_start_date() : '';
+ if(isset($this->billing_start_date))
+ {
+ return $this->billing_start_date;
+ }
+
+ if(isset($this->contract_date))
+ {
+ return $this->contract_date->get_start_date();
+ }
+
+ return '';
}
public function set_location_id($location_id)
Modified: branches/Version-1_0-branch/rental/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/rental/setup/phpgw_no.lang 2011-03-24
14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/setup/phpgw_no.lang 2011-03-24
14:09:35 UTC (rev 7142)
@@ -82,6 +82,8 @@
calendar_months rental no
["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"]
calendar_weekdays rental no ["Sø","Ma","Ti","On","To","Fr","Lø"]
cancel rental no Avbryt
+category config move in rental no Kategori for
innflyttingsmeldinger
+category config move out rental no Kategori for
utflyttingsmeldinger
close rental no Lukk
clear rental no Nullstill
closing_due_date rental no Nær opsjonsfrist
@@ -194,6 +196,7 @@
email_create_user_based_on_email_title rental no Tilgang til Portico
Estate
email_create_user_based_on_email_message rental no Hei %1
%2:<br/>Det er opprettet en tilgang for deg i Portico
Estate<br/><br/>Brukernavnet er e-posten din<br/>Passordet er
%3<br/><br/>Systemet kan nås på adressen %4
ended rental no Avsluttet
+entity config move in out rental no Entitet for inn- og utflytting
error_create_user_based_on_email rental no En feil oppstod under
opprettelse av bruker
error_create_user_based_on_email_account_exist rental no En konto med
denne e-posten som brukernavn eksisterer allerede
error_create_user_based_on_email_not_valid_address rental no Kan
ikke opprette kontoen pga av e-postadressen ikke er gyldig
@@ -494,6 +497,9 @@
set_payer rental no Sett som fakturamottaker
shortcuts rental no Snarveier
show_affected_contracts rental no Vis kontrakter relatert til
reguleringen
+show_move_in_reports rental no Vis jasperreport for innflyttingsmelding
+show_move_out_reports rental no Vis jasperreport for utflyttingsmelding
+show_in_out_move_reports rental no Vis jasperreports for inn- og
utflyttingsmeldinger
showing_composite rental no Leieobjekt
showing_contract rental no Kontrakt
showing rental no Viser priselement
Modified: branches/Version-1_0-branch/rental/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/config.tpl
2011-03-24 14:07:06 UTC (rev 7141)
+++ branches/Version-1_0-branch/rental/templates/base/config.tpl
2011-03-24 14:09:35 UTC (rev 7142)
@@ -53,6 +53,30 @@
</td>
</tr>
<tr class="row_off">
+ <td>{lang_entity_config_move_in_out}:</td>
+ <td>
+ <select name="newsettings[entity_config_move_in_out]">
+{hook_entity_config_move_in_out}
+ </select>
+ </td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_category_config_move_in}:</td>
+ <td>
+ <select name="newsettings[category_config_move_in]">
+{hook_category_config_move_in}
+ </select>
+ </td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_category_config_move_out}:</td>
+ <td>
+ <select name="newsettings[category_config_move_out]">
+{hook_category_config_move_out}
+ </select>
+ </td>
+ </tr>
+ <tr class="row_off">
<td>{lang_use_fellesdata}:</td>
<td>
<select name="newsettings[use_fellesdata]">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7142] Merge 7132:7141 from trunk,
Sigurd Nes <=