[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10395]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10395] |
Date: |
Wed, 31 Oct 2012 13:02:42 +0000 |
Revision: 10395
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10395
Author: vator
Date: 2012-10-31 13:02:39 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
trunk/logistic/inc/class.uiactivity.inc.php
trunk/logistic/inc/class.uirequirement.inc.php
trunk/logistic/inc/model/class.activity.inc.php
trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
trunk/logistic/templates/base/css/base.css
trunk/logistic/templates/base/requirement/requirement_overview.xsl
Added Paths:
-----------
trunk/logistic/templates/base/activity/add_activity_item.xsl
trunk/logistic/templates/base/activity/view_activity_item.xsl
Modified: trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
+++ trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
2012-10-31 13:02:39 UTC (rev 10395)
@@ -142,8 +142,9 @@
$tables = "lg_requirement_resource_allocation
allocation";
- $joins = " {$this->left_join} phpgw_locations ON
(phpgw_locations.location_id = allocation.location_id)";
-
+ $joins .= " {$this->left_join} phpgw_locations ON
(phpgw_locations.location_id = allocation.location_id)";
+ $joins .= " {$this->left_join} fm_bim_item ON
(fm_bim_item.location_id = allocation.location_id and fm_bim_item.id =
allocation.resource_id )";
+
if($return_count)
{
$cols = 'COUNT(DISTINCT(allocation.id)) AS
count';
@@ -151,10 +152,10 @@
else
{
$cols .= "allocation.*, ";
- $cols .= "phpgw_locations.descr AS
resource_type_descr";
-
+ $cols .= "phpgw_locations.descr AS
resource_type_descr, ";
+ $cols .= "fm_bim_item.location_code AS
location_code, xpath('//address/text()', fm_bim_item.xml_representation) AS
fm_bim_item_address, xpath('//navn/text()', fm_bim_item.xml_representation) AS
fm_bim_item_name ";
}
-
+
$dir = $ascending ? 'ASC' : 'DESC';
$order = $sort_field ? "ORDER BY
{$this->marshal($sort_field, 'field')} $dir ": '';
@@ -171,6 +172,9 @@
$allocation->set_requirement_id($this->unmarshal($this->db->f('requirement_id'),
'string'));
$allocation->set_resource_id($this->unmarshal($this->db->f('resource_id'),
'int'));
$allocation->set_resource_type_descr($this->unmarshal($this->db->f('resource_type_descr'),
'string'));
+
$allocation->set_location_code($this->unmarshal($this->db->f('location_code'),
'string'));
+
$allocation->set_fm_bim_item_address($this->unmarshal($this->db->f('fm_bim_item_address'),
'string'));
+
$allocation->set_fm_bim_item_name($this->unmarshal($this->db->f('fm_bim_item_name'),
'string'));
}
return $allocation;
Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2012-10-31 10:10:46 UTC (rev
10394)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2012-10-31 13:02:39 UTC (rev
10395)
@@ -352,7 +352,7 @@
$GLOBALS['phpgw']->jqcal->add_listener('start_date');
$GLOBALS['phpgw']->jqcal->add_listener('end_date');
-
self::render_template_xsl(array('activity/activity_item'), $data);
+
self::render_template_xsl(array('activity/add_activity_item'), $data);
}
public function view()
@@ -379,7 +379,11 @@
$data['parent_activity'] = $parent_activity;
}
-
self::render_template_xsl(array('activity/activity_item'), $data);
+ $activity_children =
$this->so->get($activity->get_id());
+
+ print_r( $activity_children );
+
+
self::render_template_xsl('activity/view_activity_item', $data);
}
public function save()
Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php 2012-10-31 10:10:46 UTC
(rev 10394)
+++ trunk/logistic/inc/class.uirequirement.inc.php 2012-10-31 13:02:39 UTC
(rev 10395)
@@ -155,11 +155,11 @@
}
$href = self::link(array('menuaction' =>
'logistic.uirequirement.delete', 'id' => $entry['id']));
- $entry['delete_link'] = "<a class=\"btn-sm
delete\" href=\"{$href}\">Slett</a>";
+ $entry['delete_link'] = "<a class=\"btn-sm
delete\" href=\"{$href}\">Slett krav</a>";
$entry['select'] = "<input
class=\"select_line\" type =\"radio\" {$_checked} name=\"values[select_line]\"
value=\"{$entry['id']}\">";
$href = self::link(array('menuaction' =>
'logistic.uirequirement_resource_allocation.edit', 'requirement_id' =>
$entry['id']));
- $entry['alloc_link'] = "<a class=\"btn-sm
alloc\" href=\"{$href}\">Alloker</a>";
+ $entry['alloc_link'] = "<a class=\"btn-sm
alloc\" href=\"{$href}\">Alloker ressurser</a>";
}
// ... add result data
Modified: trunk/logistic/inc/model/class.activity.inc.php
===================================================================
--- trunk/logistic/inc/model/class.activity.inc.php 2012-10-31 10:10:46 UTC
(rev 10394)
+++ trunk/logistic/inc/model/class.activity.inc.php 2012-10-31 13:02:39 UTC
(rev 10395)
@@ -239,7 +239,8 @@
'project_name' => $project_name,
'start_date' => $this->get_start_date() ?
date($date_format, $this->get_start_date()): '',
'end_date' => $this->get_end_date() ?
date($date_format, $this->get_end_date()): '',
- 'responsible_user_id' => $responsible_user
+ 'responsible_user_id' =>
$this->get_responsible_user_id(),
+ 'responsible_user_name' => $responsible_user
);
}
Modified: trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
2012-10-31 10:10:46 UTC (rev 10394)
+++ trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
2012-10-31 13:02:39 UTC (rev 10395)
@@ -40,7 +40,10 @@
protected $create_user;
protected $resource_type_descr;
-
+ protected $location_code;
+ protected $fm_bim_item_address;
+ protected $fm_bim_item_name;
+
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
* the database the ID should be empty so the database can add
one according to its logic.
@@ -112,6 +115,36 @@
return $this->resource_type_descr;
}
+ public function set_location_code($location_code)
+ {
+ $this->location_code = $location_code;
+ }
+
+ public function get_location_code()
+ {
+ return $this->location_code;
+ }
+
+ public function set_fm_bim_item_address($fm_bim_item_address)
+ {
+ $this->fm_bim_item_address = $fm_bim_item_address;
+ }
+
+ public function get_fm_bim_item_address()
+ {
+ return $this->fm_bim_item_address;
+ }
+
+ public function set_fm_bim_item_name($fm_bim_item_name)
+ {
+ $this->fm_bim_item_name = $fm_bim_item_name;
+ }
+
+ public function get_fm_bim_item_name()
+ {
+ return $this->fm_bim_item_name;
+ }
+
/**
* Get a static reference to the storage object associated with
this model object
*
@@ -129,11 +162,14 @@
public function serialize()
{
return array(
- 'id' => $this->get_id(),
+ 'id'
=> $this->get_id(),
'resource_type_descr' =>
$this->get_resource_type_descr(),
- 'requirement_id' => $this->get_requirement_id(),
- 'resource_id' => $this->get_resource_id(),
- 'location_id' => $this->get_location_id()
+ 'requirement_id' =>
$this->get_requirement_id(),
+ 'resource_id' =>
$this->get_resource_id(),
+ 'location_id'
=> $this->get_location_id(),
+ 'location_code' =>
$this->get_location_code(),
+ 'fm_bim_item_address' =>
$this->get_fm_bim_item_address(),
+ 'fm_bim_item_name' =>
$this->get_fm_bim_item_name()
);
}
}
\ No newline at end of file
Added: trunk/logistic/templates/base/activity/add_activity_item.xsl
===================================================================
--- trunk/logistic/templates/base/activity/add_activity_item.xsl
(rev 0)
+++ trunk/logistic/templates/base/activity/add_activity_item.xsl
2012-10-31 13:02:39 UTC (rev 10395)
@@ -0,0 +1,209 @@
+<!-- $Id: activity_item.xsl 10305 2012-10-23 09:08:34Z vator $ -->
+<!-- item -->
+
+<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:call-template name="yui_phpgw_i18n"/>
+<div class="yui-navset yui-navset-top">
+
+ <xsl:choose>
+ <xsl:when test="parent_activity/id > 0">
+ <h1>
+ <xsl:value-of select="parent_activity/name"
disable-output-escaping="yes"/>::<xsl:value-of select="php:function('lang',
'Add sub activity')" />
+ </h1>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1>
+ <xsl:value-of select="php:function('lang', 'Add
activity')" />
+ </h1>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <div 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>
+ <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">
+ <xsl:if test="parent_activity/id >
0">
+ <dt>
+ <xsl:if test="editable">
+ <div
style="margin-bottom: 1em;width: 88%;" class="select-box">
+ <label>Velg en
annen hovedaktivitet</label>
+ <select
id="select_activity" name="parent_activity_id" class="selectLocation">
+
<option>Velg aktivitet</option>
+
<xsl:for-each select="activities">
+ <option value="{id}">
+ <xsl:if
test="activity/parent_id = 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>
+ </xsl:if>
+ </dt>
+ </xsl:if>
+ <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>
+ <input type="text"
name="name" id="name" value="{activity/name}" size="100"/>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </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>
+ <textarea
id="description" name="description" rows="5" cols="60"><xsl:value-of
select="activity/description" disable-output-escaping="yes"/></textarea>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="activity/description" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="start_date">Startdato</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>
+ <input
class="date" 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', $date_format,
number(activity/start_date))"/></xsl:attribute>
+ </xsl:if>
+ </input>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="php:function('date', $date_format,
number(activity/start_date))"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="end_date">Sluttdato</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>
+ <input
class="date" 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', $date_format,
number(activity/end_date))"/></xsl:attribute>
+ </xsl:if>
+ </input>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="php:function('date', $date_format, number(activity/end_date))"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="end_date">Ansvarlig</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>
+ <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>
+ <span class="help_text line">Angi
startdato for aktiviteten</span>
+ </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 type="submit"
name="cancel_activity" value="{$lang_cancel}" title = "{$lang_cancel}" />
+ </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>
+ </div>
+</div>
+</xsl:template>
+
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected">
+ <xsl:attribute name="selected" value="selected" />
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
Property changes on:
trunk/logistic/templates/base/activity/add_activity_item.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/logistic/templates/base/activity/view_activity_item.xsl
===================================================================
--- trunk/logistic/templates/base/activity/view_activity_item.xsl
(rev 0)
+++ trunk/logistic/templates/base/activity/view_activity_item.xsl
2012-10-31 13:02:39 UTC (rev 10395)
@@ -0,0 +1,230 @@
+<!-- $Id: activity_item.xsl 10305 2012-10-23 09:08:34Z vator $ -->
+<!-- item -->
+
+<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:call-template name="yui_phpgw_i18n"/>
+<div class="yui-navset yui-navset-top">
+ <xsl:choose>
+ <xsl:when test="parent_activity/id > 0">
+ <h1>
+ <xsl:value-of select="parent_activity/name"
disable-output-escaping="yes"/>::<xsl:value-of select="php:function('lang',
'Add sub activity')" />
+ </h1>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1>
+ <xsl:value-of select="php:function('lang', 'Add
activity')" />
+ </h1>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <div 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>
+ <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">
+ <xsl:if test="parent_activity/id >
0">
+ <dt>
+ <xsl:if test="editable">
+ <div
style="margin-bottom: 1em;width: 88%;" class="select-box">
+ <label>Velg en
annen hovedaktivitet</label>
+ <select
id="select_activity" name="parent_activity_id" class="selectLocation">
+
<option>Velg aktivitet</option>
+
<xsl:for-each select="activities">
+ <option value="{id}">
+ <xsl:if
test="activity/parent_id = 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>
+ </xsl:if>
+ </dt>
+ </xsl:if>
+ <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>
+ <input type="text"
name="name" id="name" value="{activity/name}" size="100"/>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </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>
+ <textarea
id="description" name="description" rows="5" cols="60"><xsl:value-of
select="activity/description" disable-output-escaping="yes"/></textarea>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="activity/description" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="start_date">Startdato</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>
+ <input
class="date" 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', $date_format,
number(activity/start_date))"/></xsl:attribute>
+ </xsl:if>
+ </input>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="php:function('date', $date_format,
number(activity/start_date))"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="end_date">Sluttdato</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>
+ <input
class="date" 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', $date_format,
number(activity/end_date))"/></xsl:attribute>
+ </xsl:if>
+ </input>
+ <span class="help_text
line">Angi startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="php:function('date', $date_format, number(activity/end_date))"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="end_date">Ansvarlig</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>
+ <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>
+ <span class="help_text line">Angi
startdato for aktiviteten</span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span><xsl:value-of
select="activity/responsible_user_name"/></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ </dl>
+
+ <h3 style="margin-top:
20px;clear:both;">Underaktiviteter</h3>
+ <div id="sub-activities-container"></div>
+ <xsl:call-template name="datasource-definition"
/>
+
+ <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 type="submit"
name="cancel_activity" value="{$lang_cancel}" title = "{$lang_cancel}" />
+ </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>
+ </div>
+</div>
+</xsl:template>
+
+<xsl:template name="datasource-definition">
+
+ <script>
+ YAHOO.util.Event.onDOMReady(function(){
+
+ var oArgs = {
+ menuaction:'logistic.uiactivity.index',
+ activity_id: '<xsl:value-of
select='activity/id'/>',
+ type: 'activity_id',
+ phpgw_return_as: 'json'
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var myColumnDefs = [
+ {key:"id", sortable:true},
+ {key:"name", label:'Aktivitetsnavn', sortable:true},
+ {key:"start_date", label:'Startdato', sortable:true},
+ {key:"end_date", label:'Sluttdato', sortable:true},
+ {key:"responsible_user_name", label:'Ansvarlig',
sortable:true},
+ ];
+
+ YAHOO.portico.inlineTableHelper('sub-activities-container',
requestUrl, myColumnDefs);
+ });
+ </script>
+</xsl:template>
Property changes on:
trunk/logistic/templates/base/activity/view_activity_item.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/logistic/templates/base/css/base.css
===================================================================
--- trunk/logistic/templates/base/css/base.css 2012-10-31 10:10:46 UTC (rev
10394)
+++ trunk/logistic/templates/base/css/base.css 2012-10-31 13:02:39 UTC (rev
10395)
@@ -2344,4 +2344,18 @@
#resource_alloc_wrp h2{
margin-top: 0;
+}
+
+#requirement-container .btn-sm {
+ border-color: #4378B1 #2663A3 #366CA4;
+ font-size: 12px;
+ padding: 1px 8px;
+}
+
+#details table {
+ margin: 0;
+ padding: 0;
+}
+.yui-skin-sam .yui-dt table {
+ border: none;
}
\ No newline at end of file
Modified: trunk/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-31 10:10:46 UTC (rev 10394)
+++ trunk/logistic/templates/base/requirement/requirement_overview.xsl
2012-10-31 13:02:39 UTC (rev 10395)
@@ -97,9 +97,10 @@
var myColumnDefs = [
{key:"id", sortable:true},
+ {key:"fm_bim_item_name", label:'Navn på
ressurs', sortable:true},
{key:"resource_type_descr",
label:'Ressurstype', sortable:true},
- {key:"requirement_id", sortable:true},
- {key:"resource_id", sortable:true}
+ {key:"location_code", label:'Lokasjonskode',
sortable:true},
+ {key:"fm_bim_item_address", label:'Adresse',
sortable:true}
];
YAHOO.portico.inlineTableHelper('allocation-container', requestUrl,
myColumnDefs);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10395],
Torstein <=