[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14666] more on property
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14666] more on property |
Date: |
Wed, 20 Jan 2016 15:12:03 +0000 |
Revision: 14666
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14666
Author: sigurdne
Date: 2016-01-20 15:12:02 +0000 (Wed, 20 Jan 2016)
Log Message:
-----------
more on property
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.uiproject.inc.php
branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
branches/dev-syncromind/property/inc/class.uiworkorder.inc.php
branches/dev-syncromind/property/templates/base/s_agreement.xsl
branches/dev-syncromind/property/templates/base/wo_hour.xsl
Modified: branches/dev-syncromind/property/inc/class.uiproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiproject.inc.php
2016-01-20 09:22:26 UTC (rev 14665)
+++ branches/dev-syncromind/property/inc/class.uiproject.inc.php
2016-01-20 15:12:02 UTC (rev 14666)
@@ -940,6 +940,11 @@
public function save()
{
+ if(!$_POST)
+ {
+ return $this->edit();
+ }
+
$id = phpgw::get_var('id', 'int');
$values_attribute = phpgw::get_var('values_attribute');
$config = CreateObject('phpgwapi.config', 'property');
@@ -1180,6 +1185,7 @@
$config->read();
$bolocation = CreateObject('property.bolocation');
+/*
if($mode == 'edit')
{
$values = phpgw::get_var('values');
@@ -1299,7 +1305,9 @@
);
}
}
+*/
+/*
if($save = phpgw::get_var('save', 'bool'))
{
$mode = 'edit';
@@ -1324,7 +1332,7 @@
}
}
}
-
+*/
//$record_history = '';
$record_history = array();
if($this->bypass_error || ((!$this->receipt['error'] ||
$add_request) && !$bypass) && $id)
@@ -1955,8 +1963,7 @@
array('key' => 'type', 'label' => lang('type'),
'sortable' => true),
array('key' => 'title', 'label' =>
lang('title'), 'sortable' => false),
array('key' => 'status', 'label' =>
lang('status'), 'sortable' => false),
- array('key' => 'select', 'label' =>
lang('select'), 'className' => 'center',
- 'sortable' => false)
+ array('key' => 'select', 'label' =>
lang('select'), 'className' => 'center','sortable' => false)
);
$datatable_def[] = array
Modified: branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
2016-01-20 09:22:26 UTC (rev 14665)
+++ branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
2016-01-20 15:12:02 UTC (rev 14666)
@@ -1423,10 +1423,11 @@
if(isset($values['file_action']) &&
is_array($values['file_action']))
{
$bofiles =
CreateObject('property.bofiles');
- $attachments =
$bofiles->get_attachments("/workorder/{$workorder_id}/",
$values['file_action']);
- $attachment_log =
lang('attachments') . ': ' . implode(', ', $values['file_action']);
+ $attachments =
$bofiles->get_attachments("/project/{$project['project_id']}/",
$values['file_action']['project']);
+ $attachments =
array_merge($attachments,
$bofiles->get_attachments("/workorder/{$workorder_id}/",
$values['file_action']['workorder']));
+ $attachment_log =
lang('attachments') . ': ' . implode(', ', $values['file_action']['project']).
', ' . implode(', ', $values['file_action']['workorder']);
}
-
+ _debug_array($attachment_log);die();
if($send_as_pdf)
{
$pdfcode =
$this->pdf_order($workorder_id, $show_cost);
@@ -1602,6 +1603,72 @@
)
);
+ $content_files = array();
+ $link_to_files =
(isset($this->config->config_data['files_url']) ?
$this->config->config_data['files_url'] : '');
+ $link_view_file = $GLOBALS['phpgw']->link('/index.php',
$link_file_data);
+
+ $files = $workorder['files'] ? $workorder['files'] :
array();
+ $lang_view_file = lang('click to view file');
+ $lang_select_file = lang('select');
+
+ for($z = 0; $z < count($files); $z++)
+ {
+ if($link_to_files)
+ {
+ $content_files[$z]['file_name'] = "<a
href='{$link_to_files}/{$files[$z]['directory']}/{$files[$z]['file_name']}
target='_blank' title='{$lang_view_file}'>{$files[$z]['name']}</a>";
+ }
+ else
+ {
+ $content_files[$z]['file_name'] = "<a
href='{$link_view_file}&file_name={$files[$z]['file_name']}'
target='_blank' title='{$lang_view_file}'>{$files[$z]['name']}</a>";
+ }
+ $content_files[$z]['select_file'] = "<input
type='checkbox' name='values[file_action][workorder][]'
value='{$files[$z]['name']}' title='{$lang_select_file}'>";
+ }
+
+ $project_link_file_data = array
+ (
+ 'menuaction' => 'property.uiproject.view_file',
+ 'id' => $project['project_id']
+ );
+ $link_view_file = $GLOBALS['phpgw']->link('/index.php',
$project_link_file_data);
+
+
+ $files =
$this->boproject->get_files($project['project_id']);
+
+ $i = $z;
+ for($z = 0; $z < count($files); $z++)
+ {
+ if($link_to_files)
+ {
+ $content_files[$i]['file_name'] = "<a
href='{$link_to_files}/{$files[$z]['directory']}/{$files[$z]['file_name']}
target='_blank' title='{$lang_view_file}'>{$files[$z]['name']}</a>";
+ }
+ else
+ {
+ $content_files[$i]['file_name'] = "<a
href='{$link_view_file}&file_name={$files[$z]['file_name']}'
target='_blank' title='{$lang_view_file}'>{$files[$z]['name']}</a>";
+ }
+ $content_files[$i]['select_file'] = "<input
type='checkbox' name='values[file_action][project][]'
value='{$files[$z]['name']}' title='{$lang_select_file}'>";
+ $i ++;
+ }
+
+ $files_def = array
+ (
+ array('key' => 'file_name', 'label' =>
lang('Filename'), 'sortable' => false,
+ 'resizeable' => true),
+ array('key' => 'select_file', 'label' =>
lang('select'), 'sortable' => false,
+ 'resizeable' => true)
+ );
+
+ $datatable_def[] = array
+ (
+ 'container' => 'datatable-container_2',
+ 'requestUrl' => "''",
+ 'data' => json_encode($content_files),
+ 'ColumnDefs' => $files_def,
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
$data = array
(
'datatable_def' => $datatable_def,
@@ -1663,7 +1730,7 @@
$function_msg = $this->boworkorder->order_sent_adress ?
lang('ReSend order') : lang('Send order');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
- self::render_template_xsl(array('wo_hour',
'datatable_inline', 'files'), array(
+ self::render_template_xsl(array('wo_hour',
'datatable_inline'), array(
'view' => $data));
}
Modified: branches/dev-syncromind/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiworkorder.inc.php
2016-01-20 09:22:26 UTC (rev 14665)
+++ branches/dev-syncromind/property/inc/class.uiworkorder.inc.php
2016-01-20 15:12:02 UTC (rev 14666)
@@ -866,6 +866,11 @@
public function save()
{
+ if(!$_POST)
+ {
+ return $this->edit();
+ }
+
$id = phpgw::get_var('id', 'int');
$config = CreateObject('phpgwapi.config', 'property');
$location_id =
$GLOBALS['phpgw']->locations->get_id('property', $this->acl_location);
Modified: branches/dev-syncromind/property/templates/base/s_agreement.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/s_agreement.xsl
2016-01-20 09:22:26 UTC (rev 14665)
+++ branches/dev-syncromind/property/templates/base/s_agreement.xsl
2016-01-20 15:12:02 UTC (rev 14666)
@@ -1,32 +1,32 @@
<!-- $Id$ -->
- <xsl:template match="data">
- <xsl:choose>
- <xsl:when test="add">
- <xsl:apply-templates select="add"/>
- </xsl:when>
- <xsl:when test="edit">
- <xsl:apply-templates select="edit"/>
- </xsl:when>
- <xsl:when test="edit_item">
- <xsl:apply-templates select="edit_item"/>
- </xsl:when>
- <xsl:when test="view_item">
- <xsl:apply-templates select="view_item"/>
- </xsl:when>
- <xsl:when test="view">
- <xsl:apply-templates select="view"/>
- </xsl:when>
- <xsl:when test="list_attribute">
- <xsl:apply-templates select="list_attribute"/>
- </xsl:when>
- <xsl:when test="edit_attrib">
- <xsl:apply-templates select="edit_attrib"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="list"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
+<xsl:template match="data">
+ <xsl:choose>
+ <xsl:when test="add">
+ <xsl:apply-templates select="add"/>
+ </xsl:when>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit"/>
+ </xsl:when>
+ <xsl:when test="edit_item">
+ <xsl:apply-templates select="edit_item"/>
+ </xsl:when>
+ <xsl:when test="view_item">
+ <xsl:apply-templates select="view_item"/>
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view"/>
+ </xsl:when>
+ <xsl:when test="list_attribute">
+ <xsl:apply-templates select="list_attribute"/>
+ </xsl:when>
+ <xsl:when test="edit_attrib">
+ <xsl:apply-templates select="edit_attrib"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="list"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
<!-- New template-->
<xsl:template match="list">
@@ -256,208 +256,213 @@
<xsl:variable name="edit_url">
<xsl:value-of select="edit_url"/>
</xsl:variable>
- <form ENCTYPE="multipart/form-data"
method="post" name="form" id="form" action="{$edit_url}" class="pure-form
pure-form-aligned">
- <xsl:choose>
- <xsl:when
test="value_s_agreement_id!=''">
- <div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="lang_id"/>
-
</label>
-
<xsl:value-of select="value_s_agreement_id"/>
- </div>
- </xsl:when>
- </xsl:choose>
+ <form ENCTYPE="multipart/form-data"
method="post" name="form" id="form" action="{$edit_url}" class="pure-form
pure-form-aligned">
+ <xsl:choose>
+ <xsl:when
test="value_s_agreement_id!=''">
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="lang_name"/>
+
<xsl:value-of select="lang_id"/>
</label>
- <input
type="text" name="values[name]" value="{value_name}"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_name_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
+ <xsl:value-of
select="value_s_agreement_id"/>
</div>
+ </xsl:when>
+ </xsl:choose>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_name"/>
+ </label>
+ <input type="text"
name="values[name]" value="{value_name}" onMouseout="window.status='';return
true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_name_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_descr"/>
+ </label>
+ <textarea cols="60" rows="6"
name="values[descr]">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_descr_statustext"/>
+ </xsl:attribute>
+ <xsl:value-of
select="value_descr"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_category"/>
+ </label>
+ <xsl:call-template
name="cat_select"/>
+ </div>
+ <xsl:call-template name="vendor_form"/>
+ <xsl:choose>
+ <xsl:when test="member_of_list2
!= ''">
<div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_descr"/>
- </label>
- <textarea
cols="60" rows="6" name="values[descr]">
-
<xsl:attribute name="title">
-
<xsl:value-of select="lang_descr_statustext"/>
-
</xsl:attribute>
-
<xsl:value-of select="value_descr"/>
- </textarea>
- </div>
- <div
class="pure-control-group">
<label>
-
<xsl:value-of select="lang_category"/>
+
<xsl:value-of select="php:function('lang', 'member of')"/>
</label>
-
<xsl:call-template name="cat_select"/>
- </div>
- <xsl:call-template
name="vendor_form"/>
- <xsl:choose>
- <xsl:when
test="member_of_list2 != ''">
- <div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'member of')"/>
-
</label>
-
<label style="vertical-align:top;">
-
<div id="member_of">
-
<xsl:apply-templates select="member_of_list2"/>
-
</div>
-
</label>
+ <label
style="vertical-align:top;">
+ <div
id="member_of">
+
<xsl:apply-templates select="member_of_list2"/>
</div>
- </xsl:when>
- </xsl:choose>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_budget"/>
</label>
- <input
type="text" name="values[budget]" value="{value_budget}"
onMouseout="window.status='';return true;"><xsl:attribute
name="title"><xsl:value-of
select="lang_budget_statustext"/></xsl:attribute></input><xsl:text> </xsl:text>
[ <xsl:value-of select="currency"/> ]
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_year"/>
- </label>
- <select
name="values[year]" class="forms" title="{lang_year_statustext}">
-
<xsl:apply-templates select="year"/>
-
</select>
</div>
- <xsl:call-template
name="ecodimb_form"/>
- <xsl:call-template
name="b_account_form"/>
+ </xsl:when>
+ </xsl:choose>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_budget"/>
+ </label>
+ <input type="text"
name="values[budget]" value="{value_budget}"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="lang_budget_statustext"/>
+ </xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text> [
<xsl:value-of select="currency"/> ]
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_year"/>
+ </label>
+ <select name="values[year]"
class="forms" title="{lang_year_statustext}">
+ <xsl:apply-templates
select="year"/>
+ </select>
+ </div>
+ <xsl:call-template name="ecodimb_form"/>
+ <xsl:call-template
name="b_account_form"/>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_category"/>
+ </label>
+ <xsl:call-template
name="categories"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_start_date"/>
+ </label>
+ <input type="text"
id="values_start_date" name="values[start_date]" size="10"
value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_start_date_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_end_date"/>
+ </label>
+ <input type="text"
id="values_end_date" name="values[end_date]" size="10" value="{value_end_date}"
readonly="readonly" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_end_date_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_termination_date"/>
+ </label>
+ <input type="text"
id="values_termination_date" name="values[termination_date]" size="10"
value="{value_termination_date}" readonly="readonly"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_termination_date_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_budget"/>
+ </label>
+ <!-- DataTable 2 EDIT -->
+ <!--div
id="datatable-container_3"/-->
+ <div class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_3'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ <div class="pure-control-group">
+ <xsl:call-template
name="attributes_values"/>
+ </div>
+ <xsl:choose>
+ <xsl:when test="files!=''">
+ <!-- <xsl:call-template
name="file_list"/> -->
<div
class="pure-control-group">
<label>
-
<xsl:value-of select="lang_category"/>
+
<xsl:value-of select="//lang_files"/>
</label>
-
<xsl:call-template name="categories"/>
+ <!-- DataTable
2 EDIT -->
+ <!--div
id="datatable-container_2"/-->
+ <div
class="pure-custom">
+
<xsl:for-each select="datatable_def">
+
<xsl:if test="container = 'datatable-container_2'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+
</xsl:if>
+
</xsl:for-each>
+ </div>
</div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_start_date"/>
- </label>
- <input
type="text" id="values_start_date" name="values[start_date]" size="10"
value="{value_start_date}" readonly="readonly"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_start_date_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_end_date"/>
- </label>
- <input
type="text" id="values_end_date" name="values[end_date]" size="10"
value="{value_end_date}" readonly="readonly"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_end_date_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_termination_date"/>
- </label>
- <input
type="text" id="values_termination_date" name="values[termination_date]"
size="10" value="{value_termination_date}" readonly="readonly"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_termination_date_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </div>
- <div
class="pure-control-group">
- <label>
-
<xsl:value-of select="lang_budget"/>
- </label>
- <!--
DataTable 2 EDIT -->
- <!--div
id="datatable-container_3"/-->
- <div
class="pure-custom">
-
<xsl:for-each select="datatable_def">
-
<xsl:if test="container = 'datatable-container_3'">
-
<xsl:call-template name="table_setup">
-
<xsl:with-param name="container" select ='container'/>
-
<xsl:with-param name="requestUrl" select ='requestUrl' />
-
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
-
<xsl:with-param name="tabletools" select ='tabletools' />
-
<xsl:with-param name="data" select ='data' />
-
<xsl:with-param name="config" select ='config' />
-
</xsl:call-template>
-
</xsl:if>
-
</xsl:for-each>
- </div>
- </div>
- <div
class="pure-control-group">
-
<xsl:call-template name="attributes_values"/>
- </div>
- <xsl:choose>
- <xsl:when
test="files!=''">
- <!--
<xsl:call-template name="file_list"/> -->
- <div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="//lang_files"/>
-
</label>
-
<!-- DataTable 2 EDIT -->
-
<!--div id="datatable-container_2"/-->
-
<div class="pure-custom">
-
<xsl:for-each select="datatable_def">
-
<xsl:if test="container = 'datatable-container_2'">
-
<xsl:call-template name="table_setup">
-
<xsl:with-param name="container" select
='container'/>
-
<xsl:with-param name="requestUrl" select
='requestUrl' />
-
<xsl:with-param name="ColumnDefs" select
='ColumnDefs' />
-
<xsl:with-param name="tabletools" select
='tabletools' />
-
<xsl:with-param name="data" select ='data'
/>
-
<xsl:with-param name="config" select
='config' />
-
</xsl:call-template>
-
</xsl:if>
-
</xsl:for-each>
-
</div>
- </div>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="fileupload = 1">
-
<xsl:call-template name="file_upload"/>
- </xsl:when>
- </xsl:choose>
- <div
class="pure-control-group">
-
<xsl:variable name="lang_save">
-
<xsl:value-of select="lang_save"/>
-
</xsl:variable>
- <input
type="submit" class="pure-button pure-button-primary" name="values[save]"
value="{$lang_save}" onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_save_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="fileupload = 1">
+ <xsl:call-template
name="file_upload"/>
+ </xsl:when>
+ </xsl:choose>
+ <div class="pure-control-group">
+ <xsl:variable name="lang_save">
+ <xsl:value-of
select="lang_save"/>
+ </xsl:variable>
+ <input type="submit"
class="pure-button pure-button-primary" name="values[save]"
value="{$lang_save}" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_save_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
-
<xsl:variable name="lang_apply">
-
<xsl:value-of select="lang_apply"/>
-
</xsl:variable>
- <input
type="submit" class="pure-button pure-button-primary" name="values[apply]"
value="{$lang_apply}" onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_apply_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
+ <xsl:variable name="lang_apply">
+ <xsl:value-of
select="lang_apply"/>
+ </xsl:variable>
+ <input type="submit"
class="pure-button pure-button-primary" name="values[apply]"
value="{$lang_apply}" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_apply_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
-
<xsl:variable name="lang_cancel">
-
<xsl:value-of select="lang_cancel"/>
-
</xsl:variable>
- <input
type="button" class="pure-button pure-button-primary" name="values[cancel]"
value="{$lang_cancel}" onMouseout="window.status='';return true;"
onClick="document.cancel_form.submit();">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_cancel_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </div>
+ <xsl:variable
name="lang_cancel">
+ <xsl:value-of
select="lang_cancel"/>
+ </xsl:variable>
+ <input type="button"
class="pure-button pure-button-primary" name="values[cancel]"
value="{$lang_cancel}" onMouseout="window.status='';return true;"
onClick="document.cancel_form.submit();">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_cancel_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
</form>
<xsl:variable name="cancel_url">
<xsl:value-of
select="cancel_url"/>
@@ -473,21 +478,21 @@
</div>
<!-- DataTable 0 EDIT
-->
<div
class="pure-control-group">
- <!--div
id="datatable-container_0"/-->
- <div
class="pure-custom">
-
<xsl:for-each select="datatable_def">
-
<xsl:if test="container = 'datatable-container_0'">
-
<xsl:call-template name="table_setup">
-
<xsl:with-param name="container" select ='container'/>
-
<xsl:with-param name="requestUrl" select ='requestUrl' />
-
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
-
<xsl:with-param name="tabletools" select ='tabletools' />
-
<xsl:with-param name="data" select ='data' />
-
<xsl:with-param name="config" select ='config' />
-
</xsl:call-template>
-
</xsl:if>
-
</xsl:for-each>
- </div>
+ <!--div
id="datatable-container_0"/-->
+ <div
class="pure-custom">
+
<xsl:for-each select="datatable_def">
+
<xsl:if test="container = 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+
</xsl:if>
+
</xsl:for-each>
+ </div>
</div>
<div
class="pure-control-group">
<xsl:value-of select="alarm_data/add_alarm/lang_add_alarm"/>
Modified: branches/dev-syncromind/property/templates/base/wo_hour.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/wo_hour.xsl 2016-01-20
09:22:26 UTC (rev 14665)
+++ branches/dev-syncromind/property/templates/base/wo_hour.xsl 2016-01-20
15:12:02 UTC (rev 14666)
@@ -455,7 +455,25 @@
</div>
<xsl:choose>
<xsl:when test="files!=''">
- <xsl:call-template name="file_list"/>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'files')"/>
+ </label>
+ <div>
+ <xsl:for-each
select="datatable_def">
+ <xsl:if test="container
= 'datatable-container_2'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
</xsl:when>
</xsl:choose>
<div class="pure-control-group">
@@ -469,7 +487,7 @@
<label>
<xsl:value-of
select="lang_history"/>
</label>
- <div class="pure-custom">
+ <div>
<xsl:for-each
select="//datatable_def">
<xsl:if test="container
= 'datatable-container_1'">
<xsl:call-template name="table_setup">
@@ -774,18 +792,28 @@
<xsl:choose>
<xsl:when test="values_view_order!=''">
<div class="pure-control-group">
- <xsl:for-each select="//datatable_def">
- <xsl:if test="container =
'datatable-container_0'">
- <xsl:call-template
name="table_setup">
- <xsl:with-param
name="container" select ='container'/>
- <xsl:with-param
name="requestUrl" select ='requestUrl' />
- <xsl:with-param
name="ColumnDefs" select ='ColumnDefs' />
- <xsl:with-param
name="tabletools" select ='tabletools' />
- <xsl:with-param
name="data" select ='data' />
- <xsl:with-param
name="config" select ='config' />
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="use_yui_table='1'">
+ <xsl:for-each
select="//datatable_def">
+ <xsl:if test="container
= 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl' />
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+
<xsl:with-param name="tabletools" select ='tabletools' />
+
<xsl:with-param name="data" select ='data' />
+
<xsl:with-param name="config" select ='config' />
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <table border="1"
style="width:100%">
+ <xsl:apply-templates
select="table_header_view_order"/>
+ <xsl:apply-templates
select="values_view_order"/>
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
</div>
</xsl:when>
</xsl:choose>
@@ -823,65 +851,45 @@
<xsl:variable name="sort_quantity">
<xsl:value-of select="sort_quantity"/>
</xsl:variable>
- <tr class="th">
- <td class="th_text" width="5%" align="right">
- <xsl:value-of select="lang_post"/>
- </td>
- <td class="th_text" width="15%" align="left">
- <xsl:value-of select="lang_code"/>
- </td>
- <td class="th_text" width="40%" align="left">
- <xsl:value-of select="lang_descr"/>
- </td>
- <td class="th_text" width="4%" align="left">
- <xsl:value-of select="lang_unit"/>
- </td>
- <td class="th_text" width="2%" align="right">
- <xsl:value-of select="lang_quantity"/>
- </td>
- <td class="th_text" width="5%" align="right">
- <xsl:value-of select="lang_billperae"/>
- </td>
- <td class="th_text" width="15%" align="right">
- <xsl:value-of select="lang_cost"/>
- </td>
- </tr>
+ <thead>
+ <tr class="th">
+ <td class="th_text" width="5%" align="right">
+ <xsl:value-of select="php:function('lang',
'post')"/>
+ </td>
+ <td class="th_text" width="15%" align="left">
+ <xsl:value-of select="php:function('lang',
'Code')"/>
+ </td>
+ <td class="th_text" width="40%" align="left">
+ <xsl:value-of select="php:function('lang',
'descr')"/>
+ </td>
+ <td class="th_text" width="4%" align="left">
+ <xsl:value-of select="php:function('lang',
'Unit')"/>
+ </td>
+ <td class="th_text" width="2%" align="right">
+ <xsl:value-of select="php:function('lang',
'Quantity')"/>
+ </td>
+ <td class="th_text" width="5%" align="right">
+ <xsl:value-of select="php:function('lang',
'Bill per unit')"/>
+ </td>
+ <td class="th_text" width="15%" align="right">
+ <xsl:value-of select="php:function('lang',
'cost')"/>
+ </td>
+ </tr>
+ </thead>
</xsl:template>
<!-- New template-->
<xsl:template match="values_view_order">
- <xsl:variable name="lang_view_statustext">
- <xsl:value-of select="lang_view_statustext"/>
- </xsl:variable>
- <xsl:variable name="lang_edit_statustext">
- <xsl:value-of select="lang_edit_statustext"/>
- </xsl:variable>
- <xsl:variable name="lang_delete_statustext">
- <xsl:value-of select="lang_delete_statustext"/>
- </xsl:variable>
<xsl:choose>
<xsl:when test="new_grouping=1">
<tr>
- <td class="th_text" align="center" colspan="10"
width="100%">
+ <td align="left" colspan="8" width="100%">
<xsl:value-of select="grouping_descr"/>
</td>
</tr>
</xsl:when>
</xsl:choose>
<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>
<td align="right">
<xsl:value-of select="post"/>
</td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14666] more on property,
Sigurd Nes <=