[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6693] Property: more on custom fields
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6693] Property: more on custom fields |
Date: |
Tue, 21 Dec 2010 20:29:05 +0000 |
Revision: 6693
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6693
Author: sigurdne
Date: 2010-12-21 20:29:05 +0000 (Tue, 21 Dec 2010)
Log Message:
-----------
Property: more on custom fields
Modified Paths:
--------------
trunk/property/inc/class.menu.inc.php
trunk/property/inc/class.uiproject.inc.php
trunk/property/templates/base/attributes_form.xsl
trunk/property/templates/base/project.xsl
trunk/property/templates/base/request.xsl
Modified: trunk/property/inc/class.menu.inc.php
===================================================================
--- trunk/property/inc/class.menu.inc.php 2010-12-21 19:24:14 UTC (rev
6692)
+++ trunk/property/inc/class.menu.inc.php 2010-12-21 20:29:05 UTC (rev
6693)
@@ -317,6 +317,11 @@
'text' => lang('project
categories'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.uicategories.index', 'appname' => 'property', 'location' => '.project',
'global_cats' => 'true', 'menu_selection' => 'admin::property::project_cats') )
),
+ 'project_attribs' => array
+ (
+ 'text' => lang('project
attributes'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.ui_custom.list_attribute', 'appname' => 'property', 'location'
=>'.project', 'menu_selection' => 'admin::property::project_attribs') )
+ ),
'workorder_detail' => array
(
'text' => lang('Workorder
Detail Categories'),
@@ -391,6 +396,11 @@
'text' => lang('Request
condition_type'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index', 'type' => 'r_condition_type') )
),
+ 'request_attribs' => array
+ (
+ '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
(
'text' =>
lang('order_dim1'),//translation have to refeflect the (local) meaning
Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php 2010-12-21 19:24:14 UTC (rev
6692)
+++ trunk/property/inc/class.uiproject.inc.php 2010-12-21 20:29:05 UTC (rev
6693)
@@ -1295,21 +1295,6 @@
$attribute['link_history'] =
$GLOBALS['phpgw']->link('/index.php',$link_history_data);
}
}
-
- $attributes_groups =
$this->custom->get_attribute_groups('property', $this->acl_location,
$values['attributes']);
-
- $attributes = array();
- foreach ($attributes_groups as $group)
- {
- if(isset($group['attributes']))
- {
- $tabs[str_replace(' ', '_',
$group['name'])] = array('label' => $group['name'], 'link' => '#' .
str_replace(' ', '_', $group['name']));
- $group['link'] = str_replace('
', '_', $group['name']);
- $attributes[] = $group;
- }
- }
- unset($attributes_groups);
- unset($values['attributes']);
}
@@ -1531,7 +1516,7 @@
(
'suppressmeter'
=> isset($config->config_data['project_suppressmeter']) &&
$config->config_data['project_suppressmeter'] ? 1 : '',
'suppresscoordination'
=> $suppresscoordination,
- 'attributes_group'
=> $attributes,
+ 'attributes'
=> $values['attributes'],
'lookup_functions'
=> isset($values['lookup_functions'])?$values['lookup_functions']:'',
'b_account_data'
=> $b_account_data,
'ecodimb_data'
=> $ecodimb_data,
Modified: trunk/property/templates/base/attributes_form.xsl
===================================================================
--- trunk/property/templates/base/attributes_form.xsl 2010-12-21 19:24:14 UTC
(rev 6692)
+++ trunk/property/templates/base/attributes_form.xsl 2010-12-21 20:29:05 UTC
(rev 6693)
@@ -287,6 +287,17 @@
</tr>
</table>
</xsl:when>
+
<xsl:when test="datatype='bolean'">
+
<input type="checkbox" name="values_attribute[{counter}][value]" value="1">
+
<xsl:choose>
+
<xsl:when test="value!=''">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+
</input>
+
</xsl:when>
<xsl:when test="datatype='event'">
<xsl:choose>
<xsl:when test="warning!=''">
Modified: trunk/property/templates/base/project.xsl
===================================================================
--- trunk/property/templates/base/project.xsl 2010-12-21 19:24:14 UTC (rev
6692)
+++ trunk/property/templates/base/project.xsl 2010-12-21 20:29:05 UTC (rev
6693)
@@ -373,6 +373,7 @@
</textarea>
</td>
</tr>
+ <xsl:call-template name="attributes"/>
</table>
</div>
Modified: trunk/property/templates/base/request.xsl
===================================================================
--- trunk/property/templates/base/request.xsl 2010-12-21 19:24:14 UTC (rev
6692)
+++ trunk/property/templates/base/request.xsl 2010-12-21 20:29:05 UTC (rev
6693)
@@ -11,9 +11,6 @@
<xsl:when test="priority_key">
<xsl:apply-templates select="priority_form"/>
</xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="list"/>
- </xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -82,169 +79,6 @@
</tr>
</xsl:template>
- <xsl:template match="list">
- <xsl:apply-templates select="menu"/>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <tr>
- <td>
- <xsl:call-template name="categories"/>
- </td>
- <td align="left">
- <xsl:call-template
name="status_filter"/>
- </td>
- <td align="center">
- <xsl:call-template
name="user_id_filter"/>
- </td>
- <xsl:choose>
- <xsl:when test="link_priority_key!=''">
- <td valign="top" align="right">
- <xsl:variable
name="link_priority_key"><xsl:value-of
select="link_priority_key"/></xsl:variable>
- <xsl:variable
name="lang_priority_help"><xsl:value-of
select="lang_priority_help"/></xsl:variable>
- <xsl:variable
name="lang_priority_key"><xsl:value-of
select="lang_priority_key"/></xsl:variable>
- <a href="javascript:var
w=window.open('{$link_priority_key}','','width=300,height=300')"
-
onMouseOver="overlib('{$lang_priority_help}', CAPTION, '{$lang_priority_key}')"
-
onMouseOut="nd()">
- <xsl:value-of
select="lang_priority_key"/></a>
- </td>
- </xsl:when>
- </xsl:choose>
-
- <td align="right">
- <xsl:call-template name="search_field"/>
- </td>
- <td class="small_text" valign="top"
align="left">
- <xsl:variable
name="link_download"><xsl:value-of select="link_download"/></xsl:variable>
- <xsl:variable
name="lang_download_help"><xsl:value-of
select="lang_download_help"/></xsl:variable>
- <xsl:variable
name="lang_download"><xsl:value-of select="lang_download"/></xsl:variable>
- <a href="javascript:var
w=window.open('{$link_download}','','')"
-
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')"
- onMouseOut="nd()">
- <xsl:value-of
select="lang_download"/></a>
- </td>
- </tr>
- <tr>
- <td colspan="14" width="100%">
- <xsl:call-template name="nextmatchs"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:call-template name="table_header"/>
- <xsl:choose>
- <xsl:when test="project_id!=''">
- <xsl:variable
name="add_to_project_action"><xsl:value-of
select="add_to_project_action"/></xsl:variable>
- <form method="post"
action="{$add_to_project_action}">
- <xsl:choose>
- <xsl:when test="values">
-
<xsl:call-template name="values"/>
- </xsl:when>
- </xsl:choose>
- <tr>
- <td height="50">
- <input
type="submit" name="add" value="{lang_update_project}"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_add_to_project_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </td>
- </tr>
- </form>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="values">
- <xsl:call-template
name="values"/>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="table_add !=''">
- <xsl:apply-templates
select="table_add"/>
- </xsl:when>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </xsl:template>
-
- <xsl:template name="values">
- <xsl:for-each select="values" >
- <tr>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of select="@class"/>
- </xsl:when>
- <xsl:when test="position() mod 2 = 0">
- <xsl:text>row_off</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>row_on</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:for-each select="row" >
- <xsl:choose>
- <xsl:when test="link">
- <td align="center">
- <a
href="{link}" target="{target}"
onMouseover="window.status='{statustext}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="text"/></a>
- </td>
- <xsl:choose>
- <xsl:when test="//lookup!=''">
- <xsl:if
test="position() = last()">
- <td
valign="center">
- <input
type="checkbox" name="add_request[request_id][]" value="{request_id}"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_select_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </td>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
-
-
- </xsl:when>
- <xsl:otherwise>
- <td align="left">
- <xsl:value-of
select="value"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- </xsl:for-each>
- </xsl:template>
-
-
- <xsl:template match="table_add">
- <tr>
- <td height="50">
- <xsl:variable
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
- <xsl:variable
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
- <form method="post"
action="{$add_action}">
- <input type="submit" name="add"
value="{$lang_add}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_add_statustext"/>
- <xsl:text>';
return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </xsl:template>
-
-
-
-
-
-
-
-
<!-- add / edit -->
<xsl:template match="edit" xmlns:php="http://php.net/xsl">
@@ -597,48 +431,43 @@
<td align="left">
<xsl:value-of
select="lang_authorities_demands"/>
</td>
-
<td align="center">
+
<td>
<xsl:choose>
<xsl:when
test="authorities_demands='1'">
-
<input type="checkbox"
name="values[authorities_demands]" value="1" checked="checked"
onMouseout="window.status='';return true;">
-
<xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_authorities_demands_statustext"/>
-
<xsl:text>';
return true;</xsl:text>
+
<input type="checkbox"
name="values[authorities_demands]" value="1" checked="checked">
+
<xsl:attribute
name="title">
+
<xsl:value-of
select="lang_authorities_demands_statustext"/>
</xsl:attribute>
</input>
</xsl:when>
<xsl:otherwise>
-
<input type="checkbox"
name="values[authorities_demands]" value="1"
onMouseout="window.status='';return true;">
-
<xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_authorities_demands_statustext"/>
-
<xsl:text>';
return true;</xsl:text>
+
<input type="checkbox"
name="values[authorities_demands]" value="1">
+
<xsl:attribute
name="title">
+
<xsl:value-of
select="lang_authorities_demands_statustext"/>
</xsl:attribute>
</input>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
+
<xsl:call-template name="attributes"/>
+
<tr>
+
<td align="left">
+
<xsl:value-of select="lang_score"/>
+
</td>
+
<td>
+
<xsl:value-of select="value_score"/>
+
</td>
+
</tr>
</table>
</td>
</tr>
-
<xsl:call-template name="attributes"/>
</table>
</div>
<div id="documents">
<table>
- <tr>
- <td
align="left">
-
<xsl:value-of select="lang_score"/>
- </td>
- <td>
-
<xsl:value-of select="value_score"/>
- </td>
- </tr>
-
<xsl:choose>
<xsl:when test="files!=''">
<!-- <xsl:call-template name="file_list"/> -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6693] Property: more on custom fields,
Sigurd Nes <=