[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8019]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8019] |
Date: |
Fri, 04 Nov 2011 13:22:00 +0000 |
Revision: 8019
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8019
Author: vator
Date: 2011-11-04 13:22:00 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socheck_list.inc.php
trunk/controller/templates/base/view_check_list.xsl
Modified: trunk/controller/inc/class.socheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.socheck_list.inc.php 2011-11-04 12:04:56 UTC
(rev 8018)
+++ trunk/controller/inc/class.socheck_list.inc.php 2011-11-04 13:22:00 UTC
(rev 8019)
@@ -94,12 +94,15 @@
$check_list_id = $check_list->get_id();
}
- if(check_list != null){
+ if($check_list != null){
$check_list->set_check_item_array($check_items_array);
$check_list_array[] = $check_list->toArray();
+
+ return $check_list_array;
+ }else {
+ return null;
}
-
- return $check_list_array;
+
}
function get_query(string $sort_field, boolean $ascending, string
$search_for, string $search_type, array $filters, boolean $return_count){}
Modified: trunk/controller/templates/base/view_check_list.xsl
===================================================================
--- trunk/controller/templates/base/view_check_list.xsl 2011-11-04 12:04:56 UTC
(rev 8018)
+++ trunk/controller/templates/base/view_check_list.xsl 2011-11-04 13:22:00 UTC
(rev 8019)
@@ -3,7 +3,6 @@
<div id="main_content">
<!-- =========================== SHOWS CONTROL ITEMS RECEIPT
=============================== -->
-
<xsl:variable name="control_id"><xsl:value-of
select="control_id"/></xsl:variable>
<input type="hidden" id="control_id" name="control_id"
value="{control_id}" />
@@ -18,11 +17,20 @@
<h3>Sjekklister</h3>
<ul class="check_list">
- <xsl:for-each select="check_list_array">
- <li>
- <span><xsl:number/></span>. <xsl:value-of
select="id"/><xsl:value-of select="control_id"/><xsl:value-of
select="status"/><xsl:value-of select="comment"/>
- </li>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="check_list_array/child::node()">
+ <xsl:for-each select="check_list_array">
+ <li>
+ <span><xsl:number/></span>.
<xsl:value-of select="id"/><xsl:value-of select="control_id"/><xsl:value-of
select="status"/><xsl:value-of select="comment"/>
+ </li>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen sjekklister for denne kontrollen
+ </xsl:otherwise>
+ </xsl:choose>
+
+
</ul>
</div>
</xsl:template>
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8019],
Torstein <=