validator/share/templates/en_US invalid.tmpl,1.9,1.10

Update of /sources/public/validator/share/templates/en_US
In directory hutz:/tmp/cvs-serv10875

Modified Files:
	invalid.tmpl 
Log Message:
Linking to the line number in the source only if source displayed.

The change could be made less disruptive if HTML::Template was 
instanciated with global_vars, hence having TMPL_VARS such as 
opt_show_source be in scope within loops, but it's probably not 
a bad idea to keep the template variables as local as possible, so...



Index: invalid.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/invalid.tmpl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- invalid.tmpl	14 Feb 2005 01:46:08 -0000	1.9
+++ invalid.tmpl	5 Apr 2005 03:47:26 -0000	1.10
@@ -13,7 +13,8 @@
     </p>
 </TMPL_IF>
     <ol>
-<TMPL_LOOP NAME="file_errors">
+<TMPL_IF NAME="opt_show_source">
+  <TMPL_LOOP NAME="file_errors">
       <li>
         <em>Line <a href="#line-<TMPL_VAR NAME="line" ESCAPE="HTML">"><TMPL_VAR NAME="line" ESCAPE="HTML"></a>,
             column <TMPL_VAR NAME="char" ESCAPE="HTML"></em>:
@@ -22,7 +23,20 @@
 <pre><code class="input"><TMPL_VAR NAME="src"></code></pre>
 <TMPL_IF NAME="expl"><TMPL_VAR NAME="expl"></TMPL_IF>
       </li>
-</TMPL_LOOP>
+  </TMPL_LOOP>
+<TMPL_ELSE>
+  <TMPL_LOOP NAME="file_errors">
+      <li>
+        <em>Line <TMPL_VAR NAME="line" ESCAPE="HTML">
+            column <TMPL_VAR NAME="char" ESCAPE="HTML"></em>:
+        <span class="msg"><TMPL_VAR NAME="msg" ESCAPE="HTML"></span>
+<TMPL_IF NAME="uri">(<a href="<TMPL_VAR NAME="uri" ESCAPE="HTML">">explain...</a>)</TMPL_IF>.
+<pre><code class="input"><TMPL_VAR NAME="src"></code></pre>
+<TMPL_IF NAME="expl"><TMPL_VAR NAME="expl"></TMPL_IF>
+      </li>
+  </TMPL_LOOP>
+
+</TMPL_IF>
     </ol>
 <TMPL_IF NAME="opt_verbose">
     <script type="text/javascript" src="loadexplanation.js"></script>

Received on Tuesday, 5 April 2005 03:47:29 UTC