[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14759] more fixes
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14759] more fixes |
Date: |
Sun, 21 Feb 2016 19:52:07 +0000 |
Revision: 14759
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14759
Author: sigurdne
Date: 2016-02-21 19:52:07 +0000 (Sun, 21 Feb 2016)
Log Message:
-----------
more fixes
Modified Paths:
--------------
trunk/property/inc/class.bocommon.inc.php
trunk/property/inc/class.bodocument.inc.php
trunk/property/inc/class.sodocument.inc.php
trunk/property/inc/class.uidocument.inc.php
trunk/property/templates/base/document.xsl
trunk/property/templates/base/tts.xsl
Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/inc/class.bocommon.inc.php 2016-02-21 19:52:07 UTC (rev
14759)
@@ -1153,7 +1153,6 @@
$lookup = isset($data['lookup']) ? $data['lookup'] : '';
$location_level = isset($data['location_level']) &&
$data['location_level'] > 0 ? (int)$data['location_level'] : 0;
$no_address = isset($data['no_address']) ?
$data['no_address'] : '';
- $uicol_address = isset($data['uicol_address']) ?
$data['uicol_address'] : '';
$force_location = isset($data['force_location']) ?
$data['force_location'] : '';
$cols_extra = array();
$cols_return_lookup = array();
Modified: trunk/property/inc/class.bodocument.inc.php
===================================================================
--- trunk/property/inc/class.bodocument.inc.php 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/inc/class.bodocument.inc.php 2016-02-21 19:52:07 UTC (rev
14759)
@@ -146,12 +146,21 @@
return $this->bocommon->select_list($selected,
$branch_entries);
}
- function read()
+ function read( $data = array() )
{
- $documents = $this->so->read(array('start' =>
$this->start, 'query' => $this->query,
- 'sort' => $this->sort, 'order' => $this->order,
- 'filter' => $this->filter, 'cat_id' =>
$this->cat_id, 'entity_id' => $this->entity_id,
- 'doc_type' => $this->doc_type));
+ $documents = $this->so->read(array(
+ 'start' => $data['start'],
+ 'query' => $data['query'],
+ 'sort' => $data['sort'],
+ 'order' => $data['order'],
+ 'allrows' => $data['allrows'],
+ 'results' => $data['results'],
+ 'filter' => $this->filter,
+ 'cat_id' => $this->cat_id,
+ 'entity_id' => $this->entity_id,
+ 'doc_type' => $this->doc_type,
+ 'dry_run' => $data['dry_run'])
+ );
$this->total_records = $this->so->total_records;
$this->uicols = $this->so->uicols;
@@ -224,7 +233,7 @@
return $this->so->get_files_at_location($data);
}
- function read_at_location( $location_code = '' )
+ function read_at_location( $data = array() )
{
$use_svn = false;
if (preg_match('/svn[s:][:\/]\//',
$GLOBALS['phpgw_info']['server']['files_dir']))
@@ -232,12 +241,21 @@
// $use_svn = true;
}
-
- $document = $this->so->read_at_location(array('start'
=> $this->start, 'query' => $this->query,
- 'sort' => $this->sort, 'order' => $this->order,
- 'filter' => $this->filter, 'p_num' =>
$this->p_num, 'cat_id' => $this->cat_id,
+ $document = $this->so->read_at_location(array(
+ 'start' => $data['start'],
+ 'query' => $data['query'],
+ 'sort' => $data['sort'],
+ 'order' => $data['order'],
+ 'allrows' => $data['allrows'],
+ 'results' => $data['results'],
+ 'location_code' => $data['location_code'],
+ 'status_id' => $this->status_id,
+ 'p_num' => $this->p_num,
+ 'cat_id' => $this->cat_id,
'entity_id' => $this->entity_id,
- 'location_code' => $location_code, 'doc_type'
=> $this->doc_type, 'allrows' => $this->allrows));
+ 'doc_type' => $this->doc_type,
+ )
+ );
$this->total_records = $this->so->total_records;
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
Modified: trunk/property/inc/class.sodocument.inc.php
===================================================================
--- trunk/property/inc/class.sodocument.inc.php 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/inc/class.sodocument.inc.php 2016-02-21 19:52:07 UTC (rev
14759)
@@ -122,6 +122,7 @@
if (is_array($data))
{
$start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $results = isset($data['results']) &&
$data['results'] ? $data['results'] : 0;
$filter = isset($data['filter']) ?
$data['filter'] : '';
$query = isset($data['query']) ? $data['query']
: '';
$sort = isset($data['sort']) && $data['sort'] ?
$data['sort'] : 'DESC';
@@ -131,23 +132,29 @@
$entity_id = isset($data['entity_id']) ?
$data['entity_id'] : '';
$doc_type = isset($data['doc_type']) &&
$data['doc_type'] ? $data['doc_type'] : 0;
$allrows = isset($data['allrows']) ?
$data['allrows'] : '';
+ $dry_run = isset($data['dry_run']) ?
$data['dry_run'] : '';
}
-
$doc_types = $this->get_sub_doc_types($doc_type);
$sql = $this->bocommon->fm_cache('sql_document_' .
$entity_id);
- if (!$sql)
+ if (true)
{
$document_table = 'fm_document';
+ $uicols = array();
+ $joinmethod = '';
+ $paranthesis = '';
$cols = $document_table . '.location_code';
$cols_return[] = 'location_code';
+ $cols .= ", {$document_table}.category AS
doc_type";
+ $cols_return[] = 'doc_type';
- $uicols = array();
- $joinmethod = '';
- $paranthesis = '';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'location_code';
+ $uicols['descr'][] = lang('location code');
+ $uicols['statustext'][] = lang('location_code');
if ($entity_id)
{
@@ -182,6 +189,7 @@
'joinmethod' => $joinmethod,
'paranthesis' => $paranthesis,
'query' => $query,
+ 'location_level' => 2,
'force_location' => true,
'no_address' => false,
));
@@ -207,7 +215,7 @@
$this->cols_extra =
$this->bocommon->fm_cache('cols_extra_document_' . $entity_id);
}
//_debug_array($this->uicols);
- $groupmethod = " GROUP BY fm_document.location_code,
fm_location1.loc1_name";
+ $groupmethod = " GROUP BY fm_document.location_code,
fm_location1.loc1_name, fm_location1.category";
if ($entity_id)
{
@@ -278,7 +286,7 @@
if (!$allrows)
{
- $this->db->limit_query($sql . $ordermethod,
$start, __LINE__, __FILE__);
+ $this->db->limit_query($sql . $ordermethod,
$start, __LINE__, __FILE__, $results);
}
else
{
@@ -319,7 +327,7 @@
$query = isset($data['query']) ? $data['query']
: '';
$sort = isset($data['sort']) && $data['sort'] ?
$data['sort'] : 'DESC';
$order = isset($data['order']) ? $data['order']
: '';
- $filter = isset($data['filter']) &&
$data['filter'] ? (int)$data['filter'] : 0;
+ $status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id'] : '';
$entity_id = isset($data['entity_id']) &&
$data['entity_id'] ? (int)$data['entity_id'] : 0;
$cat_id = isset($data['cat_id']) &&
$data['cat_id'] ? (int)$data['cat_id'] : 0;
$p_num = isset($data['p_num']) &&
$data['p_num'] ? (int)$data['p_num'] : 0;
@@ -364,9 +372,9 @@
$where = 'AND';
}
- if ($filter > 0)
+ if ($status_id)
{
- $filtermethod .= " $where
fm_document.user_id='$filter' ";
+ $filtermethod .= " $where
fm_document.status='$status_id' ";
$where = 'AND';
}
Modified: trunk/property/inc/class.uidocument.inc.php
===================================================================
--- trunk/property/inc/class.uidocument.inc.php 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/inc/class.uidocument.inc.php 2016-02-21 19:52:07 UTC (rev
14759)
@@ -26,13 +26,13 @@
* @subpackage document
* @version $Id$
*/
- phpgw::import_class('phpgwapi.yui');
+ phpgw::import_class('phpgwapi.uicommon_jquery');
/**
* Description
* @package property
*/
- class property_uidocument
+ class property_uidocument extends phpgwapi_uicommon_jquery
{
var $grants;
@@ -58,9 +58,9 @@
function __construct()
{
- $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
+ parent::__construct();
$GLOBALS['phpgw_info']['flags']['menu_selection'] =
"property::documentation";
-
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bo = CreateObject('property.bodocument', true);
$this->bocommon = & $this->bo->bocommon;
@@ -120,14 +120,50 @@
$this->bo->save_sessiondata($data);
}
+ public function query()
+ {
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
+
+ $params = array(
+ 'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
+ 'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
+ 'query' => $search['value'],
+ 'order' =>
$columns[$order[0]['column']]['data'],
+ 'sort' => $order[0]['dir'],
+ 'allrows' => phpgw::get_var('length', 'int') ==
-1,
+ );
+
+ $values = $this->bo->read($params);
+
+ if (phpgw::get_var('export', 'bool'))
+ {
+ return $values;
+ }
+
+ $result_data = array('results' => $values);
+ $result_data['total_records'] =
$this->bo->total_records;
+ $result_data['draw'] = $draw;
+
+ array_walk($result_data['results'], array($this,
'_add_links'), "property.uidocument.list_doc");
+
+ return $this->jquery_results($result_data);
+ }
+
function index()
{
if (!$this->acl_read)
{
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uilocation.stop',
- 'perm' => 1, 'acl_location' =>
$this->acl_location));
+ phpgw::no_access();
}
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query();
+ }
+
$entity_id = phpgw::get_var('entity_id', 'int');
$preserve = phpgw::get_var('preserve', 'bool');
@@ -145,703 +181,426 @@
$this->entity_id = $this->bo->entity_id;
}
- $datatable = array();
+ $link_data = array
+ (
+ 'menuaction' => 'property.uidocument.index',
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'cat_id' => $this->cat_id,
+ 'filter' => $this->filter,
+ 'status_id' => $this->status_id,
+ 'query' => $this->query,
+ 'doc_type' => $this->doc_type,
+ 'entity_id' => $this->entity_id
+ );
- if (phpgw::get_var('phpgw_return_as') != 'json')
+
+ $categories =
$this->cats->formatted_xslt_list(array('format' => 'filter',
+ 'selected' => $this->doc_type, 'globals' =>
True));
+ $default_value = array('cat_id' => '', 'name' =>
lang('no document type'));
+ array_unshift($categories['cat_list'], $default_value);
+ foreach ($categories['cat_list'] as &$cat)
{
- $datatable['menu'] =
$this->bocommon->get_menu();
- $datatable['config']['base_url'] =
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.index',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'cat_id' => $this->cat_id,
- 'filter' => $this->filter,
- 'status_id' => $this->status_id,
- 'query' => $this->query,
- 'doc_type' => $this->doc_type,
- 'entity_id' => $this->entity_id
- ));
+ $cat['id'] = $cat['cat_id'];
+ }
+ $status_list = $this->bo->select_status_list('select',
$this->status_id);
+ $default_value = array('id' => '', 'name' => lang('no
status'));
+ array_unshift($status_list, $default_value);
- $datatable['config']['base_java_url'] =
"menuaction:'property.uidocument.index',"
- . "sort:'{$this->sort}',"
- . "order:'{$this->order}',"
- . "cat_id:'{$this->cat_id}',"
- . "filter:'{$this->filter}',"
- . "status_id:'{$this->status_id}',"
- . "query:'{$this->query}',"
- . "doc_type:'{$this->doc_type}',"
- . "entity_id:'{$this->entity_id}'";
-
-
//_debug_array($datatable['config']['base_java_url']);die;
-
- $link_data = array
- (
- 'menuaction' =>
'property.uidocument.index',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'cat_id' => $this->cat_id,
- 'filter' => $this->filter,
- 'status_id' => $this->status_id,
+ $data = array(
+ 'datatable_name' => lang('documents'),
+ 'form' => array(
+ 'toolbar' => array(
+ 'item' => array(
+ array('type' =>
'filter',
+ 'name' =>
'doc_type',
+ 'text' =>
lang('doc type'),
+ 'list' =>
$categories['cat_list'],
+ ),
+ array('type' =>
'filter',
+ 'name' =>
'status_id',
+ 'text' =>
lang('status'),
+ 'list' =>
$status_list,
+ ),
+ ),
+ ),
+ ),
+ 'datatable' => array(
+ 'source' => self::link(array(
+ 'menuaction' =>
'property.uidocument.index',
+ 'doc_type' => $this->doc_type,
+ 'entity_id' => $this->entity_id,
+ 'phpgw_return_as' => 'json'
+ )
+ ),
+ 'allrows' => true,
+ 'download' =>
self::link(array('menuaction' => 'property.uidocument.index',
+ 'doc_type' => $this->doc_type,
+ 'entity_id' => $this->entity_id,
+ 'export' => true, 'allrows' =>
true
+ )
+ ),
'query' => $this->query,
- 'doc_type' => $this->doc_type,
- 'entity_id' => $this->entity_id
- );
+ 'field' => array(),
+ ),
+ );
- $datatable['config']['allow_allrows'] = false;
-
- $values_combo_box[0] =
$this->cats->formatted_xslt_list(array('format' => 'filter',
- 'selected' => $this->doc_type,
'globals' => True));
- $default_value = array('cat_id' => '', 'name'
=> lang('no document type'));
- array_unshift($values_combo_box[0]['cat_list'],
$default_value);
-
- $values_combo_box[1] =
$this->bocommon->get_user_list_right2('filter', 4, $this->filter,
$this->acl_location, array(
- 'all'), $default = $this->account);
- $default_value = array('id' => '', 'name' =>
lang('no status'));
- array_unshift($values_combo_box[1],
$default_value);
-
- $datatable['actions']['form'] = array
- (
- array
- (
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.index',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'cat_id' =>
$this->cat_id,
- 'filter' =>
$this->filter,
- 'status_id' =>
$this->status_id,
- 'query' => $this->query,
- 'doc_type' =>
$this->doc_type,
- 'entity_id' =>
$this->entity_id
- )
- ),
- 'fields' => array
- (
- 'field' => array
- (
- array
-
(//boton CATEGORY
- 'id' =>
'btn_type_id',
- 'name'
=> 'type_id',
- 'value'
=> lang('Type'),
- 'type'
=> 'button',
- 'style'
=> 'filter',
-
'tab_index' => 1
- ),
- array
-
(//boton STATUS
- 'id' =>
'btn_user_id',
- 'name'
=> 'user_id',
- 'value'
=> lang('User'),
- 'type'
=> 'button',
- 'style'
=> 'filter',
-
'tab_index' => 2
- ),
- array
- (
- 'type'
=> 'button',
- 'id' =>
'btn_new',
- 'value'
=> lang('add'),
-
'tab_index' => 8
- ),
- array
-
(//boton SEARCH
- 'id' =>
'btn_search',
- 'name'
=> 'search',
- 'value'
=> lang('search'),
- 'type'
=> 'button',
-
'tab_index' => 7
- ),
- array
- (//
TEXT INPUT
- 'name'
=> 'query',
- 'id' =>
'txt_query',
- 'value'
=> '', //$query,
- 'type'
=> 'text',
-
'onkeypress' => 'return pulsar(event)',
- 'size'
=> 28,
-
'tab_index' => 6
- )
- ),
- 'hidden_value' => array
- (
- array
- (//div
values combo_box_0
- 'id' =>
'values_combo_box_0',
- 'value'
=> $this->bocommon->select2String($values_combo_box[0]['cat_list'], 'cat_id')
//i.e. id,value/id,vale/
- ),
- array
- (//div
values combo_box_1
- 'id' =>
'values_combo_box_1',
- 'value'
=> $this->bocommon->select2String($values_combo_box[1])
- )
- )
+ if ($this->acl_add)
+ {
+ $data['datatable']['new_item'] =
self::link(array(
+ 'menuaction' =>
'property.uidocument.edit',
+ 'entity_id' => $this->entity_id,
+ 'cat_id' => $this->cat_id
)
- )
);
}
-
- $document_list = $this->bo->read();
+ $this->bo->read(array('dry_run' => true));
$uicols = $this->bo->uicols;
- $j = 0;
$count_uicols_name = count($uicols['name']);
- if (isset($document_list) AND is_array($document_list))
+ $type_id = 4;
+ for ($i = 1; $i < $type_id; $i++)
{
- foreach ($document_list as $document_entry)
- {
- for ($k = 0; $k < $count_uicols_name;
$k++)
- {
- if
(isset($document_entry['query_location'][$uicols['name'][$k]]) &&
$document_entry['query_location'][$uicols['name'][$k]])
- {
-
$datatable['rows']['row'][$j]['column'][$k]['name'] = $uicols['name'][$k];
-
$datatable['rows']['row'][$j]['column'][$k]['statustext'] = lang('search');
-
$datatable['rows']['row'][$j]['column'][$k]['value'] =
$document_entry[$uicols['name'][$k]];
-
$datatable['rows']['row'][$j]['column'][$k]['format'] = 'link';
-
$datatable['rows']['row'][$j]['column'][$k]['java_link'] = true;
-
$datatable['rows']['row'][$j]['column'][$k]['link'] =
$document_entry['query_location'][$uicols['name'][$k]];
- }
- else
- {
-
$datatable['rows']['row'][$j]['column'][$k]['name'] = $uicols['name'][$k];
-
$datatable['rows']['row'][$j]['column'][$k]['value'] =
$document_entry[$uicols['name'][$k]];
- }
- }
+ $searc_levels[] = "loc{$i}";
+ }
- if ($this->acl_read)
- {
-
$datatable['rows']['row'][$j]['column'][$k]['name'] = lang('view');
-
$datatable['rows']['row'][$j]['column'][$k]['format'] = 'link';
-
$datatable['rows']['row'][$j]['column'][$k]['link'] =
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.list_doc',
- 'location_code' =>
$document_entry['location_code'],
- 'p_num' =>
isset($document_entry['p_num']) ? $document_entry['p_num'] : '',
- 'entity_id' =>
isset($document_entry['p_entity_id']) ? $document_entry['p_entity_id'] : '',
- 'cat_id' =>
isset($document_entry['p_cat_id']) ? $document_entry['p_cat_id'] : '',
- 'doc_type' =>
$this->doc_type
- ));
-
$datatable['rows']['row'][$j]['column'][$k]['value'] = lang('documents');
-
$datatable['rows']['row'][$j]['column'][$k]['target'] = '_blank';
- }
+ for ($k = 0; $k < $count_uicols_name; $k++)
+ {
+ $params = array(
+ 'key' => $uicols['name'][$k],
+ 'label' => $uicols['descr'][$k],
+ 'sortable' => ($uicols['sortable'][$k])
? true : false,
+ 'hidden' => ($uicols['input_type'][$k]
== 'hidden') ? true : false
+ );
- $j++;
+ if (!empty($uicols['formatter'][$k]))
+ {
+ $params['formatter'] =
$uicols['formatter'][$k];
}
- //_debug_array($datatable['rows']['row']);die;
- $datatable['rowactions']['action'] = array();
-
- if ($this->acl_add)
+ if (in_array($uicols['name'][$k],
$searc_levels))
{
- $datatable['rowactions']['action'][] =
array
- (
- 'my_name' => 'add',
- 'text' => lang('add'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.edit',
- 'entity_id' =>
$this->entity_id,
- 'cat_id' =>
$this->cat_id
- ))
- );
+ $params['formatter'] =
'JqueryPortico.searchLink';
}
- }
- $count_uicols_descr = count($uicols['descr']);
-
- for ($i = 0; $i < $count_uicols_descr; $i++)
- {
- if ($uicols['input_type'][$i] != 'hidden')
+ if ($uicols['name'][$k] == 'nhk_link')
{
-
$datatable['headers']['header'][$i]['formatter'] = ($uicols['formatter'][$i] ==
'' ? '""' : $uicols['formatter'][$i]);
-
$datatable['headers']['header'][$i]['name'] = $uicols['name'][$i];
-
$datatable['headers']['header'][$i]['text'] = $uicols['descr'][$i];
-
$datatable['headers']['header'][$i]['visible'] = true;
-
$datatable['headers']['header'][$i]['sortable'] = false;
+ $params['formatter'] =
'JqueryPortico.formatLinkGeneric';
}
- if ($uicols['name'][$i] == 'loc1')
+ if ($uicols['name'][$k] == 'num')
{
-
$datatable['headers']['header'][$i]['sortable'] = true;
-
$datatable['headers']['header'][$i]['sort_field'] = 'location_code';
+ $params['formatter'] =
'JqueryPortico.formatLink';
+ $params['hidden'] = false;
}
- if ($uicols['name'][$i] == 'address')
+ $denied = array('merknad');
+ if (in_array($uicols['name'][$k], $denied))
{
-
$datatable['headers']['header'][$i]['sortable'] = true;
-
$datatable['headers']['header'][$i]['sort_field'] = 'address';
+ $params['sortable'] = false;
}
- }
+ else if
(isset($uicols['cols_return_extra'][$k]) && ($uicols['cols_return_extra'][$k]
!= 'T' || $uicols['cols_return_extra'][$k] != 'CH'))
+ {
+ $params['sortable'] = true;
+ }
- if ($this->acl_read)
- {
-
$datatable['headers']['header'][$i]['formatter'] = '""';
- $datatable['headers']['header'][$i]['name'] =
lang('view');
- $datatable['headers']['header'][$i]['text'] =
'view';
- $datatable['headers']['header'][$i]['visible']
= true;
- $datatable['headers']['header'][$i]['sortable']
= false;
+ array_push($data['datatable']['field'],
$params);
}
- //path for property.js
- $datatable['property_js'] =
$GLOBALS['phpgw_info']['server']['webserver_url'] .
"/property/js/yahoo/property.js";
+ $parameters = array
+ (
+ 'parameter' => array(
+ array
+ (
+ 'name' => 'doc_type',
+ 'source' => 'doc_type'
+ ),
+ array
+ (
+ 'name' => 'location_code',
+ 'source' => 'location_code'
+ ),
+ )
+ );
- // Pagination and sort values
- $datatable['pagination']['records_start'] =
(int)$this->bo->start;
- $datatable['pagination']['records_limit'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- $datatable['pagination']['records_returned'] =
count($document_list);
- $datatable['pagination']['records_total'] =
$this->bo->total_records;
+ $data['datatable']['actions'][] = array(
+ 'my_name' => 'view_documents',
+ 'text' => lang('documents'),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction' =>
'property.uidocument.list_doc',
+ 'entity_id' => $this->entity_id,
+ )),
+ 'parameters' => json_encode($parameters)
+ );
- $appname = lang('documents');
- $function_msg = lang('list documents');
+ self::render_template_xsl('datatable_jquery', $data);
+ }
- //_debug_array($datatable['headers']['header']);die;
+ public function query_at_location()
+ {
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
- if ((phpgw::get_var("start") == "") &&
(phpgw::get_var("order", 'string') == ""))
+ $location_code = phpgw::get_var('location_code');
+ if ($this->query_location)
{
- $datatable['sorting']['order'] = 'loc1'; //
name key Column in myColumnDef
- $datatable['sorting']['sort'] = 'asc'; // ASC /
DESC
+ $location_code = $this->query_location;
}
- else
- {
- $datatable['sorting']['order'] =
phpgw::get_var('order', 'string'); // name of column of Database
- $datatable['sorting']['sort'] =
phpgw::get_var('sort', 'string'); // ASC / DESC
- }
- //-- BEGIN----------------------------- JSON CODE
------------------------------
- //values for Pagination
- $json = array
- (
- 'recordsReturned' =>
$datatable['pagination']['records_returned'],
- 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
- 'startIndex' =>
$datatable['pagination']['records_start'],
- 'sort' => $datatable['sorting']['order'],
- 'dir' => $datatable['sorting']['sort'],
- 'records' => array()
+ $params = array(
+ 'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
+ 'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
+ 'query' => $search['value'],
+ 'order' =>
$columns[$order[0]['column']]['data'],
+ 'sort' => $order[0]['dir'],
+ 'allrows' => phpgw::get_var('length', 'int') ==
-1,
+ 'location_code' => $location_code
);
- // values for datatable
- if (isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row']))
+ $values = $this->bo->read_at_location($params);
+
+ if (phpgw::get_var('export', 'bool'))
{
- foreach ($datatable['rows']['row'] as $row)
- {
- $json_row = array();
- foreach ($row['column'] as $column)
- {
- if (isset($column['format']) &&
$column['format'] == "link" && $column['java_link'] == true)
- {
-
$json_row[$column['name']] = "<a href='#' id='{$column['link']}'
onclick='javascript:filter_data(this.id);'>{$column['value']}</a>";
- }
- else if
(isset($column['format']) && $column['format'] == "link")
- {
-
$json_row[$column['name']] = "<a
href='{$column['link']}'>{$column['value']}</a>";
- }
- else
- {
-
$json_row[$column['name']] = $column['value'];
- }
- }
- $json['records'][] = $json_row;
- }
+ return $values;
}
- // right in datatable
- if (isset($datatable['rowactions']['action']) &&
is_array($datatable['rowactions']['action']))
+ if ($this->cat_id)
{
- $json ['rights'] =
$datatable['rowactions']['action'];
+ $directory =
"{$this->fakebase}/document/entity_{$this->entity_id}_{$this->cat_id}/{$p_num}/{$this->doc_type}";
}
-
- if (phpgw::get_var('phpgw_return_as') == 'json')
+ else
{
- return $json;
+ $directory =
"{$this->fakebase}/document/{$location_code}/{$this->doc_type}";
}
+ $this->config->read();
+ $files_url = $this->config->config_data['files_url'];
- $datatable['json_data'] = json_encode($json);
- //-------------------- JSON CODE ----------------------
-
- $template_vars = array();
- $template_vars['datatable'] = $datatable;
-
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
- $GLOBALS['phpgw']->xslttpl->set_var('phpgw',
$template_vars);
-
- phpgwapi_yui::load_widget('dragdrop');
- phpgwapi_yui::load_widget('datatable');
- phpgwapi_yui::load_widget('menu');
- phpgwapi_yui::load_widget('connection');
- phpgwapi_yui::load_widget('loader');
- phpgwapi_yui::load_widget('tabview');
- phpgwapi_yui::load_widget('paginator');
- phpgwapi_yui::load_widget('animation');
-
- if (!isset($GLOBALS['phpgw']->css) ||
!is_object($GLOBALS['phpgw']->css))
+ foreach ($values as &$document_entry)
{
- $GLOBALS['phpgw']->css =
createObject('phpgwapi.css');
+ if ($document_entry['link'])
+ {
+ if (!preg_match('/^HTTP/i',
$document_entry['link']))
+ {
+ $document_entry['link'] =
'file:///' . str_replace(':', '|', $document_entry['link']);
+ }
+
+ $link_view_file =
$document_entry['link'];
+ $document_entry['document_name'] =
'link';
+ unset($link_to_files);
+ }
+ else
+ {
+ if (!$link_to_files)
+ {
+ $link_view_file =
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uidocument.view_file',
+ 'id' =>
$document_entry['document_id'], 'entity_id' => $this->entity_id,
+ 'cat_id' =>
$this->cat_id, 'p_num' => $p_num));
+ $link_to_files = $files_url;
+ }
+ else
+ {
+ $link_view_file =
"{$files_url}/{$directory}/{$document_entry['document_name']}";
+ }
+ $document_entry['link'] =
$link_view_file;
+ }
}
- $GLOBALS['phpgw']->css->validate_file('datatable');
- $GLOBALS['phpgw']->css->validate_file('property');
-
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
+ $result_data = array('results' => $values);
+ $result_data['total_records'] =
$this->bo->total_records;
+ $result_data['draw'] = $draw;
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
+ return $this->jquery_results($result_data);
+ }
- $GLOBALS['phpgw']->js->validate_file('yahoo',
'document.index', 'property');
- //$this->save_sessiondata();
+ function get_uicols_at_location()
+ {
+ $uicols['name'][0] = 'document_name';
+ $uicols['descr'][0] = lang('Document name');
+ $uicols['datatype'][0] = 'link';
+ $uicols['name'][1] = 'title';
+ $uicols['descr'][1] = lang('Title');
+ $uicols['datatype'][1] = 'text';
+ $uicols['name'][2] = 'doc_type';
+ $uicols['descr'][2] = lang('Doc type');
+ $uicols['datatype'][2] = 'text';
+ $uicols['name'][3] = 'user';
+ $uicols['descr'][3] = lang('coordinator');
+ $uicols['datatype'][3] = 'text';
+ $uicols['name'][4] = 'document_id';
+ $uicols['descr'][4] = lang('document id');
+ $uicols['datatype'][4] = 'text';
+ $uicols['name'][5] = 'document_date';
+ $uicols['descr'][5] = lang('document date');
+ $uicols['datatype'][5] = 'text';
+ return $uicols;
}
function list_doc()
{
if (!$this->acl_read)
{
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uilocation.stop',
- 'perm' => 1, 'acl_location' =>
$this->acl_location));
+ phpgw::no_access();
}
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query_at_location();
+ }
+
$preserve = phpgw::get_var('preserve', 'bool');
if ($preserve)
{
$this->bo->read_sessiondata();
- $this->start = $this->bo->start;
- $this->query = $this->bo->query;
- $this->sort = $this->bo->sort;
- $this->order = $this->bo->order;
$this->filter = $this->bo->filter;
$this->entity_id = $this->bo->entity_id;
$this->cat_id = $this->bo->cat_id;
$this->status_id = $this->bo->status_id;
}
-
-
- if (!$this->acl_read)
- {
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uilocation.stop',
- 'perm' => 1, 'acl_location' =>
$this->acl_location));
- }
-
-
- $receipt =
$GLOBALS['phpgw']->session->appsession('session_data', 'document_receipt');
- $GLOBALS['phpgw']->session->appsession('session_data',
'document_receipt', '');
-
$location_code = phpgw::get_var('location_code');
if ($this->query_location)
{
$location_code = $this->query_location;
}
- $p_num = phpgw::get_var('p_num');
-
- if ($this->cat_id)
+ $categories =
$this->cats->formatted_xslt_list(array('format' => 'filter',
+ 'selected' => $this->doc_type, 'globals' =>
True));
+ $default_value = array('cat_id' => '', 'name' =>
lang('no document type'));
+ array_unshift($categories['cat_list'], $default_value);
+ foreach ($categories['cat_list'] as &$cat)
{
- $entity_data[$this->entity_id]['p_num'] =
$p_num;
- $entity_data[$this->entity_id]['p_entity_id'] =
$this->entity_id;
- $entity_data[$this->entity_id]['p_cat_id'] =
$this->cat_id;
- $entity =
$this->boadmin_entity->read_single($this->entity_id, false);
- $category =
$this->boadmin_entity->read_single_category($this->entity_id, $this->cat_id);
- $lookup_entity =
$this->bocommon->get_lookup_entity('document');
- $appname_sub = $entity['name'];
- $_values =
execMethod('property.soentity.read_single', array('entity_id' =>
$this->entity_id,
- 'cat_id' => $this->cat_id, 'num' =>
$p_num));
-
- $location =
$this->bo->read_location_data($_values['location_code']);
- $location_code = $_values['location_code'];
- unset($_values);
+ $cat['id'] = $cat['cat_id'];
}
- else
- {
- $location =
$this->bo->read_location_data($location_code);
- $appname_sub = lang('location');
- }
- if ($category['name'])
- {
- $entity_data[$this->entity_id]['p_cat_name'] =
$category['name'];
- }
- $link_data = array
- (
- 'menuaction' => 'property.uidocument.list_doc',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'entity_id' => $this->entity_id,
- 'cat_id' => $this->cat_id,
- 'p_num' => $p_num,
- 'doc_type' => $this->doc_type,
- 'location_code' => $location_code,
- 'filter' => $this->filter,
- 'query' => $this->query,
- 'query_location' => $this->query_location,
- 'allrows' => $this->allrows
- );
+ $status_list = $this->bo->select_status_list('select',
$this->status_id);
+ $default_value = array('id' => '', 'name' => lang('no
status'));
+ array_unshift($status_list, $default_value);
- $this->config->read();
- $files_url = $this->config->config_data['files_url'];
-
- $datatable = array();
-
- if (phpgw::get_var('phpgw_return_as') != 'json')
+ $datatable_name = array();
+ $datatable_name[] = lang('documents');
+ if ($location_code)
{
- $datatable['menu'] =
$this->bocommon->get_menu();
- $datatable['config']['base_url'] =
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.list_doc',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'entity_id' => $this->entity_id,
- 'cat_id' => $this->cat_id,
- 'p_num' => $p_num,
- 'doc_type' => $this->doc_type,
- 'location_code' => $location_code,
- 'filter' => $this->filter,
- 'query' => $this->query,
- 'query_location' =>
$this->query_location,
- 'allrows' => $this->allrows
- ));
+ $solocation =
CreateObject('property.solocation');
+ $location_data =
$solocation->read_single($location_code);
- $datatable['config']['base_java_url'] =
"menuaction:'property.uidocument.list_doc',"
- . "sort:'{$this->sort}',"
- . "order:'{$this->order}',"
- . "entity_id:'{$this->entity_id}',"
- . "cat_id:'{$this->cat_id}',"
- . "p_num:'{$p_num}',"
- . "doc_type:'{$this->doc_type}',"
- . "location_code:'{$location_code}',"
- . "filter:'{$this->filter}',"
- . "query:'{$this->query}',"
- .
"query_location:'{$this->query_location}',"
- . "allrows:'{$this->allrows}'";
+ $location_types =
execMethod('property.soadmin_location.select_location_type');
+ $type_id = count(explode('-', $location_code));
- $datatable['config']['allow_allrows'] = true;
+ for ($i = 1; $i < $type_id + 1; $i++)
+ {
+// $address_element[] = array
+// (
+// 'text' => $location_types[($i -
1)]['name'],
+// 'value' =>
$location_data["loc{$i}"] . ' ' . $location_data["loc{$i}_name"]
+// );
+ $datatable_name[] =
"{$location_types[($i - 1)]['name']} [{$location_data["loc{$i}"]} -
{$location_data["loc{$i}_name"]}]";
+ }
+ }
- $values_combo_box[0] =
$this->cats->formatted_xslt_list(array('format' => 'filter',
- 'selected' => $this->doc_type,
'globals' => True));
- $default_value = array('cat_id' => '', 'name'
=> lang('no category'));
- array_unshift($values_combo_box[0]['cat_list'],
$default_value);
-
- $values_combo_box[1] =
$this->bocommon->get_user_list_right2('filter', 4, $this->filter,
$this->acl_location, array(
- 'all'), $default = $this->account);
- $default_value = array('id' => '', 'name' =>
lang('no user'));
- array_unshift($values_combo_box[1],
$default_value);
-
- $datatable['actions']['form'] = array
- (
- array
- (
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.list_doc',
- 'sort' => $this->sort,
- 'order' => $this->order,
- 'entity_id' =>
$this->entity_id,
- 'cat_id' =>
$this->cat_id,
- 'p_num' => $p_num,
- 'doc_type' =>
$this->doc_type,
- 'location_code' =>
$location_code,
- 'filter' =>
$this->filter,
- 'query' => $this->query,
- 'query_location' =>
$this->query_location
- )
- ),
- 'fields' => array
- (
- 'field' => array
- (
- array
- (//
mensaje
- 'type'
=> 'label',
- 'id' =>
'msg_header',
- 'value'
=> '',
- 'style'
=> 'filter'
- ),
- array
-
(//boton CATEGORY
- 'id' =>
'btn_type_id',
- 'name'
=> 'type_id',
- 'value'
=> lang('Type'),
- 'type'
=> 'button',
- 'style'
=> 'filter',
-
'tab_index' => 1
- ),
- array
-
(//boton STATUS
- 'id' =>
'btn_user_id',
- 'name'
=> 'user_id',
- 'value'
=> lang('User'),
- 'type'
=> 'button',
- 'style'
=> 'filter',
-
'tab_index' => 2
- ),
- array
- (
- 'type'
=> 'button',
- 'id' =>
'btn_new',
- 'value'
=> lang('add'),
-
'tab_index' => 8
- ),
- array
-
(//boton SEARCH
- 'id' =>
'btn_search',
- 'name'
=> 'search',
- 'value'
=> lang('search'),
- 'type'
=> 'button',
-
'tab_index' => 7
- ),
- array
- (//
TEXT INPUT
- 'name'
=> 'query',
- 'id' =>
'txt_query',
- 'value'
=> '', //$query,
- 'type'
=> 'text',
-
'onkeypress' => 'return pulsar(event)',
- 'size'
=> 28,
-
'tab_index' => 6
- ),
- array
-
(//container of control's Form
- 'type'
=> 'label',
- 'id' =>
'controlsForm_container',
- 'value'
=> ''
- )
+ $data = array(
+ 'datatable_name' => implode('::',
$datatable_name),
+ 'form' => array(
+ 'toolbar' => array(
+ 'item' => array(
+ array('type' =>
'filter',
+ 'name' =>
'doc_type',
+ 'text' =>
lang('doc type'),
+ 'list' =>
$categories['cat_list'],
),
- 'hidden_value' => array
- (
- array
- (//div
values combo_box_0
- 'id' =>
'values_combo_box_0',
- 'value'
=> $this->bocommon->select2String($values_combo_box[0]['cat_list'], 'cat_id')
//i.e. id,value/id,vale/
- ),
- array
- (//div
values combo_box_1
- 'id' =>
'values_combo_box_1',
- 'value'
=> $this->bocommon->select2String($values_combo_box[1])
- )
- )
+ array('type' =>
'filter',
+ 'name' =>
'status_id',
+ 'text' =>
lang('status'),
+ 'list' =>
$status_list,
+ ),
+ ),
+ ),
+ ),
+ 'datatable' => array(
+ 'source' => self::link(array(
+ 'menuaction' =>
'property.uidocument.list_doc',
+ 'entity_id' => $this->entity_id,
+ 'cat_id' => $this->cat_id,
+ 'p_num' => $p_num,
+ 'doc_type' => $this->doc_type,
+ 'location_code' =>
$location_code,
+ 'phpgw_return_as' => 'json'
)
- )
- );
- }
+ ),
+ 'allrows' => true,
+ 'download' =>
self::link(array('menuaction' => 'property.uidocument.list_doc',
+ 'doc_type' => $this->doc_type,
+ 'entity_id' => $this->entity_id,
+ 'export' => true,
+ 'allrows' => true
+ )
+ ),
+ 'query' => $this->query,
+ 'field' => array(),
+ ),
+ );
- $document_list =
$this->bo->read_at_location($location_code);
-
- if ($this->cat_id)
+ if ($this->acl_add)
{
- $directory =
"{$this->fakebase}/document/entity_{$this->entity_id}_{$this->cat_id}/{$p_num}/{$this->doc_type}";
+ $data['datatable']['new_item'] =
self::link(array(
+ 'menuaction' =>
'property.uidocument.edit',
+ 'from' => 'list_doc',
+ 'location_code' =>
$location_code,
+ 'p_entity_id' =>
$this->entity_id,
+ 'p_cat_id' => $this->cat_id,
+ 'p_num' => $p_num
+ )
+ );
}
- else
- {
- $directory =
"{$this->fakebase}/document/{$location_code}/{$this->doc_type}";
- }
+ $uicols = $this->get_uicols_at_location();
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
-
- $uicols['name'][0] = 'document_name';
- $uicols['descr'][0] = lang('Document name');
- $uicols['datatype'][0] = 'link';
- $uicols['name'][1] = 'title';
- $uicols['descr'][1] = lang('Title');
- $uicols['datatype'][1] = 'text';
- $uicols['name'][2] = 'doc_type';
- $uicols['descr'][2] = lang('Doc type');
- $uicols['datatype'][2] = 'text';
- $uicols['name'][3] = 'user';
- $uicols['descr'][3] = lang('coordinator');
- $uicols['datatype'][3] = 'text';
- $uicols['name'][4] = 'document_id';
- $uicols['descr'][4] = lang('document id');
- $uicols['datatype'][4] = 'text';
- $uicols['name'][5] = 'document_date';
- $uicols['descr'][5] = lang('document date');
- $uicols['datatype'][5] = 'text';
- $j = 0;
$count_uicols_name = count($uicols['name']);
- foreach ($document_list as $document_entry)
+
+ for ($k = 0; $k < $count_uicols_name; $k++)
{
- for ($k = 0; $k < $count_uicols_name; $k++)
+ $params = array(
+ 'key' => $uicols['name'][$k],
+ 'label' => $uicols['descr'][$k],
+ 'sortable' => ($uicols['sortable'][$k])
? true : false,
+ 'hidden' => ($uicols['input_type'][$k]
== 'hidden') ? true : false
+ );
+
+ if ($uicols['name'][$k] == 'document_name')
{
- if ($document_entry['link'])
- {
- if (!preg_match('/^HTTP/i',
$document_entry['link']))
- {
- $document_entry['link']
= 'file:///' . str_replace(':', '|', $document_entry['link']);
- }
+ $params['formatter'] =
'JqueryPortico.formatLink';
+ $params['hidden'] = false;
+ }
- $link_view_file =
$document_entry['link'];
-
$document_entry['document_name'] = 'link';
- unset($link_to_files);
- }
- else
- {
- if (!$link_to_files)
- {
- $link_view_file =
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uidocument.view_file',
- 'id' =>
$document_entry['document_id'], 'entity_id' => $this->entity_id,
- 'cat_id' =>
$this->cat_id, 'p_num' => $p_num));
- $link_to_files =
$files_url;
- }
- else
- {
- $link_view_file =
"{$files_url}/{$directory}/{$document_entry['document_name']}";
- }
- }
-
- if ($uicols['input_type'][$k] !=
'hidden')
- {
-
$datatable['rows']['row'][$j]['column'][$k]['name'] = $uicols['name'][$k];
-
$datatable['rows']['row'][$j]['column'][$k]['value'] =
$document_entry[$uicols['name'][$k]];
-
- if (isset($uicols['datatype'])
&& isset($uicols['datatype'][$k]) && $uicols['datatype'][$k] == 'link' &&
$document_entry[$uicols['name'][$k]])
- {
-
$datatable['rows']['row'][$j]['column'][$k]['format'] = 'link';
-
$datatable['rows']['row'][$j]['column'][$k]['link'] = $link_view_file;
-
$datatable['rows']['row'][$j]['column'][$k]['value'] =
$document_entry[$uicols['name'][$k]];
-
$datatable['rows']['row'][$j]['column'][$k]['target'] = '_blank';
- }
- }
+ $denied = array('merknad');
+ if (in_array($uicols['name'][$k], $denied))
+ {
+ $params['sortable'] = false;
}
- $j++;
+
+ array_push($data['datatable']['field'],
$params);
}
- $location_data = array();
+ $data['datatable']['actions'] = array();
- $location_data =
$this->bolocation->initiate_ui_location(array(
- 'values' => $location,
- 'type_id' => count(explode('-',
$location_code)),
- 'no_link' => false, // disable lookup links for
location type less than type_id
- 'tenant' => false,
- 'lookup_type' => 'view',
- 'lookup_entity' => $lookup_entity,
- 'entity_data' => $entity_data,
- 'link_data' => $link_data,
- 'query_link' => true
- ));
-
- $datatable['locdata'] = $location_data['location'];
-
- $datatable['rowactions']['action'] = array();
-
$parameters = array
(
- 'parameter' => array
- (
- array
- (
+ 'parameter' => array(
+ array(
'name' => 'document_id',
'source' => 'document_id'
- ),
+ )
)
);
if ($this->acl_read)
{
- $datatable['rowactions']['action'][] = array
- (
+ $data['datatable']['actions'][] = array(
'my_name' => 'view',
'statustext' => lang('view this
entity'),
'text' => lang('view'),
@@ -850,14 +609,13 @@
'menuaction' =>
'property.uidocument.view',
'from' => 'list_doc'
)),
- 'parameters' => $parameters
+ 'parameters' => json_encode($parameters)
);
}
if ($this->acl_edit)
{
- $datatable['rowactions']['action'][] = array
- (
+ $data['datatable']['actions'][] = array(
'my_name' => 'edit',
'statustext' => lang('edit this
entity'),
'text' => lang('edit'),
@@ -866,14 +624,13 @@
'menuaction' =>
'property.uidocument.edit',
'from' => 'list_doc'
)),
- 'parameters' => $parameters
+ 'parameters' => json_encode($parameters)
);
}
if ($this->acl_delete)
{
- $datatable['rowactions']['action'][] = array
- (
+ $data['datatable']['actions'][] = array(
'my_name' => 'delete',
'statustext' => lang('delete this
entity'),
'text' => lang('delete'),
@@ -884,172 +641,11 @@
'location_code' =>
$location_code,
'p_num' => $p_num
)),
- 'parameters' => $parameters
+ 'parameters' => json_encode($parameters)
);
}
- if ($this->acl_add)
- {
- $datatable['rowactions']['action'][] = array
- (
- 'my_name' => 'add',
- 'statustext' => lang('add an entity'),
- 'text' => lang('add'),
- 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction' =>
'property.uidocument.edit',
- 'from' => 'list_doc',
- 'location_code' =>
$location_code,
- 'p_entity_id' =>
$this->entity_id,
- 'p_cat_id' => $this->cat_id,
- 'p_num' => $p_num
- ))
- );
- }
-
- unset($parameters);
-
- for ($i = 0; $i < $count_uicols_name; $i++)
- {
- if ($uicols['input_type'][$i] != 'hidden')
- {
-
$datatable['headers']['header'][$i]['formatter'] = ($uicols['formatter'][$i] ==
'' ? '""' : $uicols['formatter'][$i]);
-
$datatable['headers']['header'][$i]['name'] = $uicols['name'][$i];
-
$datatable['headers']['header'][$i]['text'] = $uicols['descr'][$i];
-
$datatable['headers']['header'][$i]['visible'] = true;
-
$datatable['headers']['header'][$i]['sortable'] = false;
-
- if ($uicols['name'][$i] ==
'document_name')
- {
-
$datatable['headers']['header'][$i]['sortable'] = true;
-
$datatable['headers']['header'][$i]['sort_field'] = 'document_name';
- }
-
- if ($uicols['name'][$i] ==
'document_id')
- {
-
$datatable['headers']['header'][$i]['visible'] = false;
- }
- }
- }
-
- //path for property.js
- $property_js = "/property/js/yahoo/property.js";
-
- if
(!isset($GLOBALS['phpgw_info']['server']['no_jscombine']) ||
!$GLOBALS['phpgw_info']['server']['no_jscombine'])
- {
- $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
- $property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js, '/'));
- }
-
- $datatable['property_js'] =
$GLOBALS['phpgw_info']['server']['webserver_url'] . $property_js;
-
- // Pagination and sort values
- $datatable['pagination']['records_start'] =
(int)$this->bo->start;
- $datatable['pagination']['records_limit'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
- $datatable['pagination']['records_returned'] =
count($document_list);
- $datatable['pagination']['records_total'] =
$this->bo->total_records;
-
- $appname = lang('document');
- $function_msg = lang('list document');
-
- if ((phpgw::get_var("start") == "") &&
(phpgw::get_var("order", 'string') == ""))
- {
- $datatable['sorting']['order'] =
'document_name'; // name key Column in myColumnDef
- $datatable['sorting']['sort'] = 'desc'; // ASC
/ DESC
- }
- else
- {
- $datatable['sorting']['order'] =
phpgw::get_var('order', 'string'); // name of column of Database
- $datatable['sorting']['sort'] =
phpgw::get_var('sort', 'string'); // ASC / DESC
- }
-
- phpgwapi_yui::load_widget('dragdrop');
- phpgwapi_yui::load_widget('datatable');
- phpgwapi_yui::load_widget('menu');
- phpgwapi_yui::load_widget('connection');
- phpgwapi_yui::load_widget('loader');
- phpgwapi_yui::load_widget('tabview');
- phpgwapi_yui::load_widget('paginator');
- phpgwapi_yui::load_widget('animation');
-
- //-- BEGIN----------------------------- JSON CODE
------------------------------
- //values for Pagination
- $json = array
- (
- 'recordsReturned' =>
$datatable['pagination']['records_returned'],
- 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
- 'startIndex' =>
$datatable['pagination']['records_start'],
- 'sort' => $datatable['sorting']['order'],
- 'dir' => $datatable['sorting']['sort'],
- 'records' => array()
- );
-
- // values for datatable
- if (isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row']))
- {
- foreach ($datatable['rows']['row'] as $row)
- {
- $json_row = array();
- foreach ($row['column'] as $column)
- {
- if (isset($column['format']) &&
$column['format'] == "link" && $column['java_link'] == true)
- {
-
$json_row[$column['name']] = "<a href='#' id='{$column['link']}
onclick='javascript:filter_data(this.id);'>{$column['value']}</a>";
- }
- else if
(isset($column['format']) && $column['format'] == "link")
- {
-
$json_row[$column['name']] = "<a href='{$column['link']}' target =
'_blank'>{$column['value']}</a>";
- }
- else
- {
-
$json_row[$column['name']] = $column['value'];
- }
- }
- $json['records'][] = $json_row;
- }
- }
-
- // right in datatable
- if (isset($datatable['rowactions']['action']) &&
is_array($datatable['rowactions']['action']))
- {
- $json ['rights'] =
$datatable['rowactions']['action'];
- }
-
- $json ['toolbar_height'] = 40;
- if (isset($location_data) && is_array($location_data))
- {
- $json ['toolbar_height'] = $json
['toolbar_height'] + (count($datatable['locdata']) * 10);
- $json ['current_consult'] =
$datatable['locdata'];
- }
- if (phpgw::get_var('phpgw_return_as') == 'json')
- {
- return $json;
- }
-
-
- $datatable['json_data'] = json_encode($json);
- //-------------------- JSON CODE ----------------------
-
- $template_vars = array();
- $template_vars['datatable'] = $datatable;
-
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
- $GLOBALS['phpgw']->xslttpl->set_var('phpgw',
$template_vars);
-
- if (!isset($GLOBALS['phpgw']->css) ||
!is_object($GLOBALS['phpgw']->css))
- {
- $GLOBALS['phpgw']->css =
createObject('phpgwapi.css');
- }
-
- $GLOBALS['phpgw']->css->validate_file('datatable');
- $GLOBALS['phpgw']->css->validate_file('property');
-
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
-
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
-
- $GLOBALS['phpgw']->js->validate_file('yahoo',
'document.list_doc', 'property');
+ self::render_template_xsl('datatable_jquery', $data);
}
function view_file()
@@ -1084,7 +680,7 @@
{
$from = 'index';
}
- $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
+ $GLOBALS['phpgw']->xslttpl->add_file(array('document',
'datatable_inline'));
$bypass = phpgw::get_var('bypass', 'bool');
@@ -1287,12 +883,28 @@
$function_msg = lang('Add document');
}
- $table_header_history[] = array
+ $datatable_def = array();
+
+ //---datatable
settings---------------------------------------------------
+
+ $datatable_def[] = array
(
- 'lang_date' => lang('Date'),
- 'lang_user' => lang('User'),
- 'lang_action' => lang('Action'),
- 'lang_new_value' => lang('New value')
+ 'container' => 'datatable-container_0',
+ 'requestUrl' => "''",
+ 'ColumnDefs' => array(array('key' =>
'value_date', 'label' => lang('Date'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_user', 'label' =>
lang('User'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'value_action', 'label'
=> lang('Action'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_old_value',
'label' => lang('old value'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_new_value',
'label' => lang('New value'), 'sortable' => true,
+ 'resizeable' => true)),
+ 'data' => json_encode($record_history),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
);
if ($values['doc_type'])
@@ -1340,37 +952,9 @@
$GLOBALS['phpgw']->jqcal->add_listener('values_document_date');
- //data test $record_history =
array(array(value_date=>"1111",value_user=>"22222",value_action=>"33333",value_new_value=>"44444444"));
- //----datatable
settings------------------------------------
-
- $datavalues[0] = array
- (
- 'name' => "0",
- 'values' => json_encode($record_history),
- 'total_records' => count($record_history),
- 'is_paginator' => 0,
- 'footer' => 0
- );
-
- $myColumnDefs[0] = array
- (
- 'name' => "0",
- 'values' => json_encode(array(array('key' =>
'value_date', 'label' => lang('Date'),
- 'sortable' => true,
'resizeable' => true),
- array('key' => 'value_user', 'label' =>
lang('User'), 'sortable' => true, 'resizeable' => true),
- array('key' => 'value_action', 'label'
=> lang('Action'), 'sortable' => true,
- 'resizeable' => true),
- array('key' => 'value_new_value',
'label' => lang('New value'), 'sortable' => true,
- 'resizeable' => true)))
- );
-
- //-----------------------------------------datatable
settings-----
-
$data = array
(
- 'property_js' =>
json_encode($GLOBALS['phpgw_info']['server']['webserver_url'] .
"/property/js/yahoo/property2.js"),
- 'datatable' => $datavalues,
- 'myColumnDefs' => $myColumnDefs,
+ 'datatable_def' => $datatable_def,
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'vendor_data' => $vendor_data,
'record_history' => $record_history,
@@ -1435,30 +1019,11 @@
'lang_branch' => lang('branch'),
'lang_branch_statustext' => lang('Select the
branch for this document')
);
- //----datatable
settings------------------------------------
- phpgwapi_yui::load_widget('dragdrop');
- phpgwapi_yui::load_widget('datatable');
- phpgwapi_yui::load_widget('menu');
- phpgwapi_yui::load_widget('connection');
- phpgwapi_yui::load_widget('loader');
- phpgwapi_yui::load_widget('tabview');
- phpgwapi_yui::load_widget('paginator');
- phpgwapi_yui::load_widget('animation');
- $GLOBALS['phpgw']->css->validate_file('datatable');
- $GLOBALS['phpgw']->css->validate_file('property');
-
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
- $GLOBALS['phpgw']->js->validate_file('yahoo',
'document.view', 'property');
- //--------------------------------datatable
settings--------
-
$appname = lang('document');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('edit' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
function delete()
@@ -1514,8 +1079,7 @@
if (!$this->acl_read)
{
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uilocation.stop',
- 'perm' => 1, 'acl_location' =>
$this->acl_location));
+ phpgw::no_access();
}
$from = phpgw::get_var('from');
@@ -1526,18 +1090,34 @@
$from = 'index';
}
- $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
+ $GLOBALS['phpgw']->xslttpl->add_file(array('document',
'datatable_inline'));
$values = $this->bo->read_single($document_id);
$function_msg = lang('view document');
$record_history =
$this->bo->read_record_history($document_id);
- $table_header_history[] = array
+ $datatable_def = array();
+
+ //---datatable
settings---------------------------------------------------
+
+ $datatable_def[] = array
(
- 'lang_date' => lang('Date'),
- 'lang_user' => lang('User'),
- 'lang_action' => lang('Action'),
- 'lang_new_value' => lang('New value')
+ 'container' => 'datatable-container_0',
+ 'requestUrl' => "''",
+ 'ColumnDefs' => array(array('key' =>
'value_date', 'label' => lang('Date'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_user', 'label' =>
lang('User'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'value_action', 'label'
=> lang('Action'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_old_value',
'label' => lang('old value'), 'sortable' => true,
+ 'resizeable' => true),
+ array('key' => 'value_new_value',
'label' => lang('New value'), 'sortable' => true,
+ 'resizeable' => true)),
+ 'data' => json_encode($record_history),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
);
if ($values['doc_type'])
@@ -1573,8 +1153,8 @@
$data = array
(
+ 'datatable_def' => $datatable_def,
'vendor_data' => $vendor_data,
- 'record_history' => $record_history,
'table_header_history' => $table_header_history,
'lang_history' => lang('History'),
'lang_no_history' => lang('No history'),
Modified: trunk/property/templates/base/document.xsl
===================================================================
--- trunk/property/templates/base/document.xsl 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/templates/base/document.xsl 2016-02-21 19:52:07 UTC (rev
14759)
@@ -1,399 +1,398 @@
<!-- $Id$ -->
<xsl:template name="app_data">
- <xsl:choose>
- <xsl:when test="edit">
- <xsl:apply-templates select="edit"/>
- </xsl:when>
- <xsl:when test="view">
- <xsl:apply-templates select="view"/>
- </xsl:when>
- <xsl:when test="list_document">
- <xsl:apply-templates select="list_document"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="list"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit"/>
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view"/>
+ </xsl:when>
+ <xsl:when test="list_document">
+ <xsl:apply-templates select="list_document"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="list"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- New template-->
<xsl:template match="list">
- <xsl:apply-templates select="menu"/>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <tr>
- <td align="left">
- <xsl:call-template
name="doc_type_filter"/>
- </td>
- <xsl:choose>
- <xsl:when test="cat_list!=''">
- <td align="left">
- <xsl:call-template
name="cat_filter2"/>
- </td>
- </xsl:when>
- </xsl:choose>
- <td align="left">
- <xsl:call-template
name="user_id_filter"/>
- </td>
- <td align="right">
- <xsl:call-template name="search_field"/>
- </td>
- </tr>
- <tr>
- <td colspan="4" 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:apply-templates select="menu"/>
+ <table width="100%" cellpadding="2" cellspacing="2" align="center">
+ <tr>
+ <td align="left">
+ <xsl:call-template name="doc_type_filter"/>
+ </td>
<xsl:choose>
- <xsl:when test="values">
- <xsl:call-template name="values"/>
+ <xsl:when test="cat_list!=''">
+ <td align="left">
+ <xsl:call-template
name="cat_filter2"/>
+ </td>
</xsl:when>
</xsl:choose>
- <xsl:choose>
- <xsl:when test="table_add !=''">
- <xsl:apply-templates
select="table_add"/>
- </xsl:when>
- </xsl:choose>
- </table>
+ <td align="left">
+ <xsl:call-template name="user_id_filter"/>
+ </td>
+ <td align="right">
+ <xsl:call-template name="search_field"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" 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="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>
+ </table>
</xsl:template>
<!-- New template-->
<xsl:template name="doc_type_filter">
- <xsl:variable name="select_name">
- <xsl:value-of select="select_name"/>
- </xsl:variable>
- <xsl:variable name="lang_submit">
- <xsl:value-of select="lang_submit"/>
- </xsl:variable>
- <form method="post" action="{select_action}">
- <select name="doc_type" onChange="this.form.submit();"
onMouseout="window.status='';return true;">
- <xsl:attribute name="onMouseover">
- <xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_doc_type_statustext"/>
- <xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- <option value="">
- <xsl:value-of
select="lang_no_doc_type"/>
- </option>
- <xsl:apply-templates select="doc_type"/>
- </select>
- <noscript>
- <xsl:text> </xsl:text>
- <input type="submit" name="submit"
value="{$lang_submit}"/>
- </noscript>
- </form>
+ <xsl:variable name="select_name">
+ <xsl:value-of select="select_name"/>
+ </xsl:variable>
+ <xsl:variable name="lang_submit">
+ <xsl:value-of select="lang_submit"/>
+ </xsl:variable>
+ <form method="post" action="{select_action}">
+ <select name="doc_type" onChange="this.form.submit();"
onMouseout="window.status='';return true;">
+ <xsl:attribute name="onMouseover">
+ <xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_doc_type_statustext"/>
+ <xsl:text>'; return true;</xsl:text>
+ </xsl:attribute>
+ <option value="">
+ <xsl:value-of select="lang_no_doc_type"/>
+ </option>
+ <xsl:apply-templates select="doc_type"/>
+ </select>
+ <noscript>
+ <xsl:text> </xsl:text>
+ <input type="submit" name="submit"
value="{$lang_submit}"/>
+ </noscript>
+ </form>
</xsl:template>
<!-- New template-->
<xsl:template match="doc_type">
- <xsl:variable name="id">
- <xsl:value-of select="id"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="selected">
- <option value="{$id}" selected="selected">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:when>
- <xsl:otherwise>
- <option value="{$id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="id">
+ <xsl:value-of select="id"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected">
+ <option value="{$id}" selected="selected">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- New template-->
<xsl:template name="cat_filter2">
- <xsl:variable name="select_name">
- <xsl:value-of select="select_name"/>
- </xsl:variable>
- <xsl:variable name="lang_submit">
- <xsl:value-of select="lang_submit"/>
- </xsl:variable>
- <form method="post" action="{select_action}">
- <select name="{$select_name}"
onChange="this.form.submit();" onMouseout="window.status='';return true;">
- <xsl:attribute name="onMouseover">
- <xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_cat_statustext"/>
- <xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- <option value="">
- <xsl:value-of select="lang_no_cat"/>
- </option>
- <xsl:apply-templates select="cat_list"/>
- </select>
- <noscript>
- <xsl:text> </xsl:text>
- <input type="submit" name="submit"
value="{$lang_submit}"/>
- </noscript>
- </form>
+ <xsl:variable name="select_name">
+ <xsl:value-of select="select_name"/>
+ </xsl:variable>
+ <xsl:variable name="lang_submit">
+ <xsl:value-of select="lang_submit"/>
+ </xsl:variable>
+ <form method="post" action="{select_action}">
+ <select name="{$select_name}" onChange="this.form.submit();"
onMouseout="window.status='';return true;">
+ <xsl:attribute name="onMouseover">
+ <xsl:text>window.status='</xsl:text>
+ <xsl:value-of select="lang_cat_statustext"/>
+ <xsl:text>'; return true;</xsl:text>
+ </xsl:attribute>
+ <option value="">
+ <xsl:value-of select="lang_no_cat"/>
+ </option>
+ <xsl:apply-templates select="cat_list"/>
+ </select>
+ <noscript>
+ <xsl:text> </xsl:text>
+ <input type="submit" name="submit"
value="{$lang_submit}"/>
+ </noscript>
+ </form>
</xsl:template>
<!-- New template-->
<xsl:template match="cat_list">
- <xsl:variable name="id">
- <xsl:value-of select="id"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="selected">
- <option value="{$id}" selected="selected">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:when>
- <xsl:otherwise>
- <option value="{$id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="id">
+ <xsl:value-of select="id"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected">
+ <option value="{$id}" selected="selected">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- New template-->
<xsl:template match="list_document">
- <xsl:apply-templates select="menu"/>
- <div align="left">
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="left"
colspan="3">
-
<xsl:call-template name="msgbox"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <xsl:call-template name="location_view"/>
- <tr>
- <td>
- <xsl:call-template
name="categories"/>
- </td>
- <td align="center">
- <xsl:call-template
name="user_id_filter"/>
- </td>
- <td align="right">
- <xsl:call-template
name="search_field"/>
- </td>
- </tr>
- <tr>
- <td colspan="4" width="100%">
- <xsl:call-template
name="nextmatchs"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:apply-templates
select="table_header_document"/>
- <xsl:apply-templates select="values_document"/>
- <xsl:apply-templates select="table_add"/>
- <tr>
- <td>
- <xsl:variable
name="done_action">
- <xsl:value-of
select="done_action"/>
- </xsl:variable>
- <xsl:variable name="lang_done">
- <xsl:value-of
select="lang_done"/>
- </xsl:variable>
- <form method="post"
action="{$done_action}">
- <input type="submit"
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_done_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </table>
- </div>
+ <xsl:apply-templates select="menu"/>
+ <div align="left">
+ <table width="100%" cellpadding="2" cellspacing="2"
align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <tr>
+ <td align="left" colspan="3">
+ <xsl:call-template
name="msgbox"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:call-template name="location_view"/>
+ <tr>
+ <td>
+ <xsl:call-template name="categories"/>
+ </td>
+ <td align="center">
+ <xsl:call-template
name="user_id_filter"/>
+ </td>
+ <td align="right">
+ <xsl:call-template name="search_field"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" width="100%">
+ <xsl:call-template name="nextmatchs"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="2" cellspacing="2"
align="center">
+ <xsl:apply-templates select="table_header_document"/>
+ <xsl:apply-templates select="values_document"/>
+ <xsl:apply-templates select="table_add"/>
+ <tr>
+ <td>
+ <xsl:variable name="done_action">
+ <xsl:value-of
select="done_action"/>
+ </xsl:variable>
+ <xsl:variable name="lang_done">
+ <xsl:value-of
select="lang_done"/>
+ </xsl:variable>
+ <form method="post"
action="{$done_action}">
+ <input type="submit"
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_done_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </div>
</xsl:template>
<!-- New template-->
<xsl:template match="table_header_document">
- <xsl:variable name="sort_document_name">
- <xsl:value-of select="sort_document_name"/>
- </xsl:variable>
- <tr class="th">
- <td class="th_text" width="10%" align="left">
- <a href="{$sort_document_name}">
- <xsl:value-of
select="lang_document_name"/>
- </a>
- </td>
- <td class="th_text" width="60%" align="left">
- <xsl:value-of select="lang_title"/>
- </td>
- <td class="th_text" width="2%" align="left">
- <xsl:value-of select="lang_doc_type"/>
- </td>
- <td class="th_text" width="5%" align="left">
- <xsl:value-of select="lang_user"/>
- </td>
- <td class="th_text" width="5%" align="center">
- <xsl:value-of select="lang_view"/>
- </td>
- <td class="th_text" width="5%" align="center">
- <xsl:value-of select="lang_edit"/>
- </td>
- <td class="th_text" width="5%" align="center">
- <xsl:value-of select="lang_delete"/>
- </td>
- </tr>
+ <xsl:variable name="sort_document_name">
+ <xsl:value-of select="sort_document_name"/>
+ </xsl:variable>
+ <tr class="th">
+ <td class="th_text" width="10%" align="left">
+ <a href="{$sort_document_name}">
+ <xsl:value-of select="lang_document_name"/>
+ </a>
+ </td>
+ <td class="th_text" width="60%" align="left">
+ <xsl:value-of select="lang_title"/>
+ </td>
+ <td class="th_text" width="2%" align="left">
+ <xsl:value-of select="lang_doc_type"/>
+ </td>
+ <td class="th_text" width="5%" align="left">
+ <xsl:value-of select="lang_user"/>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <xsl:value-of select="lang_view"/>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <xsl:value-of select="lang_edit"/>
+ </td>
+ <td class="th_text" width="5%" align="center">
+ <xsl:value-of select="lang_delete"/>
+ </td>
+ </tr>
</xsl:template>
<!-- New template-->
<xsl:template match="values_document">
- <xsl:variable name="lang_view_file_statustext">
- <xsl:value-of select="lang_view_file_statustext"/>
- </xsl:variable>
- <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:variable name="lang_history_statustext">
- <xsl:value-of select="//lang_history_statustext"/>
- </xsl:variable>
- <xsl:variable name="link_history">
- <xsl:value-of select="//link_history"/>
- </xsl:variable>
- <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="left">
- <xsl:choose>
- <xsl:when test="link_to_files!=''">
+ <xsl:variable name="lang_view_file_statustext">
+ <xsl:value-of select="lang_view_file_statustext"/>
+ </xsl:variable>
+ <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:variable name="lang_history_statustext">
+ <xsl:value-of select="//lang_history_statustext"/>
+ </xsl:variable>
+ <xsl:variable name="link_history">
+ <xsl:value-of select="//link_history"/>
+ </xsl:variable>
+ <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="left">
+ <xsl:choose>
+ <xsl:when test="link_to_files!=''">
<xsl:variable name="link_to_file">
<xsl:value-of
select="link_to_files"/>/<xsl:value-of select="directory"/>/<xsl:value-of
select="document_name"/>
</xsl:variable>
- <a href="{$link_to_file}"
target="_blank" onMouseover="window.status='{lang_view_file_statustext}';return
true;" onMouseout="window.status='';return true;">
- <xsl:value-of
select="document_name"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="link_view_file">
- <xsl:value-of
select="link_view_file"/>
- </xsl:variable>
- <a href="{$link_view_file}"
target="_blank"
onMouseover="window.status='{$lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;">
- <xsl:value-of
select="document_name"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td align="left">
- <xsl:value-of select="title"/>
- </td>
- <td align="left">
- <xsl:value-of select="doc_type"/>
- </td>
- <td align="left">
- <xsl:value-of select="user"/>
- </td>
- <td align="center">
- <xsl:variable name="link_view">
- <xsl:value-of select="link_view"/>
- </xsl:variable>
- <a href="{$link_view}"
onMouseover="window.status='{$lang_view_statustext}';return true;"
onMouseout="window.status='';return true;">
- <xsl:value-of select="text_view"/>
- </a>
- </td>
- <td align="center">
- <xsl:variable name="link_edit">
- <xsl:value-of select="link_edit"/>
- </xsl:variable>
- <a href="{$link_edit}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;">
- <xsl:value-of select="text_edit"/>
- </a>
- </td>
- <td align="center">
- <xsl:variable name="link_delete">
- <xsl:value-of select="link_delete"/>
- </xsl:variable>
- <a href="{$link_delete}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;">
- <xsl:value-of select="text_delete"/>
- </a>
- </td>
- </tr>
+ <a href="{$link_to_file}"
target="_blank" onMouseover="window.status='{lang_view_file_statustext}';return
true;" onMouseout="window.status='';return true;">
+ <xsl:value-of
select="document_name"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="link_view_file">
+ <xsl:value-of
select="link_view_file"/>
+ </xsl:variable>
+ <a href="{$link_view_file}"
target="_blank"
onMouseover="window.status='{$lang_view_file_statustext}';return true;"
onMouseout="window.status='';return true;">
+ <xsl:value-of
select="document_name"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td align="left">
+ <xsl:value-of select="title"/>
+ </td>
+ <td align="left">
+ <xsl:value-of select="doc_type"/>
+ </td>
+ <td align="left">
+ <xsl:value-of select="user"/>
+ </td>
+ <td align="center">
+ <xsl:variable name="link_view">
+ <xsl:value-of select="link_view"/>
+ </xsl:variable>
+ <a href="{$link_view}"
onMouseover="window.status='{$lang_view_statustext}';return true;"
onMouseout="window.status='';return true;">
+ <xsl:value-of select="text_view"/>
+ </a>
+ </td>
+ <td align="center">
+ <xsl:variable name="link_edit">
+ <xsl:value-of select="link_edit"/>
+ </xsl:variable>
+ <a href="{$link_edit}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;">
+ <xsl:value-of select="text_edit"/>
+ </a>
+ </td>
+ <td align="center">
+ <xsl:variable name="link_delete">
+ <xsl:value-of select="link_delete"/>
+ </xsl:variable>
+ <a href="{$link_delete}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;">
+ <xsl:value-of select="text_delete"/>
+ </a>
+ </td>
+ </tr>
</xsl:template>
<!-- New 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>
+ <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">
- <div align="left">
- <table cellpadding="2" cellspacing="2" width="80%"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="left"
colspan="3">
-
<xsl:call-template name="msgbox"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
- <form ENCTYPE="multipart/form-data"
method="post" name="form" action="{$form_action}">
- <xsl:choose>
- <xsl:when
test="value_document_name!=''">
- <tr>
- <td
valign="top">
-
<xsl:value-of select="lang_document_name"/>
- <input
type="hidden" name="values[document_name_orig]" value="{value_document_name}"/>
- <input
type="hidden" name="values[location_code]" value="{value_location_code}"/>
- </td>
- <td>
+ <div align="left">
+ <dl>
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <dt>
+ <xsl:call-template
name="msgbox"/>
+ </dt>
+ </xsl:when>
+ </xsl:choose>
+ </dl>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <form ENCTYPE="multipart/form-data" method="post" name="form"
action="{$form_action}" class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="general">
+ <fieldset>
+
+ <xsl:choose>
+ <xsl:when
test="value_document_name!=''">
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="lang_document_name"/>
+
<input type="hidden" name="values[document_name_orig]"
value="{value_document_name}"/>
+
<input type="hidden" name="values[location_code]"
value="{value_location_code}"/>
+ </label>
<xsl:value-of select="value_document_name"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <tr>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_update_file"/>
- </td>
- <td>
+ </div>
+ </xsl:when>
+ </xsl:choose>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_update_file"/>
+ </label>
<input type="file"
size="50" name="document_file" onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -401,13 +400,11 @@
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_version"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_version"/>
+ </label>
<input type="text"
name="values[version]" value="{value_version}" size="12"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -415,13 +412,11 @@
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_link"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_link"/>
+ </label>
<input type="text"
name="values[link]" value="{value_link}" size="50"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -429,13 +424,11 @@
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_title"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_title"/>
+ </label>
<input type="text"
name="values[title]" value="{value_title}" size="50"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -443,13 +436,11 @@
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_descr"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_descr"/>
+ </label>
<textarea cols="60"
rows="6" name="values[descr]" onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -458,46 +449,41 @@
</xsl:attribute>
<xsl:value-of
select="value_descr"/>
</textarea>
- </td>
- </tr>
- <xsl:call-template name="vendor_form"/>
- <tr>
- <td>
- <xsl:value-of
select="lang_category"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+
+ <xsl:call-template
name="vendor_form"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_category"/>
+ </label>
<xsl:call-template
name="categories"/>
- </td>
- </tr>
- <xsl:choose>
- <xsl:when
test="location_type='form'">
- <xsl:call-template
name="location_form"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template
name="location_view"/>
- </xsl:otherwise>
- </xsl:choose>
- <tr>
- <td>
- <xsl:value-of
select="lang_coordinator"/>
- </td>
- <td>
+ </div>
+ <xsl:choose>
+ <xsl:when
test="location_type='form'">
+
<xsl:call-template name="location_form"/>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:call-template name="location_view"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_coordinator"/>
+ </label>
<xsl:call-template
name="user_id_select"/>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:value-of
select="lang_status"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_status"/>
+ </label>
<xsl:call-template
name="status_select"/>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_document_date"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_document_date"/>
+ </label>
<input type="text"
id="values_document_date" name="values[document_date]" size="10"
value="{value_document_date}" readonly="readonly"
onMouseout="window.status='';return true;">
<xsl:attribute
name="onMouseover">
<xsl:text>window.status='</xsl:text>
@@ -505,13 +491,11 @@
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:value-of
select="lang_branch"/>
- </td>
- <td>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="lang_branch"/>
+ </label>
<xsl:variable
name="lang_branch_statustext">
<xsl:value-of
select="lang_branch_statustext"/>
</xsl:variable>
@@ -521,323 +505,300 @@
</option>
<xsl:apply-templates select="branch_list"/>
</select>
+ </div>
+ <div class="pure-control-group">
+ <xsl:variable
name="lang_save">
+
<xsl:value-of select="lang_save"/>
+ </xsl:variable>
+ <input
type="submit" 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>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ </form>
+ <tr>
+ <td>
+ <xsl:variable name="done_action">
+ <xsl:value-of select="done_action"/>
+ </xsl:variable>
+ <xsl:variable name="lang_done">
+ <xsl:value-of select="lang_done"/>
+ </xsl:variable>
+ <form method="post" action="{$done_action}">
+ <input type="submit" name="done"
value="{$lang_done}" onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_done_statustext"/>
+ <xsl:text>'; return
true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </form>
+ </td>
+ </tr>
+ <hr noshade="noshade" width="100%" align="center" size="1"/>
+ <table width="80%" cellpadding="2" cellspacing="2"
align="center">
+ <xsl:choose>
+ <xsl:when test="record_history=''">
+ <tr>
+ <td class="th_text"
align="center">
+ <xsl:value-of
select="lang_no_history"/>
</td>
</tr>
- <tr height="50">
- <td>
- <xsl:variable
name="lang_save">
- <xsl:value-of
select="lang_save"/>
- </xsl:variable>
- <input type="submit"
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:otherwise>
+ <tr>
+ <td class="th_text"
align="left">
+ <xsl:value-of
select="lang_history"/>
</td>
</tr>
- </form>
- <tr>
- <td>
- <xsl:variable
name="done_action">
- <xsl:value-of
select="done_action"/>
- </xsl:variable>
- <xsl:variable name="lang_done">
- <xsl:value-of
select="lang_done"/>
- </xsl:variable>
- <form method="post"
action="{$done_action}">
- <input type="submit"
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_done_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </table>
- <hr noshade="noshade" width="100%" align="center"
size="1"/>
- <table width="80%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:choose>
- <xsl:when test="record_history=''">
- <tr>
- <td class="th_text"
align="center">
- <xsl:value-of
select="lang_no_history"/>
- </td>
- </tr>
- </xsl:when>
- <xsl:otherwise>
- <tr>
- <td class="th_text"
align="left">
- <xsl:value-of
select="lang_history"/>
- </td>
- </tr>
- <!-- DATATABLE 0-->
- <!-- <xsl:apply-templates
select="table_header_history"/><xsl:apply-templates select="record_history"/>
-->
- <tr>
- <td class="th_text"
colspan="3">
- <div
id="paging_0"/>
- <div
id="datatable-container_0"/>
- </td>
- </tr>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </div>
- <hr noshade="noshade" width="100%" align="center" size="1"/>
- <!-- DATATABLE DEFINITIONS-->
- <script type="text/javascript">
- var property_js = <xsl:value-of select="property_js"/>;
- var datatable = new Array();
- var myColumnDefs = new Array();
-
- <xsl:for-each select="datatable">
- datatable[<xsl:value-of select="name"/>] = [
- {
- values:<xsl:value-of
select="values"/>,
- total_records: <xsl:value-of
select="total_records"/>,
- is_paginator: <xsl:value-of
select="is_paginator"/>,
- footer:<xsl:value-of
select="footer"/>
- }
- ]
- </xsl:for-each>
-
- <xsl:for-each select="myColumnDefs">
- myColumnDefs[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
- </xsl:for-each>
- </script>
+ <!-- DATATABLE 0-->
+ <!-- <xsl:apply-templates
select="table_header_history"/><xsl:apply-templates select="record_history"/>
-->
+ <tr>
+ <td class="th_text" colspan="3">
+ <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="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </div>
+ <hr noshade="noshade" width="100%" align="center" size="1"/>
</xsl:template>
<!-- New template-->
<xsl:template match="branch_list">
- <xsl:variable name="id">
- <xsl:value-of select="id"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="selected">
- <option value="{$id}" selected="selected">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:when>
- <xsl:otherwise>
- <option value="{$id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:variable name="id">
+ <xsl:value-of select="id"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="selected">
+ <option value="{$id}" selected="selected">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:when>
+ <xsl:otherwise>
+ <option value="{$id}">
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- New template-->
<xsl:template match="table_header_history">
- <tr class="th">
- <td class="th_text" width="20%" align="left">
- <xsl:value-of select="lang_date"/>
- </td>
- <td class="th_text" width="10%" align="left">
- <xsl:value-of select="lang_user"/>
- </td>
- <td class="th_text" width="30%" align="left">
- <xsl:value-of select="lang_action"/>
- </td>
- <td class="th_text" width="10%" align="left">
- <xsl:value-of select="lang_new_value"/>
- </td>
- </tr>
+ <tr class="th">
+ <td class="th_text" width="20%" align="left">
+ <xsl:value-of select="lang_date"/>
+ </td>
+ <td class="th_text" width="10%" align="left">
+ <xsl:value-of select="lang_user"/>
+ </td>
+ <td class="th_text" width="30%" align="left">
+ <xsl:value-of select="lang_action"/>
+ </td>
+ <td class="th_text" width="10%" align="left">
+ <xsl:value-of select="lang_new_value"/>
+ </td>
+ </tr>
</xsl:template>
<!-- New template-->
<xsl:template match="record_history">
- <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="left">
- <xsl:value-of select="value_date"/>
- </td>
- <td align="left">
- <xsl:value-of select="value_user"/>
- </td>
- <td align="left">
- <xsl:value-of select="value_action"/>
- </td>
- <td align="left">
- <xsl:value-of select="value_new_value"/>
- </td>
- </tr>
+ <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="left">
+ <xsl:value-of select="value_date"/>
+ </td>
+ <td align="left">
+ <xsl:value-of select="value_user"/>
+ </td>
+ <td align="left">
+ <xsl:value-of select="value_action"/>
+ </td>
+ <td align="left">
+ <xsl:value-of select="value_new_value"/>
+ </td>
+ </tr>
</xsl:template>
<!-- view -->
<xsl:template match="view">
- <div align="left">
- <table cellpadding="2" cellspacing="2" width="80%"
align="center">
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_document_name"/>
- </td>
- <td>
- <xsl:value-of
select="value_document_name"/>
- </td>
- </tr>
- <tr>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_version"/>
- </td>
- <td>
- <xsl:value-of
select="value_version"/>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_title"/>
- </td>
- <td>
- <xsl:value-of
select="value_title"/>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_descr"/>
- </td>
- <td>
- <xsl:value-of
select="value_descr"/>
- </td>
- </tr>
- <xsl:call-template name="vendor_view"/>
- <tr>
- <td>
- <xsl:value-of
select="lang_category"/>
- </td>
- <xsl:for-each select="cat_list">
- <xsl:choose>
- <xsl:when
test="selected='selected'">
- <td>
-
<xsl:value-of select="name"/>
- </td>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- <xsl:call-template name="location_view"/>
- <tr>
- <td>
- <xsl:value-of
select="lang_coordinator"/>
- </td>
- <xsl:for-each select="user_list">
- <xsl:choose>
- <xsl:when
test="selected">
- <td>
-
<xsl:value-of select="name"/>
- </td>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- <tr>
- <td>
- <xsl:value-of
select="lang_status"/>
- </td>
- <xsl:for-each select="status_list">
- <xsl:choose>
- <xsl:when
test="selected">
- <td>
-
<xsl:value-of select="name"/>
- </td>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- <tr>
- <td valign="top">
- <xsl:value-of
select="lang_document_date"/>
- </td>
- <td>
- <xsl:value-of
select="value_document_date"/>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:value-of
select="lang_branch"/>
- </td>
- <xsl:for-each select="branch_list">
- <xsl:choose>
- <xsl:when
test="selected">
- <td>
-
<xsl:value-of select="name"/>
- </td>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- <tr height="50">
- <td>
- <xsl:variable
name="done_action">
- <xsl:value-of
select="done_action"/>
- </xsl:variable>
- <xsl:variable name="lang_done">
- <xsl:value-of
select="lang_done"/>
- </xsl:variable>
- <form method="post"
action="{$done_action}">
- <input type="submit"
class="forms" name="done" value="{$lang_done}"
onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_done_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- <xsl:variable
name="edit_action">
- <xsl:value-of
select="edit_action"/>
- </xsl:variable>
- <xsl:variable name="lang_edit">
- <xsl:value-of
select="lang_edit"/>
- </xsl:variable>
- <form method="post"
action="{$edit_action}">
- <input type="submit"
class="forms" name="edit" value="{$lang_edit}"
onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_edit_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </table>
- <hr noshade="noshade" width="100%" align="center"
size="1"/>
- <table width="80%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:choose>
- <xsl:when test="record_history=''">
- <tr>
- <td class="th_text"
align="center">
- <xsl:value-of
select="lang_no_history"/>
+ <div align="left">
+ <table cellpadding="2" cellspacing="2" width="80%"
align="center">
+ <tr>
+ <td valign="top">
+ <xsl:value-of
select="lang_document_name"/>
+ </td>
+ <td>
+ <xsl:value-of
select="value_document_name"/>
+ </td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_version"/>
+ </td>
+ <td>
+ <xsl:value-of select="value_version"/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_title"/>
+ </td>
+ <td>
+ <xsl:value-of select="value_title"/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <xsl:value-of select="lang_descr"/>
+ </td>
+ <td>
+ <xsl:value-of select="value_descr"/>
+ </td>
+ </tr>
+ <xsl:call-template name="vendor_view"/>
+ <tr>
+ <td>
+ <xsl:value-of select="lang_category"/>
+ </td>
+ <xsl:for-each select="cat_list">
+ <xsl:choose>
+ <xsl:when
test="selected='selected'">
+ <td>
+ <xsl:value-of
select="name"/>
</td>
- </tr>
- </xsl:when>
- <xsl:otherwise>
- <tr>
- <td class="th_text"
align="left">
- <xsl:value-of
select="lang_history"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </tr>
+ <xsl:call-template name="location_view"/>
+ <tr>
+ <td>
+ <xsl:value-of
select="lang_coordinator"/>
+ </td>
+ <xsl:for-each select="user_list">
+ <xsl:choose>
+ <xsl:when test="selected">
+ <td>
+ <xsl:value-of
select="name"/>
</td>
- </tr>
- <xsl:apply-templates
select="table_header_history"/>
- <xsl:apply-templates
select="record_history"/>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </div>
- <hr noshade="noshade" width="100%" align="center" size="1"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </tr>
+ <tr>
+ <td>
+ <xsl:value-of select="lang_status"/>
+ </td>
+ <xsl:for-each select="status_list">
+ <xsl:choose>
+ <xsl:when test="selected">
+ <td>
+ <xsl:value-of
select="name"/>
+ </td>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </tr>
+ <tr>
+ <td valign="top">
+ <xsl:value-of
select="lang_document_date"/>
+ </td>
+ <td>
+ <xsl:value-of
select="value_document_date"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <xsl:value-of select="lang_branch"/>
+ </td>
+ <xsl:for-each select="branch_list">
+ <xsl:choose>
+ <xsl:when test="selected">
+ <td>
+ <xsl:value-of
select="name"/>
+ </td>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </tr>
+ <tr height="50">
+ <td>
+ <xsl:variable name="done_action">
+ <xsl:value-of
select="done_action"/>
+ </xsl:variable>
+ <xsl:variable name="lang_done">
+ <xsl:value-of
select="lang_done"/>
+ </xsl:variable>
+ <form method="post"
action="{$done_action}">
+ <input type="submit"
class="forms" name="done" value="{$lang_done}"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_done_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </form>
+ <xsl:variable name="edit_action">
+ <xsl:value-of
select="edit_action"/>
+ </xsl:variable>
+ <xsl:variable name="lang_edit">
+ <xsl:value-of
select="lang_edit"/>
+ </xsl:variable>
+ <form method="post"
action="{$edit_action}">
+ <input type="submit"
class="forms" name="edit" value="{$lang_edit}"
onMouseout="window.status='';return true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+ <xsl:value-of
select="lang_edit_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </form>
+ </td>
+ </tr>
+ </table>
+ <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="data" select
='data'/>
+ <xsl:with-param name="config" select
='config'/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ <hr noshade="noshade" width="100%" align="center" size="1"/>
</xsl:template>
Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl 2016-02-21 00:31:53 UTC (rev
14758)
+++ trunk/property/templates/base/tts.xsl 2016-02-21 19:52:07 UTC (rev
14759)
@@ -2,160 +2,160 @@
<!-- $Id$ -->
<xsl:template match="data">
- <xsl:choose>
- <xsl:when test="add">
- <xsl:apply-templates select="add"/>
- </xsl:when>
- <xsl:when test="view">
- <xsl:apply-templates select="view"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="add">
+ <xsl:apply-templates select="add"/>
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view"/>
+ </xsl:when>
+ </xsl:choose>
<xsl:call-template name="jquery_phpgw_i18n"/>
</xsl:template>
<!-- add -->
<xsl:template xmlns:php="http://php.net/xsl" match="add">
- <script type="text/javascript">
- self.name="first_Window";
- <xsl:value-of select="lookup_functions"/>
- var my_groups = <xsl:value-of select="my_groups"/>;
- </script>
+ <script type="text/javascript">
+ self.name="first_Window";
+ <xsl:value-of select="lookup_functions"/>
+ var my_groups = <xsl:value-of select="my_groups"/>;
+ </script>
<dl>
<xsl:choose>
<xsl:when test="msgbox_data != ''">
<dt>
- <xsl:call-template
name="msgbox"/>
+ <xsl:call-template name="msgbox"/>
</dt>
</xsl:when>
</xsl:choose>
</dl>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
<form class="pure-form pure-form-aligned"
ENCTYPE="multipart/form-data" id="form" name="form" method="post"
action="{$form_action}">
<div id="tab-content">
<xsl:value-of disable-output-escaping="yes"
select="tabs"/>
<div id="add">
<fieldset>
- <xsl:for-each
select="value_origin">
+ <xsl:for-each select="value_origin">
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="descr"/>
- </label>
+ <label>
+ <xsl:value-of
select="descr"/>
+ </label>
<div
class="pure-custom">
-
<xsl:for-each select="data">
+ <xsl:for-each
select="data">
<div>
<xsl:variable name="link_request">
<xsl:value-of select="//link_request"/>&id=<xsl:value-of
select="id"/>
</xsl:variable>
-
<a href="{link}" title="{//lang_origin_statustext}">
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
+
<a href="{link}" title="{//lang_origin_statustext}">
+
<xsl:value-of select="id"/>
+
</a>
+
<xsl:text> </xsl:text>
</div>
-
</xsl:for-each>
+ </xsl:for-each>
</div>
</div>
- </xsl:for-each>
- <input type="hidden"
name="values[origin]" value="{value_origin_type}"/>
- <input type="hidden"
name="values[origin_id]" value="{value_origin_id}"/>
+ </xsl:for-each>
+ <input type="hidden"
name="values[origin]" value="{value_origin_type}"/>
+ <input type="hidden"
name="values[origin_id]" value="{value_origin_id}"/>
<xsl:call-template
name="location_form2"/>
<div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'category')"/>
+ </label>
+ <xsl:call-template
name="categories"/>
+ </div>
+ <xsl:choose>
+ <xsl:when test="simple !='1'">
+ <div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'category')"/>
+
<xsl:value-of select="php:function('lang', 'Group')"/>
</label>
-
<xsl:call-template name="categories"/>
- </div>
- <xsl:choose>
- <xsl:when test="simple
!='1'">
- <div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Group')"/>
-
</label>
-
<xsl:call-template name="group_select"/>
+
<xsl:call-template name="group_select"/>
</div>
- <xsl:choose>
-
<xsl:when test="disable_userassign_on_add !='1'">
+ <xsl:choose>
+ <xsl:when
test="disable_userassign_on_add !='1'">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Assign
to')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'Assign to')"/>
+
</label>
-
<xsl:call-template name="user_id_select"/>
+
<xsl:call-template name="user_id_select"/>
</div>
-
</xsl:when>
- </xsl:choose>
-
<xsl:call-template name="contact_form"/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:call-template
name="contact_form"/>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Send e-mail')"/>
-
</label>
-
<input type="checkbox" name="values[send_mail]" value="1">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'Choose to send
mailnotification')"/>
-
</xsl:attribute>
-
<xsl:if test="pref_send_mail = '1'">
-
<xsl:attribute name="checked">
-
<xsl:text>checked</xsl:text>
-
</xsl:attribute>
-
</xsl:if>
-
</input>
+ <label>
+
<xsl:value-of select="php:function('lang', 'Send e-mail')"/>
+ </label>
+ <input
type="checkbox" name="values[send_mail]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Choose to send mailnotification')"/>
+
</xsl:attribute>
+ <xsl:if
test="pref_send_mail = '1'">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Priority')"/>
-
</label>
+ <label>
+
<xsl:value-of select="php:function('lang', 'Priority')"/>
+ </label>
-
<xsl:variable name="lang_priority_statustext">
-
<xsl:value-of select="lang_priority_statustext"/>
-
</xsl:variable>
-
<xsl:variable name="select_priority_name">
-
<xsl:value-of select="select_priority_name"/>
-
</xsl:variable>
-
<select name="{$select_priority_name}"
onMouseover="window.status='{$lang_priority_statustext}'; return true;"
onMouseout="window.status='';return true;">
-
<xsl:apply-templates select="priority_list/options"/>
-
</select>
+ <xsl:variable
name="lang_priority_statustext">
+
<xsl:value-of select="lang_priority_statustext"/>
+ </xsl:variable>
+ <xsl:variable
name="select_priority_name">
+
<xsl:value-of select="select_priority_name"/>
+ </xsl:variable>
+ <select
name="{$select_priority_name}"
onMouseover="window.status='{$lang_priority_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="priority_list/options"/>
+ </select>
</div>
<div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'status')"/>
+ </label>
+
+ <select
id="status_id" name="values[status]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Set the status of the ticket')"/>
+
</xsl:attribute>
+
<xsl:apply-templates select="status_list/options"/>
+ </select>
+ </div>
+ <xsl:choose>
+ <xsl:when
test="show_finnish_date ='1'">
+ <div
class="pure-control-group">
<label>
-
<xsl:value-of select="php:function('lang', 'status')"/>
+
<xsl:value-of select="php:function('lang', 'finnish date')"/>
</label>
-
-
<select id="status_id" name="values[status]">
+
<input type="text" id="values_finnish_date" name="values[finnish_date]"
size="10" value="{value_finnish_date}" readonly="readonly"
onMouseout="window.status='';return true;">
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'Set the status of
the ticket')"/>
+
<xsl:value-of select="lang_finnish_date_statustext"/>
</xsl:attribute>
-
<xsl:apply-templates select="status_list/options"/>
-
</select>
- </div>
- <xsl:choose>
-
<xsl:when test="show_finnish_date ='1'">
- <div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'finnish
date')"/>
-
</label>
-
<input type="text" id="values_finnish_date"
name="values[finnish_date]" size="10" value="{value_finnish_date}"
readonly="readonly" onMouseout="window.status='';return true;">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="lang_finnish_date_statustext"/>
-
</xsl:attribute>
-
</input>
+
</input>
</div>
-
</xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates
select="custom_attributes/attributes"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:apply-templates
select="custom_attributes/attributes"/>
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'subject')"/>
- </label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'subject')"/>
+ </label>
- <input
type="text" name="values[subject]" value="{value_subject}" size="60" >
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'Enter the subject of this
ticket')"/>
-
</xsl:attribute>
+ <input type="text"
name="values[subject]" value="{value_subject}" size="60" >
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'Enter the subject of this ticket')"/>
+ </xsl:attribute>
<xsl:attribute
name="data-validation">
<xsl:text>required</xsl:text>
</xsl:attribute>
@@ -163,210 +163,210 @@
<xsl:value-of
select="php:function('lang', 'Please enter a title !')"/>
</xsl:attribute>
- </input>
+ </input>
</div>
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'Details')"/>
- </label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Details')"/>
+ </label>
- <textarea
cols="60" rows="10" name="values[details]" >
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'Enter the details of this
ticket')"/>
-
</xsl:attribute>
+ <textarea cols="60" rows="10"
name="values[details]" >
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'Enter the details of this ticket')"/>
+ </xsl:attribute>
<xsl:attribute
name="data-validation">
<xsl:text>required</xsl:text>
</xsl:attribute>
<xsl:attribute
name="data-validation-error-msg">
<xsl:value-of
select="php:function('lang', 'Please give som details !')"/>
</xsl:attribute>
-
<xsl:value-of select="value_details"/>
- </textarea>
+ <xsl:value-of
select="value_details"/>
+ </textarea>
</div>
- <xsl:choose>
- <xsl:when
test="fileupload = 1">
+ <xsl:choose>
+ <xsl:when test="fileupload = 1">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="lang_upload_file"/>
-
</label>
+ <label>
+
<xsl:value-of select="lang_upload_file"/>
+ </label>
-
<input type="file" name="file" size="40">
-
<xsl:attribute name="title">
-
<xsl:value-of select="lang_file_statustext"/>
-
</xsl:attribute>
-
</input>
+ <input
type="file" name="file" size="40">
+
<xsl:attribute name="title">
+
<xsl:value-of select="lang_file_statustext"/>
+
</xsl:attribute>
+ </input>
</div>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
</fieldset>
- </div>
+ </div>
</div>
<div class="proplist-col">
- <input type="hidden"
id="save" name="values[save]" value=""/>
- <input type="hidden"
id="apply" name="values[apply]" value=""/>
- <input type="hidden"
id="cancel" name="values[cancel]" value=""/>
+ <input type="hidden" id="save" name="values[save]"
value=""/>
+ <input type="hidden" id="apply" name="values[apply]"
value=""/>
+ <input type="hidden" id="cancel" name="values[cancel]"
value=""/>
<input class="pure-button pure-button-primary"
type="button" name="save" value="{lang_send}"
onClick="confirm_session('save');">
- <xsl:attribute
name="title">
-
<xsl:value-of select="lang_send_statustext"/>
- </xsl:attribute>
- </input>
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_send_statustext"/>
+ </xsl:attribute>
+ </input>
<input class="pure-button pure-button-primary"
type="button" name="apply" value="{lang_save}"
onClick="confirm_session('apply');">
- <xsl:attribute
name="title">
-
<xsl:value-of select="lang_send_statustext"/>
- </xsl:attribute>
- </input>
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_send_statustext"/>
+ </xsl:attribute>
+ </input>
<input class="pure-button pure-button-primary"
type="button" name="cancel" value="{lang_cancel}"
onClick="confirm_session('cancel');">
- <xsl:attribute
name="title">
-
<xsl:value-of select="lang_send_statustext"/>
- </xsl:attribute>
- </input>
- </div>
- </form>
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_send_statustext"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </form>
</xsl:template>
<!-- view -->
<xsl:template xmlns:php="http://php.net/xsl" match="view">
- <script type="text/javascript">
- self.name="first_Window";
- <xsl:value-of select="lookup_functions"/>
- function generate_order()
- {
- Window1=window.open('<xsl:value-of
select="order_link"/>','','left=50,top=100');
- }
+ <script type="text/javascript">
+ self.name="first_Window";
+ <xsl:value-of select="lookup_functions"/>
+ function generate_order()
+ {
+ Window1=window.open('<xsl:value-of
select="order_link"/>','','left=50,top=100');
+ }
- function generate_request()
- {
- Window1=window.open('<xsl:value-of
select="request_link"/>','','left=50,top=100');
- }
+ function generate_request()
+ {
+ Window1=window.open('<xsl:value-of
select="request_link"/>','','left=50,top=100');
+ }
- function template_lookup()
- {
- var oArgs =
{menuaction:'property.uilookup.order_template',type:'order_template'};
- var strURL = phpGWLink('index.php', oArgs);
+ function template_lookup()
+ {
+ var oArgs =
{menuaction:'property.uilookup.order_template',type:'order_template'};
+ var strURL = phpGWLink('index.php', oArgs);
TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});
- }
+ }
- function response_lookup()
- {
- var oArgs =
{menuaction:'property.uilookup.response_template',type:'response_template'};
- var strURL = phpGWLink('index.php', oArgs);
+ function response_lookup()
+ {
+ var oArgs =
{menuaction:'property.uilookup.response_template',type:'response_template'};
+ var strURL = phpGWLink('index.php', oArgs);
TINY.box.show({iframe:strURL,
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
mask:true, animate:true, close: true});
- }
+ }
- function preview_html(id)
- {
+ function preview_html(id)
+ {
- var on_behalf_of_assigned =
document.getElementById("on_behalf_of_assigned").checked ? 1 : 0;
+ var on_behalf_of_assigned =
document.getElementById("on_behalf_of_assigned").checked ? 1 : 0;
- var oArgs =
{menuaction:'property.uitts.view',id:id, preview_html:true,
on_behalf_of_assigned: on_behalf_of_assigned};
- var strURL = phpGWLink('index.php', oArgs);
-
Window1=window.open(strURL,'Search',"left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+ var oArgs = {menuaction:'property.uitts.view',id:id,
preview_html:true, on_behalf_of_assigned: on_behalf_of_assigned};
+ var strURL = phpGWLink('index.php', oArgs);
+
Window1=window.open(strURL,'Search',"left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
- }
+ }
- function preview_pdf(id)
- {
- var on_behalf_of_assigned =
document.getElementById("on_behalf_of_assigned").checked ? 1 : 0;
+ function preview_pdf(id)
+ {
+ var on_behalf_of_assigned =
document.getElementById("on_behalf_of_assigned").checked ? 1 : 0;
- var oArgs =
{menuaction:'property.uitts.view',id:id, preview_pdf:true,
on_behalf_of_assigned: on_behalf_of_assigned};
- var strURL = phpGWLink('index.php', oArgs);
-
Window1=window.open(strURL,'Search',"left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
- }
+ var oArgs = {menuaction:'property.uitts.view',id:id,
preview_pdf:true, on_behalf_of_assigned: on_behalf_of_assigned};
+ var strURL = phpGWLink('index.php', oArgs);
+
Window1=window.open(strURL,'Search',"left=50,top=100,width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");
+ }
- var my_groups = <xsl:value-of select="my_groups"/>;
+ var my_groups = <xsl:value-of select="my_groups"/>;
var base_java_url = <xsl:value-of select="base_java_url"/>;
var base_java_notify_url = <xsl:value-of
select="base_java_notify_url"/>;
- </script>
+ </script>
<dl>
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
<dt>
- <xsl:call-template
name="msgbox"/>
+ <xsl:call-template name="msgbox"/>
</dt>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
</dl>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
<form class="pure-form pure-form-aligned" ENCTYPE="multipart/form-data"
id="form" name="form" method="post" action="{$form_action}">
<div id="tab-content">
- <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
- <div id="general">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="general">
<fieldset>
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'Ticket')"/>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Ticket')"/>
<xsl:text> </xsl:text>
-
<xsl:value-of select="value_id"/>
+ <xsl:value-of
select="value_id"/>
</label>
- <input
type="text" name="values[subject]" value="{value_subject}">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'update subject')"/>
-
</xsl:attribute>
- </input>
+ <input type="text"
name="values[subject]" value="{value_subject}">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'update subject')"/>
+ </xsl:attribute>
+ </input>
</div>
- <xsl:for-each
select="value_origin">
+ <xsl:for-each select="value_origin">
<div class="pure-control-group">
-
<label>
-
<xsl:value-of select="descr"/>
-
</label>
+ <label>
+ <xsl:value-of
select="descr"/>
+ </label>
<div
class="pure-custom">
-
<xsl:for-each select="data">
+ <xsl:for-each
select="data">
<div>
-
<a href="{link}" title="{statustext}">
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
+
<a href="{link}" title="{statustext}">
+
<xsl:value-of select="id"/>
+
</a>
+
<xsl:text> </xsl:text>
</div>
-
</xsl:for-each>
+ </xsl:for-each>
</div>
</div>
- </xsl:for-each>
- <xsl:choose>
+ </xsl:for-each>
+ <xsl:choose>
<xsl:when test="lookup_type
='view2'">
<xsl:call-template
name="location_view2"/>
- </xsl:when>
- <xsl:otherwise>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template
name="location_form2"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="contact_phone !=''">
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="contact_phone
!=''">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Contact phone')"/>
-
</label>
-
<xsl:value-of select="contact_phone"/>
+ <label>
+
<xsl:value-of select="php:function('lang', 'Contact phone')"/>
+ </label>
+ <xsl:value-of
select="contact_phone"/>
</div>
- </xsl:when>
- </xsl:choose>
- <xsl:call-template
name="contact_form"/>
- <xsl:for-each
select="value_target">
+ </xsl:when>
+ </xsl:choose>
+ <xsl:call-template name="contact_form"/>
+ <xsl:for-each select="value_target">
<div class="pure-control-group">
-
<label>
-
<xsl:value-of select="descr"/>
-
</label>
-
<xsl:for-each select="data">
-
<a href="{link}" title="{statustext}">
-
<xsl:value-of select="id"/>
-
</a>
-
<xsl:text> </xsl:text>
-
</xsl:for-each>
+ <label>
+ <xsl:value-of
select="descr"/>
+ </label>
+ <xsl:for-each
select="data">
+ <a
href="{link}" title="{statustext}">
+
<xsl:value-of select="id"/>
+ </a>
+ <xsl:text>
</xsl:text>
+ </xsl:for-each>
</div>
- </xsl:for-each>
+ </xsl:for-each>
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'details')"/>
- </label>
- <xsl:choose>
-
<xsl:when test="additional_notes=''">
-
<xsl:value-of select="php:function('lang', 'no additional
notes')"/>
-
</xsl:when>
-
<xsl:otherwise>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'details')"/>
+ </label>
+ <xsl:choose>
+ <xsl:when
test="additional_notes=''">
+ <xsl:value-of
select="php:function('lang', 'no additional notes')"/>
+ </xsl:when>
+ <xsl:otherwise>
<div class =
'pure-u-md-1-2'>
<xsl:for-each select="datatable_def">
<xsl:if test="container = 'datatable-container_0'">
@@ -380,149 +380,149 @@
</xsl:if>
</xsl:for-each>
</div>
-
</xsl:otherwise>
- </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
</div>
- <xsl:choose>
- <xsl:when
test="simple !='1'">
+ <xsl:choose>
+ <xsl:when test="simple !='1'">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'group')"/>
-
</label>
-
<xsl:call-template name="group_select"/>
+ <label>
+
<xsl:value-of select="php:function('lang', 'group')"/>
+ </label>
+
<xsl:call-template name="group_select"/>
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'assigned to')"/>
-
</label>
-
<xsl:call-template name="user_id_select"/>
+ <label>
+
<xsl:value-of select="php:function('lang', 'assigned to')"/>
+ </label>
+
<xsl:call-template name="user_id_select"/>
</div>
-
<xsl:choose>
-
<xsl:when test="lang_takeover != ''">
+ <xsl:choose>
+ <xsl:when
test="lang_takeover != ''">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="lang_takeover"/>
-
</label>
-
<input type="checkbox" name="values[takeover]"
value="1">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'Take over the assignment for this ticket')"/>
-
</xsl:attribute>
-
</input>
+
<label>
+
<xsl:value-of select="lang_takeover"/>
+
</label>
+
<input type="checkbox" name="values[takeover]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Take over the
assignment for this ticket')"/>
+
</xsl:attribute>
+
</input>
</div>
-
</xsl:when>
-
</xsl:choose>
+ </xsl:when>
+ </xsl:choose>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Send e-mail')"/>
-
</label>
-
<input type="checkbox" name="values[send_mail]" value="1">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'Choose to
send mailnotification')"/>
-
</xsl:attribute>
-
<xsl:if test="pref_send_mail = '1'">
-
<xsl:attribute name="checked">
-
<xsl:text>checked</xsl:text>
-
</xsl:attribute>
-
</xsl:if>
-
</input>
+ <label>
+
<xsl:value-of select="php:function('lang', 'Send e-mail')"/>
+ </label>
+ <input
type="checkbox" name="values[send_mail]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Choose to send mailnotification')"/>
+
</xsl:attribute>
+ <xsl:if
test="pref_send_mail = '1'">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'Priority')"/>
-
</label>
-
<xsl:variable name="lang_priority_statustext">
-
<xsl:value-of select="php:function('lang', 'Select the priority
the selection belongs to')"/>
-
</xsl:variable>
-
<xsl:variable name="select_priority_name">
-
<xsl:value-of select="select_priority_name"/>
-
</xsl:variable>
-
<select name="{$select_priority_name}" class="forms"
title="{$lang_priority_statustext}"
onMouseover="window.status='{$lang_priority_statustext}'; return true;"
onMouseout="window.status='';return true;">
-
<xsl:apply-templates select="priority_list/options"/>
-
</select>
+ <label>
+
<xsl:value-of select="php:function('lang', 'Priority')"/>
+ </label>
+ <xsl:variable
name="lang_priority_statustext">
+
<xsl:value-of select="php:function('lang', 'Select the priority the selection
belongs to')"/>
+ </xsl:variable>
+ <xsl:variable
name="select_priority_name">
+
<xsl:value-of select="select_priority_name"/>
+ </xsl:variable>
+ <select
name="{$select_priority_name}" class="forms"
title="{$lang_priority_statustext}"
onMouseover="window.status='{$lang_priority_statustext}'; return true;"
onMouseout="window.status='';return true;">
+
<xsl:apply-templates select="priority_list/options"/>
+ </select>
</div>
-
<xsl:choose>
-
<xsl:when test="value_order_id=''">
+ <xsl:choose>
+ <xsl:when
test="value_order_id=''">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'status')"/>
-
</label>
-
<select id="status_id" name="values[status]"
class="forms">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'Set the status of the ticket')"/>
-
</xsl:attribute>
-
<xsl:apply-templates
select="status_list/options"/>
-
</select>
+
<label>
+
<xsl:value-of select="php:function('lang', 'status')"/>
+
</label>
+
<select id="status_id" name="values[status]" class="forms">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Set the status of
the ticket')"/>
+
</xsl:attribute>
+
<xsl:apply-templates select="status_list/options"/>
+
</select>
</div>
-
</xsl:when>
-
</xsl:choose>
+ </xsl:when>
+ </xsl:choose>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'category')"/>
-
</label>
-
<xsl:call-template name="categories"/>
+ <label>
+
<xsl:value-of select="php:function('lang', 'category')"/>
+ </label>
+
<xsl:call-template name="categories"/>
</div>
-
<xsl:choose>
-
<xsl:when test="show_finnish_date ='1'">
+ <xsl:choose>
+ <xsl:when
test="show_finnish_date ='1'">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'finnish date')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'finnish date')"/>
+
</label>
-
<input type="text" id="values_finnish_date"
name="values[finnish_date]" size="10" value="{value_finnish_date}"
readonly="readonly" onMouseout="window.status='';return true;">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'select the estimated date for closing the
task')"/>
-
</xsl:attribute>
-
</input>
+
<input type="text" id="values_finnish_date" name="values[finnish_date]"
size="10" value="{value_finnish_date}" readonly="readonly"
onMouseout="window.status='';return true;">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'select the
estimated date for closing the task')"/>
+
</xsl:attribute>
+
</input>
</div>
-
</xsl:when>
-
</xsl:choose>
-
<xsl:choose>
-
<xsl:when test="show_billable_hours ='1'">
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="show_billable_hours ='1'">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'billable hours')"/>
-
</label>
-
<input type="text" id="values_billable_hour"
name="values[billable_hours]" size="10" value="">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'enter the billable hour for the task')"/>
-
</xsl:attribute>
-
</input>
-
<input type="text" id="values_billable_hour_orig"
name="values[billable_hours_orig]" size="10" value="{value_billable_hours}"
readonly="readonly">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'enter the billable hour for the task')"/>
-
</xsl:attribute>
-
</input>
+
<label>
+
<xsl:value-of select="php:function('lang', 'billable hours')"/>
+
</label>
+
<input type="text" id="values_billable_hour" name="values[billable_hours]"
size="10" value="">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'enter the billable
hour for the task')"/>
+
</xsl:attribute>
+
</input>
+
<input type="text" id="values_billable_hour_orig"
name="values[billable_hours_orig]" size="10" value="{value_billable_hours}"
readonly="readonly">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'enter the billable
hour for the task')"/>
+
</xsl:attribute>
+
</input>
</div>
-
</xsl:when>
-
</xsl:choose>
</xsl:when>
- <xsl:otherwise>
- <input
type="hidden" name="values[status]" value="{value_status}"/>
- <input
type="hidden" name="values[assignedto]" value="{value_assignedto_id}"/>
- <input
type="hidden" name="values[group_id]" value="{value_group_id}"/>
- <input
type="hidden" name="values[priority]" value="{value_priority}"/>
- <input
type="hidden" name="values[cat_id]" value="{value_cat_id}"/>
- <input
type="hidden" name="values[finnish_date]" value="{value_finnish_date}"/>
- <input
type="hidden" name="values[billable_hour]" value="{value_billable_hours}"/>
- </xsl:otherwise>
</xsl:choose>
- <xsl:apply-templates
select="custom_attributes/attributes"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input type="hidden"
name="values[status]" value="{value_status}"/>
+ <input type="hidden"
name="values[assignedto]" value="{value_assignedto_id}"/>
+ <input type="hidden"
name="values[group_id]" value="{value_group_id}"/>
+ <input type="hidden"
name="values[priority]" value="{value_priority}"/>
+ <input type="hidden"
name="values[cat_id]" value="{value_cat_id}"/>
+ <input type="hidden"
name="values[finnish_date]" value="{value_finnish_date}"/>
+ <input type="hidden"
name="values[billable_hour]" value="{value_billable_hours}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates
select="custom_attributes/attributes"/>
<div class="pure-control-group">
- <label>
-
<xsl:value-of select="php:function('lang', 'new note')"/>
- </label>
-
<textarea cols="{textareacols}" rows="{textarearows}" name="values[note]">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang', 'add new comments')"/>
-
</xsl:attribute>
-
</textarea>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'new note')"/>
+ </label>
+ <textarea cols="{textareacols}"
rows="{textarearows}" name="values[note]">
+ <xsl:attribute
name="title">
+ <xsl:value-of
select="php:function('lang', 'add new comments')"/>
+ </xsl:attribute>
+ </textarea>
</div>
- <xsl:choose>
- <xsl:when
test="fileupload = 1">
+ <xsl:choose>
+ <xsl:when test="fileupload = 1">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'files')"/>
-
</label>
+ <label>
+
<xsl:value-of select="php:function('lang', 'files')"/>
+ </label>
<div
class="pure-u-md-1-2" >
<xsl:for-each select="datatable_def">
<xsl:if test="container = 'datatable-container_2'">
@@ -538,163 +538,163 @@
</xsl:for-each>
</div>
</div>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="fileupload = 1">
- <script
type="text/javascript">
-
var fileuploader_action = <xsl:value-of select="fileuploader_action"/>;
-
</script>
-
<xsl:call-template name="file_upload"/>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="send_response = 1">
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="fileupload = 1">
+ <script
type="text/javascript">
+ var
fileuploader_action = <xsl:value-of select="fileuploader_action"/>;
+ </script>
+ <xsl:call-template
name="file_upload"/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="send_response =
1">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'notify client by
sms')"/>
-
</label>
-
<input type="checkbox"
name="notify_client_by_sms" value="true">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="value_sms_client_order_notice"/>
-
</xsl:attribute>
-
</input>
-
<input type="text" name="to_sms_phone"
value="{value_sms_phone}">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="value_sms_client_order_notice"/>
-
</xsl:attribute>
-
</input>
+ <label>
+
<xsl:value-of select="php:function('lang', 'notify client by sms')"/>
+ </label>
+ <input
type="checkbox" name="notify_client_by_sms" value="true">
+
<xsl:attribute name="title">
+
<xsl:value-of select="value_sms_client_order_notice"/>
+
</xsl:attribute>
+ </input>
+ <input
type="text" name="to_sms_phone" value="{value_sms_phone}">
+
<xsl:attribute name="title">
+
<xsl:value-of select="value_sms_client_order_notice"/>
+
</xsl:attribute>
+ </input>
</div>
<div
class="pure-control-group">
-
<label>
-
<a href="javascript:response_lookup()">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang',
'response')"/>
-
</xsl:attribute>
-
<xsl:value-of select="php:function('lang',
'response')"/>
-
</a>
-
</label>
-
<textarea cols="{textareacols}" rows="{textarearows}"
id="response_text" name="values[response_text]" onKeyUp="javascript:
SmsCountKeyUp(160);" onKeyDown="javascript: SmsCountKeyDown(160);"
wrap="virtual">
-
<xsl:attribute name="title">
-
<xsl:value-of select="php:function('lang',
'response')"/>
-
</xsl:attribute>
-
</textarea>
+ <label>
+ <a
href="javascript:response_lookup()">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'response')"/>
+
</xsl:attribute>
+
<xsl:value-of select="php:function('lang', 'response')"/>
+ </a>
+ </label>
+ <textarea
cols="{textareacols}" rows="{textarearows}" id="response_text"
name="values[response_text]" onKeyUp="javascript: SmsCountKeyUp(160);"
onKeyDown="javascript: SmsCountKeyDown(160);" wrap="virtual">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'response')"/>
+
</xsl:attribute>
+ </textarea>
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'character left')"/>
-
</label>
-
<input type="text" readonly="readonly" size="3" maxlength="3"
name="charNumberLeftOutput" id="charNumberLeftOutput" value="160">
-
</input>
+ <label>
+
<xsl:value-of select="php:function('lang', 'character left')"/>
+ </label>
+ <input
type="text" readonly="readonly" size="3" maxlength="3"
name="charNumberLeftOutput" id="charNumberLeftOutput" value="160">
+ </input>
</div>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="access_order =
1">
<xsl:choose>
- <xsl:when
test="access_order = 1">
-
<xsl:choose>
-
<xsl:when test="value_order_id=''">
+ <xsl:when
test="value_order_id=''">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'make order')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'make order')"/>
+
</label>
-
<input type="checkbox" name="values[make_order]"
value="True">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'make order')"/>
-
</xsl:attribute>
-
</input>
+
<input type="checkbox" name="values[make_order]" value="True">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'make order')"/>
+
</xsl:attribute>
+
</input>
</div>
-
</xsl:when>
-
</xsl:choose>
-
<xsl:choose>
-
<xsl:when test="value_order_id!=''">
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="value_order_id!=''">
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'order id')"/>
-
</label>
-
<xsl:value-of select="value_order_id"/>
-
<input type="hidden" name="values[order_id]"
value="{value_order_id}"/>
-
<xsl:text> | </xsl:text>
-
<xsl:variable name="lang_preview_html">
-
<xsl:value-of select="php:function('lang',
'preview html')"/>
-
</xsl:variable>
-
<a href="{preview_html}">
-
<xsl:attribute name="title">
-
<xsl:value-of select="$lang_preview_html"/>
-
</xsl:attribute>
-
<xsl:value-of select="$lang_preview_html"/>
-
</a>
-
<xsl:text> | </xsl:text>
-
<xsl:variable name="lang_preview_pdf">
-
<xsl:value-of select="php:function('lang',
'preview pdf')"/>
-
</xsl:variable>
-
<a href="{preview_pdf}">
-
<xsl:attribute name="title">
-
<xsl:value-of select="$lang_preview_pdf"/>
-
</xsl:attribute>
-
<xsl:value-of select="$lang_preview_pdf"/>
-
</a>
+
<label>
+
<xsl:value-of select="php:function('lang', 'order id')"/>
+
</label>
+
<xsl:value-of select="value_order_id"/>
+
<input type="hidden" name="values[order_id]" value="{value_order_id}"/>
+
<xsl:text> | </xsl:text>
+
<xsl:variable name="lang_preview_html">
+
<xsl:value-of select="php:function('lang', 'preview html')"/>
+
</xsl:variable>
+
<a href="{preview_html}">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_preview_html"/>
+
</xsl:attribute>
+
<xsl:value-of select="$lang_preview_html"/>
+
</a>
+
<xsl:text> | </xsl:text>
+
<xsl:variable name="lang_preview_pdf">
+
<xsl:value-of select="php:function('lang', 'preview pdf')"/>
+
</xsl:variable>
+
<a href="{preview_pdf}">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_preview_pdf"/>
+
</xsl:attribute>
+
<xsl:value-of select="$lang_preview_pdf"/>
+
</a>
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang', 'on
behalf of assigned')"/>
-
</label>
-
<input type="checkbox" id = "on_behalf_of_assigned"
name="on_behalf_of_assigned" value="True">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'on behalf of assigned - vacation mode')"/>
-
</xsl:attribute>
-
</input>
+
<label>
+
<xsl:value-of select="php:function('lang', 'on behalf of assigned')"/>
+
</label>
+
<input type="checkbox" id = "on_behalf_of_assigned"
name="on_behalf_of_assigned" value="True">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'on behalf of
assigned - vacation mode')"/>
+
</xsl:attribute>
+
</input>
</div>
-
<xsl:call-template name="vendor_form"/>
-
<xsl:call-template name="ecodimb_form"/>
-
<xsl:call-template name="b_account_form"/>
+
<xsl:call-template name="vendor_form"/>
+
<xsl:call-template name="ecodimb_form"/>
+
<xsl:call-template name="b_account_form"/>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'building part')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'building part')"/>
+
</label>
-
<select name="values[building_part]">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'select building part')"/>
-
</xsl:attribute>
-
<option value="0">
-
<xsl:value-of
select="php:function('lang', 'select building part')"/>
-
</option>
-
<xsl:apply-templates
select="building_part_list/options"/>
-
</select>
+
<select name="values[building_part]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'select building
part')"/>
+
</xsl:attribute>
+
<option value="0">
+
<xsl:value-of select="php:function('lang', 'select building
part')"/>
+
</option>
+
<xsl:apply-templates select="building_part_list/options"/>
+
</select>
</div>
-
<xsl:choose>
-
<xsl:when test="branch_list!=''">
+
<xsl:choose>
+
<xsl:when test="branch_list!=''">
<div class="pure-control-group">
-
<label>
-
<xsl:value-of
select="php:function('lang', 'branch')"/>
-
</label>
-
<select name="values[branch_id]">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'select branch')"/>
-
</xsl:attribute>
-
<option value="0">
-
<xsl:value-of
select="php:function('lang', 'select branch')"/>
-
</option>
-
<xsl:apply-templates
select="branch_list/options"/>
-
</select>
+
<label>
+
<xsl:value-of select="php:function('lang', 'branch')"/>
+
</label>
+
<select name="values[branch_id]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang',
'select branch')"/>
+
</xsl:attribute>
+
<option value="0">
+
<xsl:value-of select="php:function('lang',
'select branch')"/>
+
</option>
+
<xsl:apply-templates select="branch_list/options"/>
+
</select>
</div>
-
</xsl:when>
-
</xsl:choose>
+
</xsl:when>
+
</xsl:choose>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'order_dim1')"/>
-
</label>
-
<select name="values[order_dim1]">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'order_dim1')"/>
-
</xsl:attribute>
-
<option value="0">
-
<xsl:value-of
select="php:function('lang', 'order_dim1')"/>
-
</option>
-
<xsl:apply-templates
select="order_dim1_list/options"/>
-
</select>
+
<label>
+
<xsl:value-of select="php:function('lang', 'order_dim1')"/>
+
</label>
+
<select name="values[order_dim1]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'order_dim1')"/>
+
</xsl:attribute>
+
<option value="0">
+
<xsl:value-of select="php:function('lang', 'order_dim1')"/>
+
</option>
+
<xsl:apply-templates select="order_dim1_list/options"/>
+
</select>
</div>
<div
class="pure-control-group">
<label>
@@ -710,32 +710,32 @@
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'cost estimate')"/>
-
</label>
-
<input type="text" name="values[budget]">
-
<xsl:attribute name="title">
+
<label>
+
<xsl:value-of select="php:function('lang', 'cost estimate')"/>
+
</label>
+
<input type="text" name="values[budget]">
+
<xsl:attribute name="title">
<xsl:value-of select="php:function('lang', 'Enter the
budget')"/>
-
</xsl:attribute>
-
</input>
-
<xsl:text> </xsl:text> [ <xsl:value-of
select="currency"/> ]
+
</xsl:attribute>
+
</input>
+
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
<xsl:variable name="lang_period">
<xsl:value-of select="php:function('lang', 'period')"/>
</xsl:variable>
-
<select name="values[budget_period]">
-
<xsl:attribute name="title">
-
<xsl:value-of select='$lang_period'/>
-
</xsl:attribute>
-
<xsl:apply-templates
select="year_list/options"/>
-
</select>
+
<select name="values[budget_period]">
+
<xsl:attribute name="title">
+
<xsl:value-of select='$lang_period'/>
+
</xsl:attribute>
+
<xsl:apply-templates select="year_list/options"/>
+
</select>
-
<xsl:text> </xsl:text> [ <xsl:value-of
select='$lang_period'/> ]
+
<xsl:text> </xsl:text> [ <xsl:value-of select='$lang_period'/> ]
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'budget')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'budget')"/>
+
</label>
<div class = 'pure-u-md-1-3'>
<!--div id="paging_4"> </div>
@@ -760,32 +760,32 @@
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'payment')"/>
-
</label>
-
<input type="text" name="values[actual_cost]">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'Enter actual cost')"/>
-
</xsl:attribute>
-
</input>
-
<xsl:text> </xsl:text> [ <xsl:value-of
select="currency"/> ]
+
<label>
+
<xsl:value-of select="php:function('lang', 'payment')"/>
+
</label>
+
<input type="text" name="values[actual_cost]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Enter actual
cost')"/>
+
</xsl:attribute>
+
</input>
+
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
<xsl:variable name="lang_period">
<xsl:value-of select="php:function('lang', 'period')"/>
</xsl:variable>
-
<select name="values[actual_cost_period]">
-
<xsl:attribute name="title">
-
<xsl:value-of select='$lang_period'/>
-
</xsl:attribute>
-
<xsl:apply-templates
select="period_list/options"/>
-
</select>
+
<select name="values[actual_cost_period]">
+
<xsl:attribute name="title">
+
<xsl:value-of select='$lang_period'/>
+
</xsl:attribute>
+
<xsl:apply-templates select="period_list/options"/>
+
</select>
-
<xsl:text> </xsl:text> [ <xsl:value-of
select='$lang_period'/> ]
+
<xsl:text> </xsl:text> [ <xsl:value-of select='$lang_period'/> ]
</div>
<div
class="pure-control-group">
-
<label>
-
<xsl:value-of select="php:function('lang',
'actual cost')"/>
-
</label>
+
<label>
+
<xsl:value-of select="php:function('lang', 'actual cost')"/>
+
</label>
<div class = 'pure-u-md-1-3'>
<!--div id="paging_4"> </div>
@@ -806,79 +806,79 @@
</div>
</div>
<div
class="pure-control-group">
-
<label>
-
<a href="javascript:template_lookup()">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'lookup template')"/>
-
</xsl:attribute>
-
<xsl:value-of
select="php:function('lang', 'description')"/>
-
</a>
-
</label>
+
<label>
+
<a href="javascript:template_lookup()">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'lookup
template')"/>
+
</xsl:attribute>
+
<xsl:value-of select="php:function('lang', 'description')"/>
+
</a>
+
</label>
-
<textarea cols="{textareacols}" rows="{textarearows}"
id="order_descr" name="values[order_descr]" wrap="virtual">
-
<xsl:attribute name="title">
-
<xsl:value-of
select="php:function('lang', 'description order')"/>
-
</xsl:attribute>
-
<xsl:value-of select="value_order_descr"/>
-
</textarea>
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14759] more fixes,
Sigurd Nes <=