[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16613] property: alter view attributes
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16613] property: alter view attributes |
Date: |
Sat, 22 Apr 2017 14:27:55 -0400 (EDT) |
Revision: 16613
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16613
Author: sigurdne
Date: 2017-04-22 14:27:55 -0400 (Sat, 22 Apr 2017)
Log Message:
-----------
property: alter view attributes
Modified Paths:
--------------
trunk/property/inc/class.uientity.inc.php
trunk/property/templates/base/attributes_view.xsl
trunk/property/templates/base/entity.xsl
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2017-04-22 17:08:53 UTC (rev
16612)
+++ trunk/property/inc/class.uientity.inc.php 2017-04-22 18:27:55 UTC (rev
16613)
@@ -713,7 +713,7 @@
$link_data = array
(
- 'menuaction' => 'property.uientity.edit',
+ 'menuaction' => 'property.uientity.view',
'entity_id' => $this->entity_id,
'cat_id' => $this->cat_id,
'type' => $this->type
@@ -2504,12 +2504,7 @@
'files' => isset($values['files']) ?
$values['files'] : '',
// 'jasperfiles'
=> isset($values['jasperfiles'])?$values['jasperfiles']:'',
'multiple_uploader' => $id ? true : '',
- /*'fileuploader_action' =>
"{menuaction:'property.fileuploader.add',"
- . "upload_target:'property.uientity.addfiles',"
- . "id:'{$id}',"
- . "_entity_id:'{$this->entity_id}',"
- . "_cat_id:'{$this->cat_id}',"
- . "_type:'{$this->type}'}",*/
+
'multi_upload_parans' =>
"{menuaction:'property.uientity.build_multi_upload_file',"
. "id:'{$id}',"
. "_entity_id:'{$this->entity_id}',"
@@ -2571,11 +2566,15 @@
self::add_javascript('property', 'portico',
'entity.edit.js');
- self::render_template_xsl(array('entity',
'datatable_inline', 'attributes_form',
+ $attribute_template = 'attributes_form';
+ if($mode == 'view')
+ {
+ $attribute_template = 'attributes_view';
+ }
+
+ self::render_template_xsl(array('entity',
'datatable_inline', $attribute_template,
'files'), array('edit' => $data));
- //phpgwapi_jquery::load_widget('treeview');
-
$criteria = array
(
'appname' => $this->type_app[$this->type],
Modified: trunk/property/templates/base/attributes_view.xsl
===================================================================
--- trunk/property/templates/base/attributes_view.xsl 2017-04-22 17:08:53 UTC
(rev 16612)
+++ trunk/property/templates/base/attributes_view.xsl 2017-04-22 18:27:55 UTC
(rev 16613)
@@ -1,154 +1,515 @@
<!-- $Id$ -->
-<xsl:template match="attributes_view">
- <xsl:variable name="lang_attribute_statustext">
- <xsl:value-of select="lang_attribute_statustext"/>
- </xsl:variable>
- <tr>
- <xsl:attribute name="class">
+<xsl:template name="attributes_view">
+ <xsl:apply-templates select="attributes_values"/>
+</xsl:template>
+
+<!-- New template-->
+<xsl:template xmlns:php="http://php.net/xsl" name="attributes_values">
+ <script type="text/javascript">
+ help_Popup = function(requestUrl)
+ {
+ TINY.box.show({iframe:requestUrl,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});
+ };
+ </script>
+ <xsl:variable name="lang_hour">
+ <xsl:value-of select="php:function('lang', 'hour')" />
+ </xsl:variable>
+ <xsl:variable name="lang_min">
+ <xsl:value-of select="php:function('lang', 'minute')" />
+ </xsl:variable>
+ <xsl:variable name="statustext">
+ <xsl:value-of select="statustext"/>
+ </xsl:variable>
+
+ <xsl:variable name="textareacols">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|property|textareacols')" />
+ </xsl:variable>
+ <xsl:variable name="textarearows">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|property|textarearows')" />
+ </xsl:variable>
+
+ <xsl:for-each select="attributes_group">
+ <div id="{link}">
+ <fieldset>
+ <xsl:apply-templates select="attributes">
+ <xsl:with-param name="lang_hour">
+ <xsl:value-of
select="$lang_hour" />
+ </xsl:with-param>
+ <xsl:with-param name="lang_min">
+ <xsl:value-of
select="$lang_min" />
+ </xsl:with-param>
+ <xsl:with-param name="statustext">
+ <xsl:value-of
select="$statustext" />
+ </xsl:with-param>
+ <xsl:with-param name="textareacols">
+ <xsl:value-of
select="$textareacols" />
+ </xsl:with-param>
+ <xsl:with-param name="textarearows">
+ <xsl:value-of
select="$textarearows" />
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </fieldset>
+ </div>
+ </xsl:for-each>
+</xsl:template>
+
+<!-- New template-->
+<xsl:template xmlns:php="http://php.net/xsl" match="attributes">
+ <xsl:param name="lang_hour" />
+ <xsl:param name="lang_min" />
+ <xsl:param name="statustext" />
+ <xsl:param name="textareacols" />
+ <xsl:param name="textarearows" />
+
+ <xsl:choose>
+ <xsl:when test="datatype='section'">
+ <div class="pure-control-group">
+ <xsl:value-of select="descr"
disable-output-escaping="yes"/>
+ </div>
+ </xsl:when>
+ </xsl:choose>
+
+ <div class="pure-control-group">
+ <xsl:choose>
+ <xsl:when test="not(hide_row)">
+ <label id="label_{name}">
+ <xsl:choose>
+ <xsl:when test="helpmsg=1">
+ <xsl:variable
name="help_url">
+ <xsl:value-of
select="help_url"/>
+ </xsl:variable>
+ <a
href="javascript:help_Popup('{$help_url}');">
+
<xsl:text>[</xsl:text>
+ <xsl:value-of
select="input_text"/>
+
<xsl:text>]</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="input_text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="datatype='pwd'">
+ <br/>
+ <xsl:text>[ </xsl:text>
+ <xsl:choose>
+ <xsl:when
test="value!=''">
+
<xsl:value-of select="php:function('lang', 'edit')"/>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:value-of select="php:function('lang', 'add')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> ]</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </label>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="name!=''">
+ <input type="hidden"
name="values_attribute[{id}][name]" value="{name}"/>
+ <input type="hidden"
name="values_attribute[{id}][datatype]" value="{datatype}"/>
+ <input type="hidden"
name="values_attribute[{id}][precision]" value="{precision}"/>
+ <input type="hidden"
name="values_attribute[{id}][history]" value="{history}"/>
+ <input type="hidden"
name="values_attribute[{id}][attrib_id]" value="{id}"/>
+ <input type="hidden"
name="values_attribute[{id}][nullable]" value="{nullable}"/>
+ <input type="hidden"
name="values_attribute[{id}][input_text]" value="{input_text}"/>
+ <input type="hidden"
name="values_attribute[{id}][disabled]" value="{disabled}"/>
<xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of select="@class"/>
+ <xsl:when test="datatype='R'">
+ <xsl:call-template
name="choice"/>
</xsl:when>
- <xsl:when test="position() mod 2 = 0">
- <xsl:text>row_off</xsl:text>
+ <xsl:when test="datatype='CH'">
+ <xsl:call-template
name="choice"/>
</xsl:when>
- <xsl:otherwise>
- <xsl:text>row_on</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <td align="left" valign="top">
- <label>
- <xsl:value-of select="input_text"/>
- <xsl:choose>
- <xsl:when test="datatype='D'">
- <xsl:text>[</xsl:text>
- <xsl:value-of
select="//lang_dateformat"/>
- <xsl:text>]</xsl:text>
+ <xsl:when test="datatype='LB'">
+ <xsl:for-each select="choice">
+ <xsl:choose>
+ <xsl:when
test="checked='checked'">
+
<xsl:value-of disable-output-escaping="yes" select="value"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
</xsl:when>
- </xsl:choose>
- </label>
- </td>
- <td align="left">
- <xsl:choose>
- <xsl:when test="name!=''">
+ <xsl:when test="datatype='AB'">
+ <xsl:variable
name="contact_name">
+ <xsl:value-of
select="name"/>
+
<xsl:text>_name</xsl:text>
+ </xsl:variable>
+ <xsl:variable
name="lookup_function">
+
<xsl:text>lookup_</xsl:text>
+ <xsl:value-of
select="name"/>
+ <xsl:text>();</xsl:text>
+ </xsl:variable>
+ <xsl:variable
name="clear_function">
+
<xsl:text>clear_</xsl:text>
+ <xsl:value-of
select="name"/>
+ <xsl:text>();</xsl:text>
+ </xsl:variable>
+ <input type="hidden"
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly"
size="5">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <input size="30" type="text"
name="{$contact_name}" value="{contact_name}" onClick="{$lookup_function}"
readonly="readonly">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <input type="checkbox"
name="clear_{name}_box" onClick="{$clear_function}">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'delete')"/>
+ </xsl:attribute>
+ <xsl:attribute
name="readonly">
+
<xsl:text>readonly</xsl:text>
+ </xsl:attribute>
+ </input>
<xsl:choose>
- <xsl:when
test="datatype='R'">
-
<xsl:call-template name="choice_view"/>
+ <xsl:when
test="contact_tel!=''">
+ <xsl:value-of
select="contact_tel"/>
</xsl:when>
- <xsl:when
test="datatype='CH'">
-
<xsl:call-template name="choice_view"/>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="contact_email!=''">
+ <a
href="mailto:{contact_email}">
+
<xsl:value-of select="contact_email"/>
+ </a>
</xsl:when>
- <xsl:when
test="datatype='LB'">
- <xsl:for-each
select="choice[checked='checked']">
-
<xsl:value-of select="value"/>
- <xsl:if
test="position() != last()">, </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:when
test="datatype='AB'">
- <input
type="text" value="{value}" readonly="readonly" size="5"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="title">
-
<xsl:value-of select="statustext"/>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="datatype='ABO'">
+ <xsl:variable name="org_name">
+ <xsl:value-of
select="name"/>
+
<xsl:text>_name</xsl:text>
+ </xsl:variable>
+ <xsl:variable
name="lookup_function">
+
<xsl:text>lookup_</xsl:text>
+ <xsl:value-of
select="name"/>
+ <xsl:text>();</xsl:text>
+ </xsl:variable>
+ <input type="hidden"
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly"
size="5">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
</xsl:attribute>
- </input>
- <input
size="30" type="text" value="{contact_name}" readonly="readonly">
-
<xsl:attribute name="title">
-
<xsl:value-of select="statustext"/>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <input size="30" type="text"
name="{$org_name}" value="{org_name}" onClick="{$lookup_function}"
readonly="readonly">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
</xsl:attribute>
- </input>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <xsl:choose>
+ <xsl:when
test="org_tel!=''">
+ <xsl:value-of
select="org_tel"/>
</xsl:when>
- <xsl:when
test="datatype='VENDOR'">
- <input
type="text" value="{value}" readonly="readonly" size="6"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="title">
-
<xsl:value-of select="statustext"/>
-
</xsl:attribute>
- </input>
- <input
size="30" type="text" value="{vendor_name}" readonly="readonly">
-
<xsl:attribute name="title">
-
<xsl:value-of select="statustext"/>
-
</xsl:attribute>
- </input>
- </xsl:when>
- <xsl:when
test="datatype='D'">
- <xsl:value-of
select="value"/>
- <img
id="values_attribute_{counter}-trigger"/>
- </xsl:when>
- <xsl:when
test="datatype='link'">
- <xsl:choose>
-
<xsl:when test="value!=''">
-
<br/>
-
<a href="{value}" target="_blank">
-
<xsl:value-of select="value"/>
-
</a>
-
</xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="value"/>
- </xsl:otherwise>
</xsl:choose>
<xsl:choose>
- <xsl:when
test="history=1">
- <xsl:variable
name="link_history">
-
<xsl:value-of select="link_history"/>
- </xsl:variable>
- <xsl:variable
name="lang_history_help">
-
<xsl:value-of select="//lang_history_help"/>
- </xsl:variable>
- <xsl:variable
name="lang_history">
-
<xsl:value-of select="//lang_history"/>
- </xsl:variable>
- <a
href="javascript:var
w=window.open('{$link_history}','','left=50,top=100,width=550,height=400,scrollbars')"
onMouseOver="overlib('{$lang_history_help}', CAPTION, '{$lang_history}')"
onMouseOut="nd()">
-
<xsl:value-of select="//lang_history"/>
+ <xsl:when
test="org_email!=''">
+ <a
href="mailto:{org_email}">
+
<xsl:value-of select="org_email"/>
</a>
</xsl:when>
</xsl:choose>
</xsl:when>
- </xsl:choose>
- </td>
- </tr>
-</xsl:template>
+ <xsl:when test="datatype='VENDOR'">
+ <xsl:value-of select="value"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="vendor_name"/>
+ </xsl:when>
+ <xsl:when test="datatype='custom1'">
+ <xsl:for-each select="choice">
+ <xsl:choose>
+ <xsl:when
test="checked='checked'">
+
<xsl:value-of disable-output-escaping="yes" select="value"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="datatype='custom2'">
+ <xsl:value-of select="value"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="custom_name"/>
+ </xsl:when>
+ <xsl:when test="datatype='custom3'">
+ <xsl:value-of select="value"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="custom_name"/>
+ </xsl:when>
+ <xsl:when test="datatype='user'">
+ <xsl:variable name="user_name">
+ <xsl:value-of
select="name"/>
+
<xsl:text>_user_name</xsl:text>
+ </xsl:variable>
+ <xsl:variable
name="lookup_function">
+
<xsl:text>lookup_</xsl:text>
+ <xsl:value-of
select="name"/>
+ <xsl:text>();</xsl:text>
+ </xsl:variable>
+ <input type="text" id="{name}"
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly"
size="6">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ <xsl:when
test="nullable!='1'">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <input size="30" type="text"
id="{$user_name}" name="{$user_name}" value="{user_name}"
onClick="{$lookup_function}" readonly="readonly">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ </xsl:when>
+ <xsl:when test="datatype='D'">
+ <xsl:value-of select="value"/>
+ </xsl:when>
+ <xsl:when test="datatype='DT'">
+ <xsl:variable
name="clear_function">
+
<xsl:text>clear_</xsl:text>
+ <xsl:value-of
select="name"/>
+ <xsl:text>();</xsl:text>
+ </xsl:variable>
-<!-- New template-->
-<xsl:template name="choice_view">
- <xsl:variable name="counter">
- <xsl:value-of select="counter"/>
- </xsl:variable>
- <table cellpadding="2" cellspacing="2" width="50%" align="left">
- <xsl:for-each select="choice">
- <tr>
- <xsl:attribute name="class">
+ <table>
+ <tr>
+ <td>
+ <input
type="text" id="values_attribute_{id}"
name="values_attribute[{id}][value][date]" value="{value/date}" size="12"
maxlength="12">
+
<xsl:attribute name="readonly">
+
<xsl:text> readonly</xsl:text>
+
</xsl:attribute>
+
<xsl:choose>
+
<xsl:when test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
<xsl:when test="nullable!='1'">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+ </input>
+ </td>
+ <td>
+ <input
type="text" id="values_attribute_{id}_hour"
name="values_attribute[{id}][value][hour]" value="{value/hour}" size="2"
maxlength="2" title="{$lang_hour}">
+
<xsl:choose>
+
<xsl:when test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+ </input>
+ </td>
+ <td>
+
<xsl:text> : </xsl:text>
+ </td>
+ <td>
+ <input
type="text" id="values_attribute_{id}_min"
name="values_attribute[{id}][value][min]" value="{value/min}" size="2"
maxlength="2" title="{$lang_min}">
+
<xsl:choose>
+
<xsl:when test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+ </input>
+ </td>
+ <td>
+ <input
type="checkbox" name="clear_{name}_box" onClick="{$clear_function}">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'delete')"/>
+
</xsl:attribute>
+
<xsl:attribute name="readonly">
+
<xsl:text>readonly</xsl:text>
+
</xsl:attribute>
+ </input>
+
+ </td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:when test="datatype='T'">
+ <xsl:value-of select="value"/>
+ </xsl:when>
+ <xsl:when test="datatype='pwd'">
+ <input type="password"
name="values_attribute[{id}][value]" size="30">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ <xsl:when
test="nullable!='1'">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ <input type="password"
name="values_attribute[{id}][value2]" size="30">
+ <xsl:choose>
+ <xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ <xsl:when
test="nullable!='1'">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </input>
+ </xsl:when>
+ <xsl:when test="datatype='bolean'">
+ <input id="id_{name}"
type="checkbox" name="values_attribute[{id}][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='link'">
<xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of
select="@class"/>
+ <xsl:when
test="value!=''">
+ <a
href="{value}" target="_blank">
+
<xsl:value-of select="value"/>
+ </a>
</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>
- <td align="left">
- <xsl:value-of select="value"/>
- <xsl:text> </xsl:text>
- </td>
- <xsl:variable name="checked">
- <xsl:value-of select="checked"/>
- </xsl:variable>
- <td align="left">
+ </xsl:when>
+ <xsl:when test="datatype='event'">
<xsl:choose>
- <xsl:when
test="checked='checked'">
- <input
type="{input_type}" name="values_attribute[{$counter}][value][]" value="{id}"
checked="$checked" disabled="disabled"/>
+ <xsl:when
test="warning!=''">
+ <xsl:value-of
select="warning"/>
</xsl:when>
<xsl:otherwise>
- <input
type="{input_type}" name="values_attribute[{$counter}][value][]" value="{id}"
disabled="disabled"/>
+ <xsl:variable
name="event_descr">
+
<xsl:value-of select="name"/>
+
<xsl:text>_descr</xsl:text>
+ </xsl:variable>
+ <xsl:variable
name="lookup_function">
+
<xsl:text>lookup_</xsl:text>
+
<xsl:value-of select="name"/>
+
<xsl:text>();</xsl:text>
+ </xsl:variable>
+ <div
class="pure-custom">
+ <input
type="text" name="{name}" value="{value}" onClick="{$lookup_function}"
readonly="readonly" size="6"/>
+ <input
size="30" type="text" name="{$event_descr}" value="{descr}"
onClick="{$lookup_function}" readonly="readonly">
+
<xsl:choose>
+
<xsl:when test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text> disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+ </input>
+
<xsl:choose>
+
<xsl:when test="next!=''">
+
<div>
+
<xsl:value-of select="lang_next_run"/>
+
<xsl:text>: </xsl:text>
+
<xsl:value-of select="next"/>
+
</div>
+
<div>
+
<xsl:value-of select="lang_enabled"/>
+
<xsl:text>: </xsl:text>
+
<xsl:value-of select="enabled"/>
+
</div>
+
</xsl:when>
+
</xsl:choose>
+ </div>
</xsl:otherwise>
</xsl:choose>
- </td>
- </tr>
- </xsl:for-each>
- </table>
+ </xsl:when>
+ <xsl:when test="datatype='I'">
+ <xsl:value-of select="value"/>
+ </xsl:when>
+ <xsl:when test="datatype='N'">
+ <xsl:value-of select="value"/>
+ </xsl:when>
+ <xsl:when test="datatype='email'">
+ <xsl:value-of select="value"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="value"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="history=1">
+ <input type="text"
id="values_attribute_{id}_date" name="values_attribute[{id}][date]" value=""
size="12" maxlength="10" readonly="readonly">
+ </input>
+ <xsl:variable
name="link_history">
+ <xsl:value-of
select="link_history"/>
+ </xsl:variable>
+ <xsl:variable
name="lang_history_help">
+ <xsl:value-of
select="//lang_history_help"/>
+ </xsl:variable>
+ <xsl:variable
name="lang_history">
+ <xsl:value-of
select="php:function('lang', 'history')" />
+ </xsl:variable>
+ <a
href="javascript:JqueryPortico.showlightbox_history('{$link_history}')"
title="{$lang_history}">
+ <xsl:value-of
select="$lang_history"/>
+ </a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </div>
</xsl:template>
+
+<!-- New template-->
+<xsl:template name="choice">
+ <xsl:variable name="attrib_id">
+ <xsl:value-of select="id"/>
+ </xsl:variable>
+ <xsl:variable name="name">
+ <xsl:value-of select="name"/>
+ </xsl:variable>
+ <div class="pure-custom">
+ <xsl:for-each select="choice">
+ <xsl:choose>
+ <xsl:when test="checked='checked'">
+ <input id="id_{$name}_{id}"
type="{input_type}" name="values_attribute[{$attrib_id}][value][]" value="{id}"
checked="checked"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input id="id_{$name}_{id}"
type="{input_type}" name="values_attribute[{$attrib_id}][value][]"
value="{id}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="value"/>
+ <br></br>
+ </xsl:for-each>
+ </div>
+</xsl:template>
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2017-04-22 17:08:53 UTC (rev
16612)
+++ trunk/property/templates/base/entity.xsl 2017-04-22 18:27:55 UTC (rev
16613)
@@ -842,8 +842,35 @@
<xsl:with-param name="cat_list"
select="cat_list"/>
</xsl:call-template>
</xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="lang_edit">
+ <xsl:value-of
select="php:function('lang', 'edit')" />
+ </xsl:variable>
+ <xsl:variable name="lang_new_entity">
+ <xsl:value-of
select="php:function('lang', 'new')" />
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="edit_entity" value="{$lang_edit}" title =
"{$lang_edit}" onClick="document.load_edit_form.submit();"/>
+ <!--input type="button"
class="pure-button pure-button-primary" name="new_entity"
value="{$lang_new_entity}" title = "{$lang_new_entity}"
onClick="document.new_form.submit();"/-->
+ <!--input class="pure-button
pure-button-primary" type="button" name="cancelButton" id ='cancelButton'
value="{$lang_cancel}" title = "{$lang_cancel}"
onClick="document.cancel_form.submit();"/-->
+ </xsl:otherwise>
</xsl:choose>
</form>
+
+ <xsl:variable name="edit_params">
+ <xsl:text>menuaction:property.uientity.edit,
id:</xsl:text>
+ <xsl:value-of select="value_id"/>
+ <xsl:text>, location_id:</xsl:text>
+ <xsl:value-of select="value_location_id"/>
+ </xsl:variable>
+ <xsl:variable name="edit_url">
+ <xsl:value-of select="php:function('get_phpgw_link',
'/index.php', $edit_params )" />
+ </xsl:variable>
+
+ <form name="load_edit_form" id="load_edit_form"
action="{$edit_url}" method="post">
+ </form>
+
+
+
<xsl:variable name="cancel_url">
<xsl:value-of select="cancel_url"/>
</xsl:variable>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16613] property: alter view attributes,
sigurdne <=