[Openvas-commits] r12105 - in trunk/gsa: . src/html

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 11 08:30:16 CET 2011


Author: mattm
Date: 2011-11-11 08:30:14 +0100 (Fri, 11 Nov 2011)
New Revision: 12105

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/html/omp.xsl
Log:
	* src/html/omp.xsl (override [details]): Only show appearance when active.
	(result-detailed): Show overrides only when they are active.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2011-11-10 20:38:56 UTC (rev 12104)
+++ trunk/gsa/ChangeLog	2011-11-11 07:30:14 UTC (rev 12105)
@@ -1,3 +1,8 @@
+2011-11-11  Matthew Mundell <matthew.mundell at greenbone.net>
+
+	* src/html/omp.xsl (override [details]): Only show appearance when active.
+	(result-detailed): Show overrides only when they are active.
+
 2011-11-10  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
 
 	* src/html/omp.xsl (override-detailed): Little improvement of text

Modified: trunk/gsa/src/html/omp.xsl
===================================================================
--- trunk/gsa/src/html/omp.xsl	2011-11-10 20:38:56 UTC (rev 12104)
+++ trunk/gsa/src/html/omp.xsl	2011-11-11 07:30:14 UTC (rev 12105)
@@ -10307,11 +10307,19 @@
         </tr>
       </table>
 
-      <h1>Appearance</h1>
-      <div class="override_top_line"></div>
-      <xsl:call-template name="override-detailed">
-        <xsl:with-param name="override-buttons">0</xsl:with-param>
-      </xsl:call-template>
+      <xsl:choose>
+        <xsl:when test="active = '0'">
+          <h1>Appearance</h1>
+          (Does not appear in reports, because it is not active.)
+        </xsl:when>
+        <xsl:otherwise>
+          <h1>Appearance</h1>
+          <div class="override_top_line"></div>
+          <xsl:call-template name="override-detailed">
+            <xsl:with-param name="override-buttons">0</xsl:with-param>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
     </div>
   </div>
 </xsl:template>
@@ -11988,32 +11996,44 @@
     <xsl:when test="$show-overrides = 1 or ../../filters/apply_overrides = 1">
       <a class="anchor" name="overrides-{@id}"/>
       <xsl:for-each select="overrides/override">
-        <xsl:call-template name="override-detailed">
-          <xsl:with-param name="override-buttons">
-            <xsl:value-of select="$override-buttons"/>
-          </xsl:with-param>
-          <xsl:with-param name="delta" select="$delta"/>
-          <xsl:with-param name="next">
-            <xsl:choose>
-              <xsl:when test="$result-details">get_result</xsl:when>
-              <xsl:otherwise>get_report</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
+        <xsl:choose>
+          <xsl:when test="active = 0">
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="override-detailed">
+              <xsl:with-param name="override-buttons">
+                <xsl:value-of select="$override-buttons"/>
+              </xsl:with-param>
+              <xsl:with-param name="delta" select="$delta"/>
+              <xsl:with-param name="next">
+                <xsl:choose>
+                  <xsl:when test="$result-details">get_result</xsl:when>
+                  <xsl:otherwise>get_report</xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:for-each>
       <xsl:for-each select="delta/overrides/override">
-        <xsl:call-template name="override-detailed">
-          <xsl:with-param name="override-buttons">
-            <xsl:value-of select="$override-buttons"/>
-          </xsl:with-param>
-          <xsl:with-param name="delta" select="2"/>
-          <xsl:with-param name="next">
-            <xsl:choose>
-              <xsl:when test="$result-details">get_result</xsl:when>
-              <xsl:otherwise>get_report</xsl:otherwise>
-            </xsl:choose>
-          </xsl:with-param>
-        </xsl:call-template>
+        <xsl:choose>
+          <xsl:when test="active = 0">
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="override-detailed">
+              <xsl:with-param name="override-buttons">
+                <xsl:value-of select="$override-buttons"/>
+              </xsl:with-param>
+              <xsl:with-param name="delta" select="2"/>
+              <xsl:with-param name="next">
+                <xsl:choose>
+                  <xsl:when test="$result-details">get_result</xsl:when>
+                  <xsl:otherwise>get_report</xsl:otherwise>
+                </xsl:choose>
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:for-each>
     </xsl:when>
     <xsl:otherwise>



More information about the Openvas-commits mailing list