fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7538] property: tweak request


From: Sigurd Nes
Subject: [Fmsystem-commits] [7538] property: tweak request
Date: Tue, 30 Aug 2011 11:41:23 +0000

Revision: 7538
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7538
Author:   sigurdne
Date:     2011-08-30 11:41:23 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
property: tweak request

Modified Paths:
--------------
    trunk/property/inc/class.menu.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/setup/phpgw_no.lang
    trunk/property/templates/base/request.xsl

Modified: trunk/property/inc/class.menu.inc.php
===================================================================
--- trunk/property/inc/class.menu.inc.php       2011-08-30 11:40:54 UTC (rev 
7537)
+++ trunk/property/inc/class.menu.inc.php       2011-08-30 11:41:23 UTC (rev 
7538)
@@ -412,7 +412,7 @@
                                                ),
                                                'request_attribs'       => array
                                                (
-                                                       'text'  => 
lang('request Attributes'),
+                                                       'text'  => 
lang('request attributes'),
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'admin.ui_custom.list_attribute', 'appname' => 'property', 'location' 
=>'.project.request', 'menu_selection' => 'admin::property::request_attribs') )
                                                ),
                                                'order_dim1'    => array

Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php  2011-08-30 11:40:54 UTC (rev 
7537)
+++ trunk/property/inc/class.sorequest.inc.php  2011-08-30 11:41:23 UTC (rev 
7538)
@@ -665,22 +665,26 @@
                        $values = 
