[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10073] Logistic: Added option for selecting responsi
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10073] Logistic: Added option for selecting responsible user |
Date: |
Mon, 01 Oct 2012 14:16:27 +0000 |
Revision: 10073
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10073
Author: vator
Date: 2012-10-01 14:16:27 +0000 (Mon, 01 Oct 2012)
Log Message:
-----------
Logistic: Added option for selecting responsible user
Modified Paths:
--------------
trunk/logistic/inc/class.uiactivity.inc.php
trunk/logistic/templates/base/activity_item.xsl
Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2012-10-01 13:08:28 UTC (rev
10072)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2012-10-01 14:16:27 UTC (rev
10073)
@@ -275,9 +275,10 @@
if (isset($_POST['save_activity']))
{
$user_id = $GLOBALS['phpgw_info']['user']['id'];
- $activity->set_id(phpgw::get_var('id'));
- $activity->set_name(phpgw::get_var('name'));
- $activity->set_update_user($user_id);
+ $activity->set_id( phpgw::get_var('id') );
+ $activity->set_name( phpgw::get_var('name') );
+ $activity->set_update_user( $user_id );
+ $activity->set_responsible_user_id(
phpgw::get_var('responsible_user_id') );
if(phpgw::get_var('start_date','string') != '')
{
@@ -309,8 +310,13 @@
}
else
{
+
+ $accounts =
$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_READ, 'run', 'logistic');
+
+
$data = array
(
+ 'user_array' => $accounts,
'activity' => $activity->toArray(),
'img_go_home' =>
'rental/templates/base/images/32x32/actions/go-home.png',
'editable' => true,
Modified: trunk/logistic/templates/base/activity_item.xsl
===================================================================
--- trunk/logistic/templates/base/activity_item.xsl 2012-10-01 13:08:28 UTC
(rev 10072)
+++ trunk/logistic/templates/base/activity_item.xsl 2012-10-01 14:16:27 UTC
(rev 10073)
@@ -78,6 +78,34 @@
</xsl:otherwise>
</xsl:choose>
</dd>
+ <dt>
+ <label
for="end_date">Ansvarlig</label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when
test="editable">
+ <select
name="responsible_user_id">
+ <xsl:for-each
select="user_array">
+ <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>
+ <option
value="{account_id}">
+ <xsl:if
test="activity/responsible_user_id = account_id">
+
<xsl:attribute name="selected">
+
selected
+
</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of
disable-output-escaping="yes" select="$full_name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="activity/responsible_user_id"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
</dl>
<div class="form-buttons">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10073] Logistic: Added option for selecting responsible user,
Torstein <=