[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13015] more on logistic
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13015] more on logistic |
Date: |
Wed, 15 Apr 2015 13:39:19 +0000 |
Revision: 13015
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13015
Author: sigurdne
Date: 2015-04-15 13:39:18 +0000 (Wed, 15 Apr 2015)
Log Message:
-----------
more on logistic
Modified Paths:
--------------
branches/dev-syncromind/logistic/inc/class.uiactivity.inc.php
branches/dev-syncromind/logistic/inc/class.uiproject.inc.php
branches/dev-syncromind/logistic/inc/class.uirequirement.inc.php
branches/dev-syncromind/logistic/inc/class.uirequirement_resource_allocation.inc.php
branches/dev-syncromind/logistic/inc/class.uiresource_type_requirement.inc.php
branches/dev-syncromind/logistic/js/logistic/activity.js
branches/dev-syncromind/logistic/js/logistic/requirement_overview.js
branches/dev-syncromind/logistic/js/logistic/resource_allocation.js
branches/dev-syncromind/logistic/templates/base/activity/add_activity_item.xsl
branches/dev-syncromind/logistic/templates/base/project/project_type_item.xsl
Modified: branches/dev-syncromind/logistic/inc/class.uiactivity.inc.php
===================================================================
--- branches/dev-syncromind/logistic/inc/class.uiactivity.inc.php
2015-04-15 13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/inc/class.uiactivity.inc.php
2015-04-15 13:39:18 UTC (rev 13015)
@@ -6,7 +6,7 @@
* @author Erik Holm-Larsen <address@hidden>
* @author Torstein Vadla <address@hidden>
* @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @copyright Copyright (C) 2011,2012,2013,2014,2015 Free Software
Foundation, Inc. http://www.fsf.org/
* This file is part of phpGroupWare.
*
* phpGroupWare is free software; you can redistribute it and/or modify
@@ -118,6 +118,7 @@
),
'datatable' => array(
'source' =>
self::link(array('menuaction' => 'logistic.uiactivity.index', 'phpgw_return_as'
=> 'json', 'filter' => phpgw::get_var('filter', 'int'))),
+ 'allrows' => true,
'field' => array(
array(
'key' => 'id',
@@ -303,7 +304,7 @@
case 'children':
$activity_id =
phpgw::get_var('activity_id');
$filters = array('id' => $activity_id);
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count = $this->so->get_count();
array_shift($result_objects);
if($result_objects)
@@ -314,13 +315,13 @@
case 'activity_id':
$activity_id =
phpgw::get_var('activity_id');
$filters = array('id' => $activity_id);
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
default: // ... all activities, filters (active
and vacant)
phpgwapi_cache::session_set('logistic',
'activity_query', $search_for);
$filters = array('project' =>
phpgw::get_var('project'), 'user' => phpgw::get_var('user'), 'activity' =>
phpgw::get_var('filter', 'int'));
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->total_records;
break;
}
@@ -496,10 +497,7 @@
$GLOBALS['phpgw']->jqcal->add_listener('end_date',
'datetime');
self::add_javascript('logistic', 'logistic',
'activity.js');
- self::add_javascript('phpgwapi', 'yui3',
'yui/yui-min.js');
- self::add_javascript('phpgwapi', 'yui3-gallery',
'gallery-formvalidator/gallery-formvalidator-min.js');
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yui3-gallery/gallery-formvalidator/validatorCss.css');
-//_debug_array($data);die();
+
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security',
'file'),'activity_form');
self::render_template_xsl('activity/add_activity_item',
$data);
}
Modified: branches/dev-syncromind/logistic/inc/class.uiproject.inc.php
===================================================================
--- branches/dev-syncromind/logistic/inc/class.uiproject.inc.php
2015-04-15 13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/inc/class.uiproject.inc.php
2015-04-15 13:39:18 UTC (rev 13015)
@@ -3,7 +3,8 @@
* phpGroupWare - logistic: a part of a Facilities Management System.
*
* @author Erik Holm-Larsen <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2011,2012,2013,2014,2015 Free Software
Foundation, Inc. http://www.fsf.org/
* This file is part of phpGroupWare.
*
* phpGroupWare is free software; you can redistribute it and/or modify
@@ -121,13 +122,13 @@
case 'project_type':
phpgwapi_cache::session_set('logistic',
'project_type_query', $search_for);
$search_type = 'project_type';
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
default: // ... all composites, filters (active
and vacant)
phpgwapi_cache::session_set('logistic',
'project_query', $search_for);
$filters =
array('project_type' => phpgw::get_var('project_type'));
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
}
Modified: branches/dev-syncromind/logistic/inc/class.uirequirement.inc.php
===================================================================
--- branches/dev-syncromind/logistic/inc/class.uirequirement.inc.php
2015-04-15 13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/inc/class.uirequirement.inc.php
2015-04-15 13:39:18 UTC (rev 13015)
@@ -4,7 +4,8 @@
* phpGroupWare - logistic: a part of a Facilities Management System.
*
* @author Erik Holm-Larsen <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2011,2012,2013,2014,2015 Free Software
Foundation, Inc. http://www.fsf.org/
* This file is part of phpGroupWare.
*
* phpGroupWare is free software; you can redistribute it and/or modify
@@ -169,7 +170,7 @@
default: // ... all composites, filters (active
and vacant)
phpgwapi_cache::session_set('logistic',
'requirement_query', $search_for);
$filters = array('activity' =>
$activity_id);
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
}
Modified:
branches/dev-syncromind/logistic/inc/class.uirequirement_resource_allocation.inc.php
===================================================================
---
branches/dev-syncromind/logistic/inc/class.uirequirement_resource_allocation.inc.php
2015-04-15 13:29:27 UTC (rev 13014)
+++
branches/dev-syncromind/logistic/inc/class.uirequirement_resource_allocation.inc.php
2015-04-15 13:39:18 UTC (rev 13015)
@@ -4,7 +4,8 @@
* phpGroupWare - logistic: a part of a Facilities Management System.
*
* @author Erik Holm-Larsen <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2011,2012,2013,2014,2015 Free Software
Foundation, Inc. http://www.fsf.org/
* This file is part of phpGroupWare.
*
* phpGroupWare is free software; you can redistribute it and/or modify
@@ -221,11 +222,11 @@
case 'requirement_id':
$requirement_id =
phpgw::get_var('requirement_id');
$filters = array('requirement_id' =>
$requirement_id);
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
default: // ... all composites, filters (active
and vacant)
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
}
Modified:
branches/dev-syncromind/logistic/inc/class.uiresource_type_requirement.inc.php
===================================================================
---
branches/dev-syncromind/logistic/inc/class.uiresource_type_requirement.inc.php
2015-04-15 13:29:27 UTC (rev 13014)
+++
branches/dev-syncromind/logistic/inc/class.uiresource_type_requirement.inc.php
2015-04-15 13:39:18 UTC (rev 13015)
@@ -4,7 +4,8 @@
* phpGroupWare - logistic: a part of a Facilities Management System.
*
* @author Erik Holm-Larsen <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2011,2012,2013,2014,2015 Free Software
Foundation, Inc. http://www.fsf.org/
* This file is part of phpGroupWare.
*
* phpGroupWare is free software; you can redistribute it and/or modify
@@ -132,11 +133,11 @@
case 'resource_type_requirement_list':
$search_type =
'resource_type_requirement_list';
$sort_field =
'type_requirement.location_id';
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
default: // ... all composites, filters (active
and vacant)
- $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters);
+ $result_objects =
$this->so->get($start_index, $num_of_objects, $sort_field, $sort_ascending,
$search_for, $search_type, $filters, $params['allrows']);
$object_count =
$this->so->get_count($search_for, $search_type, $filters);
break;
}
@@ -177,10 +178,6 @@
return $this->query();
}
- self::add_javascript('phpgwapi', 'yahoo',
'datatable.js');
- phpgwapi_yui::load_widget('datatable');
- phpgwapi_yui::load_widget('paginator');
-
$entity_list =
execMethod('property.soadmin_entity.read', array('allrows' => true));
array_unshift($entity_list,array ('id'=>'','name'=>
lang('select value')));
$data = array(
Modified: branches/dev-syncromind/logistic/js/logistic/activity.js
===================================================================
--- branches/dev-syncromind/logistic/js/logistic/activity.js 2015-04-15
13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/js/logistic/activity.js 2015-04-15
13:39:18 UTC (rev 13015)
@@ -10,7 +10,7 @@
var thisForm = $(this).closest("form");
$(thisForm).find("input[name=project_id]").val(project_id);
});
-
+/*
$("#activity_details input").focus(function(e){
var wrpElem = $(this).parents("dd");
$(wrpElem).find(".help_text").fadeIn(200);
@@ -39,43 +39,5 @@
$("#activity_details select").focusout(function(e){
var wrpElem = $(this).parents("dd");
$(wrpElem).find(".help_text").fadeOut();
- });
+ });*/
});
-
-
-var arURLParts = strBaseURL.split('?');
-var comboBase = arURLParts[0] + 'phpgwapi/inc/yui-combo-master/combo.php?';
-
-YUI_config = {
- //Don't combine the files
- combine: true,
- //Ignore things that are already loaded (in this process)
- ignoreRegistered: false,
- //Set the base path
- comboBase: comboBase,
- base: '',
- //And the root
- root: '',
- //Require your deps
- require: [ ]
-};
-
-
-YUI({
-}).use(
- 'gallery-formvalidator',
- function(Y) {
- Y.on("domready", function () {
- var form = new Y.Validator(
- {
- form:'activity_form',
- defaultIncorrectIndicatorCss:'validator',
- defaultCorrectIndicatorCss:'indicator',
- createCorrectIndicator:true,
- createIncorrectIndicator:true
- }
- );
-
- });
-
-});
Modified: branches/dev-syncromind/logistic/js/logistic/requirement_overview.js
===================================================================
--- branches/dev-syncromind/logistic/js/logistic/requirement_overview.js
2015-04-15 13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/js/logistic/requirement_overview.js
2015-04-15 13:39:18 UTC (rev 13015)
@@ -82,16 +82,11 @@
}
}
-//console.log(assign_requirement);
+ assign_requirement =
encodeURI(JSON.stringify(assign_requirement));
- assign_requirement =
encodeURI(YAHOO.lang.JSON.stringify(assign_requirement));
-
-//alert(assign_requirement);
-
- var oArgs = {menuaction: 'logistic.uirequirement.assign_job',
id:id, assign_requirement: assign_requirement};
+ var oArgs = {menuaction: 'logistic.uirequirement.assign_job',
id:id, assign_requirement: assign_requirement, nonavbar: true};
var requestUrl = phpGWLink('index.php', oArgs);
-
TINY.box.show({iframe:requestUrl,
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
mask:true, animate:true, close:
true,closejs:function(){closeJS_local_allocation(id)}});
}
Modified: branches/dev-syncromind/logistic/js/logistic/resource_allocation.js
===================================================================
--- branches/dev-syncromind/logistic/js/logistic/resource_allocation.js
2015-04-15 13:29:27 UTC (rev 13014)
+++ branches/dev-syncromind/logistic/js/logistic/resource_allocation.js
2015-04-15 13:39:18 UTC (rev 13015)
@@ -1,37 +1,9 @@
$(document).ready(function(){
- $("#requirement-container").on("click", function(e){
+ $("#requirement-container tr").on("click", function(e){
var requirement_id = $('td', this).eq(0).text();
updateAllocationTable( requirement_id );
});
-/*
- $("#allocation-container table .btn-sm.delete").on("click", function(e){
- var thisRow = $(this).parents("tr");
-
- var requestUrl = $(this).attr("href");
- alert(requestUrl);
-
- $.ajax({
- type: 'POST',
- url: requestUrl,
- success: function(data) {
- var obj = jQuery.parseJSON(data);
-
- if(obj.status == "deleted"){
- $(thisRow).remove();
-
YAHOO.portico.updateinlineTableHelper('requirement-container');
- }
- },
- error: function(XMLHttpRequest, textStatus,
errorThrown) {
- if (XMLHttpRequest.status === 401) {
- location.href = '/';
- }
- }
- });
-
- return false;
- });
- */
});
function updateAllocationTable(requirement_id)
Modified:
branches/dev-syncromind/logistic/templates/base/activity/add_activity_item.xsl
===================================================================
---
branches/dev-syncromind/logistic/templates/base/activity/add_activity_item.xsl
2015-04-15 13:29:27 UTC (rev 13014)
+++
branches/dev-syncromind/logistic/templates/base/activity/add_activity_item.xsl
2015-04-15 13:39:18 UTC (rev 13015)
@@ -1,267 +1,356 @@
-<xsl:template match="data" xmlns:php="http://php.net/xsl"
xmlns:formvalidator="http://www.w3.org/TR/html4/">
-<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')"/></xsl:variable>
-<xsl:variable name="datetime_format"><xsl:value-of
select="$date_format"/><xsl:text> H:i</xsl:text></xsl:variable>
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')"/>
+ </xsl:variable>
+ <xsl:variable name="datetime_format">
+ <xsl:value-of select="$date_format"/>
+ <xsl:text> H:i</xsl:text>
+ </xsl:variable>
-<div>
+ <div>
- <xsl:choose>
- <xsl:when test="project/id != '' or project/id != 0">
- <h1>
- <xsl:value-of select="php:function('lang', 'Add
activity to project')" />
- <span style="margin-left:5px;"><xsl:value-of
select="project/name" /></span>
- </h1>
- </xsl:when>
- <xsl:when test="activity/id != '' and activity/id != 0">
- <h1>
- <xsl:value-of select="php:function('lang',
'Edit activity')" />
- </h1>
- </xsl:when>
- <xsl:otherwise>
- <h1>
- <xsl:value-of select="php:function('lang', 'Add
activity')" />
- </h1>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="project/id != '' or project/id != 0">
+ <h1>
+ <xsl:value-of
select="php:function('lang', 'Add activity to project')" />
+ <span style="margin-left:5px;">
+ <xsl:value-of
select="project/name" />
+ </span>
+ </h1>
+ </xsl:when>
+ <xsl:when test="activity/id != '' and activity/id != 0">
+ <h1>
+ <xsl:value-of
select="php:function('lang', 'Edit activity')" />
+ </h1>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1>
+ <xsl:value-of
select="php:function('lang', 'Add activity')" />
+ </h1>
+ </xsl:otherwise>
+ </xsl:choose>
- <xsl:choose>
- <xsl:when test="breadcrumb != ''">
- <xsl:call-template name="breadcrumb" />
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="breadcrumb != ''">
+ <xsl:call-template name="breadcrumb" />
+ </xsl:when>
+ </xsl:choose>
- <div id="activity_details" class="content-wrp">
- <div id="details">
- <xsl:variable name="action_url">
- <xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:logistic.uiactivity.save')" />
- </xsl:variable>
- <xsl:variable name="parent_id"><xsl:value-of
select="parent_activity/id"/></xsl:variable>
- <form id='activity_form' action="{$action_url}"
method="post">
- <input type="hidden" name="id" value =
"{activity/id}" />
- <input type="hidden" name="project_id"
value="{activity/project_id}" />
- <input type="hidden" name="parent_id"
value="{parent_activity/id}" />
+ <div id="activity_details" class="content-wrp">
+ <div id="details">
+ <xsl:variable name="action_url">
+ <xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:logistic.uiactivity.save')" />
+ </xsl:variable>
+ <xsl:variable name="parent_id">
+ <xsl:value-of
select="parent_activity/id"/>
+ </xsl:variable>
+ <form id='activity_form' action="{$action_url}"
method="post">
+ <input type="hidden" name="id" value =
"{activity/id}" />
+ <input type="hidden" name="project_id"
value="{activity/project_id}" />
+ <input type="hidden" name="parent_id"
value="{parent_activity/id}" />
- <dl class="proplist-col">
+ <dl class="proplist-col">
- <xsl:choose>
- <xsl:when test="(editable) and
(activities !='')">
- <dt>
+ <xsl:choose>
+ <xsl:when
test="(editable) and (activities !='')">
+ <dt>
<div
style="margin-bottom: 1em;">
-
<label style="display:block;"><xsl:value-of select="php:function('lang',
'Choose another main activity for this sub activity')" /></label>
+
<label style="display:block;">
+
<xsl:value-of select="php:function('lang', 'Choose another main
activity for this sub activity')" />
+
</label>
<select id="select_parent_activity" name="parent_activity_id">
<option value="0">Velg annen hovedaktivitet</option>
<xsl:for-each select="activities">
- <option
value="{id}">
-
<xsl:if test="id = $parent_id">
-
<xsl:attribute name="selected">
-
<xsl:text>selected</xsl:text>
-
</xsl:attribute>
-
</xsl:if>
-
<xsl:value-of disable-output-escaping="yes" select="name"/>
-
</option>
-
</xsl:for-each>
+
<option value="{id}">
+
<xsl:if test="id = $parent_id">
+
<xsl:attribute name="selected">
+
<xsl:text>selected</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+
<xsl:value-of disable-output-escaping="yes"
select="name"/>
+
</option>
+
</xsl:for-each>
</select>
</div>
</dt>
- </xsl:when>
- <!-- <xsl:when
test="(editable) and not(parent_activity) and not(project)">
- <dt>
- <div
style="margin-bottom: 1em;">
-
<label style="display:block;"><xsl:value-of select="php:function('lang',
'Choose the project in which the activity is part of')" /></label>
-
<select id="select_project" name="select_project">
-
<option><xsl:value-of select="php:function('lang', 'Choose project')"
/></option>
-
<xsl:for-each select="projects">
- <option
value="{id}">
-
<xsl:if test="project/id = project_id">
-
<xsl:attribute name="selected">
-
selected
-
</xsl:attribute>
-
</xsl:if>
-
<xsl:value-of disable-output-escaping="yes" select="name"/>
-
</option>
-
</xsl:for-each>
-
</select>
- </div>
- </dt>
- </xsl:when>-->
+ </xsl:when>
+ <!-- <xsl:when
test="(editable) and not(parent_activity) and not(project)">
+ <dt>
+ <div
style="margin-bottom: 1em;">
+
<label style="display:block;"><xsl:value-of select="php:function('lang',
'Choose the project in which the activity is part of')" /></label>
+
<select id="select_project" name="select_project">
+
<option><xsl:value-of select="php:function('lang', 'Choose project')"
/></option>
+
<xsl:for-each select="projects">
+
<option value="{id}">
+
<xsl:if test="project/id = project_id">
+
<xsl:attribute name="selected">
+
selected
+
</xsl:attribute>
+
</xsl:if>
+
<xsl:value-of disable-output-escaping="yes" select="name"/>
+
</option>
+
</xsl:for-each>
+
</select>
+ </div>
+ </dt>
+ </xsl:when>-->
</xsl:choose>
<xsl:choose>
<xsl:when
test="projects != ''">
<dt>
<div
style="margin-bottom: 1em;">
-
<label style="display:block;"><xsl:value-of select="php:function('lang',
'Choose another project for the activity')" /></label>
-
<select id="select_project" name="select_project"
-
formvalidator:FormField="yes"
-
formvalidator:Type="SelectField">
-
<option value=''><xsl:value-of select="php:function('lang', 'Choose
another project')" /></option>
-
<xsl:for-each select="projects">
-
<option value="{id}">
-
<xsl:if test="project/id = project_id">
-
<xsl:attribute name="selected">
-
selected
-
</xsl:attribute>
-
</xsl:if>
-
<xsl:value-of disable-output-escaping="yes"
select="name"/>
-
</option>
-
</xsl:for-each>
+
<label style="display:block;">
+
<xsl:value-of select="php:function('lang', 'Choose another project for
the activity')" />
+
</label>
+
<select id="select_project" name="select_project">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<option value=''>
+
<xsl:value-of select="php:function('lang', 'Choose another
project')" />
+
</option>
+
<xsl:for-each select="projects">
+
<option value="{id}">
+
<xsl:if test="project/id = project_id">
+
<xsl:attribute name="selected">
+
selected
+
</xsl:attribute>
+
</xsl:if>
+
<xsl:value-of disable-output-escaping="yes"
select="name"/>
+
</option>
+
</xsl:for-each>
</select>
</div>
</dt>
- </xsl:when>
- </xsl:choose>
- <dt>
- <label for="name"><xsl:value-of
select="php:function('lang','Activity name')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:if
test="activity/error_msg_array/name != ''">
- <xsl:variable
name="error_msg"><xsl:value-of select="activity/error_msg_array/name"
/></xsl:variable>
- <div
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)"
/></div>
- </xsl:if>
- <div
class="help_text"><xsl:value-of select="php:function('lang','Give name to this
activity')" /></div>
- <input type="text"
name="name" id="name" value="{activity/name}" size="100"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="activity/name" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="description"><xsl:value-of select="php:function('lang', 'Description')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:if
test="activity/error_msg_array/description != ''">
- <xsl:variable
name="error_msg"><xsl:value-of select="activity/error_msg_array/description"
/></xsl:variable>
- <div
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)"
/></div>
- </xsl:if>
- <div
class="help_text"><xsl:value-of select="php:function('lang','Give description
to activity')" /></div>
- <textarea
id="description" name="description" rows="5" cols="60"><xsl:value-of
select="activity/description" disable-output-escaping="yes"/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="activity/description" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="start_date"><xsl:value-of select="php:function('lang','Start date')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when
test="editable">
- <xsl:if
test="activity/error_msg_array/start_date != ''">
-
<xsl:variable name="error_msg"><xsl:value-of
select="activity/error_msg_array/start_date" /></xsl:variable>
- <div
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)"
/></div>
- </xsl:if>
- <div
class="help_text"><xsl:value-of select="php:function('lang','Give start date to
activity')" /></div>
- <input
class="datetime" id="start_date" name="start_date" type="text">
- <xsl:if
test="activity/start_date != ''">
- <xsl:attribute
name="value"><xsl:value-of select="php:function('date', $datetime_format,
number(activity/start_date))"/></xsl:attribute>
- </xsl:if>
- </input>
</xsl:when>
- <xsl:otherwise>
- <span><xsl:value-of
select="php:function('date', $datetime_format,
number(activity/start_date))"/></span>
- </xsl:otherwise>
</xsl:choose>
- </dd>
- <dt>
- <label
for="end_date"><xsl:value-of select="php:function('lang','End date')" /></label>
- </dt>
- <dd>
+ <dt>
+ <label for="name">
+ <xsl:value-of
select="php:function('lang','Activity name')" />
+ </label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <xsl:if
test="activity/error_msg_array/name != ''">
+
<xsl:variable name="error_msg">
+
<xsl:value-of select="activity/error_msg_array/name" />
+
</xsl:variable>
+
<div class='input_error_msg'>
+
<xsl:value-of select="php:function('lang', $error_msg)" />
+
</div>
+
</xsl:if>
+ <div
class="help_text">
+
<xsl:value-of select="php:function('lang','Give name to this activity')" />
+ </div>
+ <input
type="text" name="name" id="name" value="{activity/name}" size="100">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+ </input>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:value-of select="activity/name" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="description">
+ <xsl:value-of
select="php:function('lang', 'Description')" />
+ </label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <xsl:if
test="activity/error_msg_array/description != ''">
+
<xsl:variable name="error_msg">
+
<xsl:value-of select="activity/error_msg_array/description" />
+
</xsl:variable>
+
<div class='input_error_msg'>
+
<xsl:value-of select="php:function('lang', $error_msg)" />
+
</div>
+
</xsl:if>
+ <div
class="help_text">
+
<xsl:value-of select="php:function('lang','Give description to activity')" />
+ </div>
+
<textarea id="description" name="description" rows="5" cols="60">
+
<xsl:value-of select="activity/description" disable-output-escaping="yes"/>
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
</textarea>
+ </xsl:when>
+ <xsl:otherwise>
+
<xsl:value-of select="activity/description" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label for="start_date">
+ <xsl:value-of
select="php:function('lang','Start date')" />
+ </label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <xsl:if
test="activity/error_msg_array/start_date != ''">
+
<xsl:variable name="error_msg">
+
<xsl:value-of select="activity/error_msg_array/start_date" />
+
</xsl:variable>
+
<div class='input_error_msg'>
+
<xsl:value-of select="php:function('lang', $error_msg)" />
+
</div>
+
</xsl:if>
+ <div
class="help_text">
+
<xsl:value-of select="php:function('lang','Give start date to activity')" />
+ </div>
+ <input
class="datetime" id="start_date" name="start_date" type="text">
+
<xsl:if test="activity/start_date != ''">
+
<xsl:attribute name="value">
+
<xsl:value-of select="php:function('date', $datetime_format,
number(activity/start_date))"/>
+
</xsl:attribute>
+
</xsl:if>
+
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+ </input>
+ </xsl:when>
+ <xsl:otherwise>
+ <span>
+
<xsl:value-of select="php:function('date', $datetime_format,
number(activity/start_date))"/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label for="end_date">
+ <xsl:value-of
select="php:function('lang','End date')" />
+ </label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <xsl:if
test="activity/error_msg_array/end_date != ''">
+
<xsl:variable name="error_msg">
+
<xsl:value-of select="activity/error_msg_array/end_date" />
+
</xsl:variable>
+
<div class='input_error_msg'>
+
<xsl:value-of select="php:function('lang', $error_msg)" />
+
</div>
+
</xsl:if>
+ <div
class="help_text">
+
<xsl:value-of select="php:function('lang','Give end date to activity')" />
+ </div>
+ <input
class="datetime" id="end_date" name="end_date" type="text">
+
<xsl:if test="activity/end_date != ''">
+
<xsl:attribute name="value">
+
<xsl:value-of select="php:function('date', $datetime_format,
number(activity/end_date))"/>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
+ </xsl:when>
+ <xsl:otherwise>
+ <span>
+
<xsl:value-of select="php:function('date', $datetime_format,
number(activity/end_date))"/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label for="end_date">
+ <xsl:value-of
select="php:function('lang', 'Responsible person')" />
+ </label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <xsl:if
test="activity/error_msg_array/responsible_user_id != ''">
+
<xsl:variable name="error_msg">
+
<xsl:value-of select="activity/error_msg_array/responsible_user_id" />
+
</xsl:variable>
+
<div class='input_error_msg'>
+
<xsl:value-of select="php:function('lang', $error_msg)" />
+
</div>
+
</xsl:if>
+ <div
class="help_text">
+
<xsl:value-of select="php:function('lang', 'Responsible person for activity')"
/>
+ </div>
+ <select
name="responsible_user_id">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<option value="">Velg ansvarlig bruker</option>
+
<xsl:for-each select="responsible_users">
+
<xsl:variable name="full_name">
+
<xsl:value-of disable-output-escaping="yes"
select="account_firstname"/>
+
<xsl:text> </xsl:text>
+
<xsl:value-of disable-output-escaping="yes"
select="account_lastname"/>
+
</xsl:variable>
+
<xsl:choose>
+
<xsl:when test="//activity/responsible_user_id = account_id">
+
<option selected="selected" value="{account_id}">
+
<xsl:value-of disable-output-escaping="yes"
select="$full_name"/>
+
</option>
+
</xsl:when>
+
<xsl:otherwise>
+
<option value="{account_id}">
+
<xsl:value-of disable-output-escaping="yes"
select="$full_name"/>
+
</option>
+
</xsl:otherwise>
+
</xsl:choose>
+
</xsl:for-each>
+
</select>
+ </xsl:when>
+ <xsl:otherwise>
+ <span>
+
<xsl:value-of select="activity/responsible_user_name"/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ </dl>
+
+ <div class="form-buttons">
<xsl:choose>
<xsl:when
test="editable">
- <xsl:if
test="activity/error_msg_array/end_date != ''">
-
<xsl:variable name="error_msg"><xsl:value-of
select="activity/error_msg_array/end_date" /></xsl:variable>
- <div
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)"
/></div>
- </xsl:if>
- <div
class="help_text"><xsl:value-of select="php:function('lang','Give end date to
activity')" /></div>
- <input
class="datetime" id="end_date" name="end_date" type="text">
- <xsl:if
test="activity/end_date != ''">
- <xsl:attribute
name="value"><xsl:value-of select="php:function('date', $datetime_format,
number(activity/end_date))"/></xsl:attribute>
- </xsl:if>
- </input>
+ <xsl:variable
name="lang_save">
+
<xsl:value-of select="php:function('lang', 'save')" />
+ </xsl:variable>
+ <xsl:variable
name="lang_cancel">
+
<xsl:value-of select="php:function('lang', 'cancel')" />
+ </xsl:variable>
+ <input
type="submit" name="save_activity" value="{$lang_save}" title = "{$lang_save}"
/>
+ <input
class="submit" type="button" name="cancel_activity" id ='cancel_activity'
value="{$lang_cancel}" title = "{$lang_cancel}"
onClick="document.cancel_form.submit();"/>
</xsl:when>
<xsl:otherwise>
- <span><xsl:value-of
select="php:function('date', $datetime_format,
number(activity/end_date))"/></span>
+ <xsl:variable
name="params">
+
<xsl:text>menuaction:logistic.uiactivity.edit, id:</xsl:text>
+
<xsl:value-of select="activity/id" />
+ </xsl:variable>
+ <xsl:variable
name="edit_url">
+
<xsl:value-of select="php:function('get_phpgw_link', '/index.php', $params )" />
+ </xsl:variable>
+ <a class="btn"
href="{$edit_url}">
+
<xsl:value-of select="php:function('lang', 'edit')" />
+ </a>
</xsl:otherwise>
</xsl:choose>
- </dd>
- <dt>
- <label
for="end_date"><xsl:value-of select="php:function('lang', 'Responsible
person')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when
test="editable">
- <xsl:if
test="activity/error_msg_array/responsible_user_id != ''">
-
<xsl:variable name="error_msg"><xsl:value-of
select="activity/error_msg_array/responsible_user_id" /></xsl:variable>
- <div
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)"
/></div>
- </xsl:if>
- <div
class="help_text"><xsl:value-of select="php:function('lang', 'Responsible
person for activity')" /></div>
- <select
name="responsible_user_id">
- <option
value="">Velg ansvarlig bruker</option>
- <xsl:for-each
select="responsible_users">
- <xsl:variable
name="full_name">
- <xsl:value-of
disable-output-escaping="yes" select="account_firstname"/><xsl:text> </xsl:text>
- <xsl:value-of
disable-output-escaping="yes" select="account_lastname"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when
test="//activity/responsible_user_id = account_id">
-
<option selected="selected" value="{account_id}">
-
<xsl:value-of disable-output-escaping="yes" select="$full_name"/>
-
</option>
- </xsl:when>
- <xsl:otherwise>
- <option
value="{account_id}">
-
<xsl:value-of disable-output-escaping="yes" select="$full_name"/>
-
</option>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </select>
- </xsl:when>
- <xsl:otherwise>
- <span><xsl:value-of
select="activity/responsible_user_name"/></span>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- </dl>
-
- <div class="form-buttons">
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:variable
name="lang_save"><xsl:value-of select="php:function('lang', 'save')"
/></xsl:variable>
- <xsl:variable
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')"
/></xsl:variable>
- <input type="submit"
name="save_activity" value="{$lang_save}" title = "{$lang_save}" />
- <input class="submit"
type="button" name="cancel_activity" id ='cancel_activity'
value="{$lang_cancel}" title = "{$lang_cancel}"
onClick="document.cancel_form.submit();"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="params">
-
<xsl:text>menuaction:logistic.uiactivity.edit, id:</xsl:text>
- <xsl:value-of
select="activity/id" />
- </xsl:variable>
- <xsl:variable
name="edit_url">
- <xsl:value-of
select="php:function('get_phpgw_link', '/index.php', $params )" />
- </xsl:variable>
- <a class="btn"
href="{$edit_url}"><xsl:value-of select="php:function('lang', 'edit')" /></a>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </form>
+ </div>
+ </form>
+ </div>
</div>
</div>
-</div>
-<xsl:variable name="cancel_url">
-<xsl:value-of select="php:function('get_phpgw_link', '/index.php',
'menuaction:logistic.uiactivity.index')" />
-</xsl:variable>
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="php:function('get_phpgw_link',
'/index.php', 'menuaction:logistic.uiactivity.index')" />
+ </xsl:variable>
-<form name="cancel_form" id="cancel_form" action="{$cancel_url}" method="post">
-</form>
+ <form name="cancel_form" id="cancel_form" action="{$cancel_url}"
method="post">
+ </form>
-<xsl:call-template name="jquery_phpgw_i18n"/>
+ <xsl:call-template name="jquery_phpgw_i18n"/>
</xsl:template>
@@ -276,7 +365,7 @@
<!-- =========== BREADCRUMB TEMPLATE ============== -->
<xsl:template name="breadcrumb">
- <div id="breadcrumb">
+ <div id="breadcrumb">
<span class="intro">Du er her:</span>
<xsl:for-each select="breadcrumb">
<xsl:choose>
@@ -292,8 +381,8 @@
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not( position() = last() )">
- <img src="logistic/images/arrow_right.png" />
- </xsl:if>
- </xsl:for-each>
+ <img src="logistic/images/arrow_right.png" />
+ </xsl:if>
+ </xsl:for-each>
</div>
</xsl:template>
Modified:
branches/dev-syncromind/logistic/templates/base/project/project_type_item.xsl
===================================================================
---
branches/dev-syncromind/logistic/templates/base/project/project_type_item.xsl
2015-04-15 13:29:27 UTC (rev 13014)
+++
branches/dev-syncromind/logistic/templates/base/project/project_type_item.xsl
2015-04-15 13:39:18 UTC (rev 13015)
@@ -3,7 +3,7 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<div id="main_content" class="yui-content">
+<div id="main_content">
<h1>Prosjekttype</h1>
<div style="padding:20px;" class="content-wrp">
<form action="#" method="post">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13015] more on logistic,
Sigurd Nes <=