$this->bocommon->validate_db_insert(array_values($value_set));
 
                        $this->db->query("INSERT INTO fm_request ({$cols}) 
VALUES ({$values})",__LINE__,__FILE__);
+_debug_array($request);die();
 
                        if(isset($request['condition']) && 
is_array($request['condition']))
                        {
                                foreach( $request['condition'] as 
$condition_type => $value_type )
                                {
                                        $_condition_type = 
isset($value_type['condition_type']) && $value_type['condition_type'] ? 
$value_type['condition_type'] : $condition_type;
-                                       $this->db->query("INSERT INTO 
fm_request_condition 
(request_id,condition_type,reference,degree,probability,consequence,user_id,entry_date)
 "
-                                               . "VALUES ('"
-                                               . (int) $request['id']. "','"
-                                               . (int) $_condition_type . "',"
-                                               . (int) 
$value_type['reference']. ","
-                                               . (int) $value_type['degree']. 
","
-                                               . (int) 
$value_type['probability']. ","
-                                               . (int) 
$value_type['consequence']. ","
-                                               . (int) $this->account . ","
-                                               . time() . 
")",__LINE__,__FILE__);
+                                       if($_condition_type)
+                                       {
+                                               $this->db->query("INSERT INTO 
fm_request_condition 
(request_id,condition_type,reference,degree,probability,consequence,user_id,entry_date)
 "
+                                                       . "VALUES ("
+                                                       . (int) $id. ","
+                                                       . (int) 
$_condition_type . ","
+                                                       . (int) 
$value_type['reference']. ","
+                                                       . (int) 
$value_type['degree']. ","
+                                                       . (int) 
$value_type['probability']. ","
+                                                       . (int) 
$value_type['consequence']. ","
+                                                               . (int) 
$this->account . ","
+                                                       . time() . 
")",__LINE__,__FILE__);
+                                       }
                                }
                        }
 
@@ -856,15 +860,20 @@
                        $this->db->query("UPDATE fm_request SET $value_set 
WHERE id= '{$request['id']}'",__LINE__,__FILE__);
 
                        $this->db->query("DELETE FROM fm_request_condition 
WHERE request_id='{$request['id']}'",__LINE__,__FILE__);
+
                        if(isset($request['condition']) && 
is_array($request['condition']))
                        {
                                foreach( $request['condition'] as 
$condition_type => $value_type )
                                {
                                        $_condition_type = 
isset($value_type['condition_type']) && $value_type['condition_type'] ? 
$value_type['condition_type'] : $condition_type;
+                                       if(isset($value_type['condition_type']) 
&& !$value_type['condition_type'])
+                                       {
+                                               continue;
+                                       }
                                        $this->db->query("INSERT INTO 
fm_request_condition 
(request_id,condition_type,reference,degree,probability,consequence,user_id,entry_date)
 "
-                                               . "VALUES ('"
-                                               . (int)$request['id']. "','"
-                                               . (int)$_condition_type . "',"
+                                               . "VALUES ("
+                                               . (int)$request['id']. ","
+                                               . (int)$_condition_type . ","
                                                . 
(int)$value_type['reference']. ","
                                                . (int)$value_type['degree']. 
","
                                                . 
(int)$value_type['probability']. ","

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2011-08-30 11:40:54 UTC (rev 
7537)
+++ trunk/property/inc/class.uirequest.inc.php  2011-08-30 11:41:23 UTC (rev 
7538)
@@ -357,7 +357,7 @@
                                                                        'url' 
=> "Javascript:window.open('".$GLOBALS['phpgw']->link('/index.php',
                                                                        array
                                                                        (
-                                                                               
'menuaction' => 
'property.uirequest.priority_key'))."','','left=50,top=100,width=350,height=250')",
+                                                                               
'menuaction' => 
'property.uirequest.priority_key'))."','','left=50,top=100,width=350,height=350,scrollbars=1')",
                                                                                
'value' => lang('Priority key'),
                                                                                
'tab_index' => 4
                                                                ),

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2011-08-30 11:40:54 UTC (rev 7537)
+++ trunk/property/setup/phpgw_no.lang  2011-08-30 11:41:23 UTC (rev 7538)
@@ -379,6 +379,7 @@
 correct error  property        no      Rett opp feil
 cost   property        no      kostnad
 cost estimate  property        no      Kostnadsestimat
+total cost estimate    property        no      Totalt kostnadsestimat
 cost - either budget or calculation    property        no      Beløp - enten 
budsjett eller kalkulalasjon
 cost (incl tax):       property        no      Kostnader (inkl mva)
 cost per unit  property        no      Enhetspris
@@ -870,6 +871,7 @@
 input text not entered!        property        no      Input tekst er ikke 
angitt!
 input type     property        no      input type
 input name     property        no      input navn
+select value   property        no      Angi verdi
 insert the date for the acquisition    property        no      angi dato for 
anskaffelsen
 insert the date for the initial value  property        no      angi dato for 
initiell verdi
 insert the value at the start-date as a positive amount        property        
no      angi verdie ved startdatoen som en positiv verdi
@@ -1244,7 +1246,7 @@
 priority key   property        no      Prioriteringsnøkkel
 priority keys has been updated property        no      prioriteringsnøkkel er 
oppdatert
 prizing        property        no      Priser
-probability    property        no      sansynlighet
+probability    property        no      Sansynlighet
 project        property        no      prosjekt
 .project       property        no      Prosjekt
 project.workorder      property        no      Prosjekt::Bestilling
@@ -1296,16 +1298,19 @@
 repeat property        no      serie
 repeat type    property        no      type serie
 repeat day     property        no      gjenta dag
-request        property        no      behov
+request        property        no      Behov
+project.request        property        no      Behov
+request attributes     property        no      Behov::attributter
 request %1 has been edited     property        no      anmodning %1 er oppdater
 request %1 has been saved      property        no      anmodning %1 er lagret
 request budget property        no      Budsjett for tiltak
+request condition type property        no      Behov::konsekvenstype
 request descr  property        no      Beskrivelse av tiltak
 request end date       property        no      anmodning frist
 request entry date     property        no      Registreringsdato for tiltak
 request id     property        no      Anmodnings ID
 request start date     property        no      anmodning startdato
-request status property        no      Status anmodning
+request status property        no      Behov::status
 request title  property        no      Tiltak tittel
 request description    property        no      Tilstand beskrivelse
 requirement    property        no      Behov/pålegg

Modified: trunk/property/templates/base/request.xsl
===================================================================
--- trunk/property/templates/base/request.xsl   2011-08-30 11:40:54 UTC (rev 
7537)
+++ trunk/property/templates/base/request.xsl   2011-08-30 11:41:23 UTC (rev 
7538)
@@ -336,7 +336,7 @@
 
                                                        <tr>
                                                                <td 
valign="top">
-                                                                       
<xsl:value-of select="php:function('lang', 'cost estimate')" />
+                                                                       
<xsl:value-of select="php:function('lang', 'total cost estimate')" />
                                                                </td>
                                                                <td>
                                                                        <input 
type="text" name="values[budget]" value="{value_budget}">
@@ -752,7 +752,7 @@
 
        </xsl:template>
 
-       <xsl:template match="condition_list">
+       <xsl:template match="condition_list" xmlns:php="http://php.net/xsl";>
                <tr>
                        <xsl:choose>
                                <xsl:when test="condition_type_list != ''">
@@ -765,28 +765,29 @@
                        </xsl:choose>
                <!--
                        <td class="small_text" align="center">
-                               <xsl:variable 
name="lang_reference_statustext"><xsl:value-of 
select="//lang_reference_statustext"/></xsl:variable>
-                               <select 
name="values[condition][{condition_type}][reference]" class="forms" 
title="{$lang_reference_statustext}">
+                               <select 
name="values[condition][{condition_type}][reference]" class="forms">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'select value')" />
+                                       </xsl:attribute>
                                        <xsl:apply-templates 
select="reference/options"/>
                                </select>
                        </td>
                -->
                        <td class="small_text" align="center">
-                               <xsl:variable 
name="lang_degree_statustext"><xsl:value-of 
select="//lang_degree_statustext"/></xsl:variable>
-                               <select 
name="values[condition][{condition_type}][degree]" class="forms" 
title="{$lang_degree_statustext}">
+                               <select 
name="values[condition][{condition_type}][degree]" class="forms">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'select value')" />
+                                       </xsl:attribute>
                                        <xsl:apply-templates 
select="degree/options"/>
                                </select>
                        </td>
-                       <td class="small_text" align="center">
-                               <xsl:variable 
name="lang_probability_statustext"><xsl:value-of 
select="//lang_probability_statustext"/></xsl:variable>
-                               <select 
name="values[condition][{condition_type}][probability]" class="forms" 
title="{$lang_probability_statustext}">
-                                       <xsl:apply-templates 
select="probability/options"/>
-                               </select>
-                       </td>
                        <xsl:choose>
                                <xsl:when test="condition_type_list != ''">
                                        <td class="small_text" align="left">
                                                <select 
name="values[condition][{condition_type}][condition_type]" class="forms">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'select value')" />
+                                                       </xsl:attribute>
                                                        <xsl:apply-templates 
