[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7357] Split configuration entity for catch-module (
From: |
Yngve Espelid |
Subject: |
[Fmsystem-commits] [7357] Split configuration entity for catch-module ( inn- og utflyttingsmeldinger) into two seperate configuration options and category selection based on these two entities . |
Date: |
Tue, 07 Jun 2011 13:00:38 +0000 |
Revision: 7357
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7357
Author: yes
Date: 2011-06-07 13:00:37 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Split configuration entity for catch-module (inn- og utflyttingsmeldinger) into
two seperate configuration options and category selection based on these two
entities.
Modified Paths:
--------------
trunk/rental/inc/class.uicontract.inc.php
trunk/rental/inc/hook_config.inc.php
trunk/rental/setup/phpgw_no.lang
trunk/rental/templates/base/config.tpl
Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php 2011-06-07 12:18:34 UTC (rev
7356)
+++ trunk/rental/inc/class.uicontract.inc.php 2011-06-07 13:00:37 UTC (rev
7357)
@@ -211,12 +211,13 @@
if($access)
{
$config->read();
- $entity_id =
$config->config_data['entity_config_move_in_out'];
+ $entity_id_in =
$config->config_data['entity_config_move_in'];
+ $entity_id_out =
$config->config_data['entity_config_move_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));
+ array_walk($rows, array($this, 'add_actions'),
array($type,$ids,$adjustment_id,$entity_id_in,$entity_id_out,$category_id_in,$category_id_out));
}
//var_dump("Usage " .memory_get_usage() . " bytes after
menu");
@@ -242,9 +243,10 @@
$type = $params[0];
$ids = $params[1];
$adjustment_id = $params[2];
- $entity_id = $params[3];
- $category_id_in = $params[4];
- $category_id_out = $params[5];
+ $entity_id_in = $params[3];
+ $entity_id_out = $params[4];
+ $category_id_in = $params[5];
+ $category_id_out = $params[6];
switch($type)
@@ -313,17 +315,17 @@
$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 != '')
+ if(isset($entity_id_in) &&
$entity_id_in != '' && 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['actions'][] =
html_entity_decode(self::link(array('menuaction' => 'property.uientity.index',
'entity_id' => $entity_id_in, '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 != '')
+ if(isset($entity_id_out) &&
$entity_id_out != '' && 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['actions'][] =
html_entity_decode(self::link(array('menuaction' => 'property.uientity.index',
'entity_id' => $entity_id_out, 'cat_id' => $category_id_out,'query' =>
$value['old_contract_id'], 'type' => 'catch')));
$value['labels'][] =
lang('show_move_out_reports');
}
}
Modified: trunk/rental/inc/hook_config.inc.php
===================================================================
--- trunk/rental/inc/hook_config.inc.php 2011-06-07 12:18:34 UTC (rev
7356)
+++ trunk/rental/inc/hook_config.inc.php 2011-06-07 13:00:37 UTC (rev
7357)
@@ -48,14 +48,14 @@
return $out;
}
- function entity_config_move_in_out($config)
+ function entity_config_move_in($config)
{
if(isset($GLOBALS['phpgw_info']['apps']['catch']))
{
$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 = '<select
name="newsettings[entity_config_move_in_out]">' . "\n";
+ $selected_entity =
isset($config['entity_config_move_in']) ? $config['entity_config_move_in'] : '';
+ $out = '<select
name="newsettings[entity_config_move_in]">' . "\n";
$out .= '<option value="">' . lang('none selected') .
'</option>' . "\n";
if ( is_array($entities) && count($entities) )
{
@@ -83,9 +83,44 @@
return $out;
}
+ function entity_config_move_out($config)
+ {
+ if(isset($GLOBALS['phpgw_info']['apps']['catch']))
+ {
+ $entity =
CreateObject('property.soadmin_entity');
+ $entities = $entity->read(array('allrows' =>
true, 'type' => 'catch'));
+ $selected_entity =
isset($config['entity_config_move_out']) ? $config['entity_config_move_out'] :
'';
+ $out = '<select
name="newsettings[entity_config_move_out]">' . "\n";
+ $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;
+ }
+ }
+ $out .= ' </select>' . "\n";
+ }
+ else
+ {
+ $out = '<b>The catch-module is not installed</b>' .
"\n";
+ }
+ return $out;
+ }
+
function category_config_move_in($config)
{
- $selected_entity = isset($config['entity_config_move_in_out'])
? $config['entity_config_move_in_out'] : '';
+ $selected_entity = isset($config['entity_config_move_in']) ?
$config['entity_config_move_in'] : '';
$selected_category = isset($config['category_config_move_in'])
? $config['category_config_move_in'] : '';
$out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
@@ -119,7 +154,7 @@
function category_config_move_out($config)
{
- $selected_entity = isset($config['entity_config_move_in_out'])
? $config['entity_config_move_in_out'] : '';
+ $selected_entity = isset($config['entity_config_move_out']) ?
$config['entity_config_move_out'] : '';
$selected_category = isset($config['category_config_move_out'])
? $config['category_config_move_out'] : '';
$out = '<option value="">' . lang('none selected') .
'</option>' . "\n";
Modified: trunk/rental/setup/phpgw_no.lang
===================================================================
--- trunk/rental/setup/phpgw_no.lang 2011-06-07 12:18:34 UTC (rev 7356)
+++ trunk/rental/setup/phpgw_no.lang 2011-06-07 13:00:37 UTC (rev 7357)
@@ -197,7 +197,8 @@
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
+entity config move out rental no Entitet for utflytting
+entity config move in rental no Entitet for innflytting
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
Modified: trunk/rental/templates/base/config.tpl
===================================================================
--- trunk/rental/templates/base/config.tpl 2011-06-07 12:18:34 UTC (rev
7356)
+++ trunk/rental/templates/base/config.tpl 2011-06-07 13:00:37 UTC (rev
7357)
@@ -53,11 +53,12 @@
</td>
</tr>
<tr class="row_off">
- <td>{lang_entity_config_move_in_out}:</td>
+ <td>{lang_entity_config_move_in}:</td>
<td>
-{hook_entity_config_move_in_out}
+{hook_entity_config_move_in}
</td>
</tr>
+
<tr class="row_on">
<td>{lang_category_config_move_in}:</td>
<td>
@@ -66,6 +67,12 @@
</select>
</td>
</tr>
+ <tr class="row_off">
+ <td>{lang_entity_config_move_out}:</td>
+ <td>
+{hook_entity_config_move_out}
+ </td>
+ </tr>
<tr class="row_off">
<td>{lang_category_config_move_out}:</td>
<td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7357] Split configuration entity for catch-module ( inn- og utflyttingsmeldinger) into two seperate configuration options and category selection based on these two entities .,
Yngve Espelid <=