select="condition_type_list/options"/>
                                                </select>
                                        </td>
@@ -794,11 +795,21 @@
                        </xsl:choose>
 
                        <td class="small_text" align="center">
-                               <xsl:variable 
name="lang_consequence_statustext"><xsl:value-of 
select="//lang_consequence_statustext"/></xsl:variable>
-                               <select 
name="values[condition][{condition_type}][consequence]" class="forms" 
title="{$lang_consequence_statustext}">
+                               <select 
name="values[condition][{condition_type}][consequence]" class="forms">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'select value')" />
+                                       </xsl:attribute>
                                        <xsl:apply-templates 
select="consequence/options"/>
                                </select>
                        </td>
+                       <td class="small_text" align="center">
+                               <select 
name="values[condition][{condition_type}][probability]" class="forms">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'select value')" />
+                                       </xsl:attribute>
+                                       <xsl:apply-templates 
select="probability/options"/>
+                               </select>
+                       </td>
                <!--
                        <td class="small_text" align="center">
                                <xsl:value-of select="failure"/>
@@ -920,6 +931,9 @@
                                </xsl:when>
                                <xsl:otherwise>
                                        <th width="20%" align="left">
+                                               <xsl:attribute name="title">
+                                                       
<xsl:text>Konsekvenstype - tema for tilstand</xsl:text>
+                                               </xsl:attribute>
                                                <xsl:value-of 
select="php:function('lang', 'consequence type')" />
                                        </th>
                                </xsl:otherwise>
@@ -930,34 +944,57 @@
                        </th>
                        -->
                        <th width="20%" align="center">
+                               <xsl:attribute name="title">
+                                               <xsl:text>Tilstandsgrad iht NS 
3424</xsl:text>
+                               </xsl:attribute>
                                <xsl:value-of select="php:function('lang', 
'condition degree')" />
                        </th>
-                       <th width="20%" align="center">
-                               <xsl:value-of select="php:function('lang', 
'Probability')" />
-                       </th>
                        <xsl:choose>
                                <xsl:when test="//condition_type_list != ''">
                                        <th width="20%" align="left">
+                                               <xsl:attribute name="title">
+                                                       
<xsl:text>Konsekvenstype - tema for tilstand</xsl:text>
+                                               </xsl:attribute>
                                                <xsl:value-of 
select="php:function('lang', 'consequence type')" />
                                        </th>
                                </xsl:when>
                        </xsl:choose>
 
                        <th width="20%" align="center">
+                               <xsl:attribute name="title">
+                                               <xsl:text>Konsekvensgrad iht NS 
3424</xsl:text>
+                               </xsl:attribute>
                                <xsl:value-of select="php:function('lang', 
'Consequence')" />
                        </th>
+                       <th width="20%" align="center">
+                               <xsl:attribute name="title">
+                                               <xsl:text>Sannsynlighet iht NS 
3424</xsl:text>
+                               </xsl:attribute>
+                               <xsl:value-of select="php:function('lang', 
'Probability')" />
+                       </th>
+
                <!--
                        <th width="5%" align="center">
                                <xsl:value-of select="php:function('lang', 
'failure')" />
                        </th>
                -->
                        <th width="5%" align="center">
+                                       <xsl:attribute name="title">
+                                               <xsl:text>Vekt = konfigurerbar 
verdi for hjelpeberegning av viktighet</xsl:text>
+                                       </xsl:attribute>
                                <xsl:value-of select="php:function('lang', 
'weight')" />
                        </th>
                        <th width="5%" align="center">
+                                       <xsl:attribute name="title">
+                                               <xsl:text>Risiko = 
Konsekvensgrad x Sannsynlighetsgrad</xsl:text>
+                                       </xsl:attribute>
                                <xsl:value-of select="php:function('lang', 
'risk')" />
                        </th>
                        <th width="5%" align="center">
+                                       <xsl:attribute name="title">
+                                               <xsl:text>Verdi for hjelp til 
sortering av viktighet</xsl:text>
+                                       </xsl:attribute>
+
                                <xsl:value-of select="php:function('lang', 
'score')" />
                        </th>
                </tr>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]