validator/share/templates/en_US error_loop.tmpl,1.7,1.8

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

Modified Files:
	error_loop.tmpl 
Log Message:
Improve handling of messages with no line/col locators (such as some info ones from validator.nu).

Index: error_loop.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/error_loop.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- error_loop.tmpl	9 Sep 2008 12:55:33 -0000	1.7
+++ error_loop.tmpl	4 Jan 2009 10:54:09 -0000	1.8
@@ -3,11 +3,11 @@
   <TMPL_LOOP NAME="file_errors">
       <li<TMPL_IF NAME="class"> class="<TMPL_VAR NAME="class">"</TMPL_IF>>
 <span class="err_type"><TMPL_IF NAME="err_type_info"><img src="images/info_icons/info.png" alt="Info" title="Info" /></TMPL_IF><TMPL_IF NAME="err_type_warn"><img src="images/info_icons/warning.png" alt="Warning" title="Warning" /></TMPL_IF><TMPL_IF NAME="err_type_err"><img src="images/info_icons/error.png" alt="Error" title="Error" /></TMPL_IF></span>
-        <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>:
+        <TMPL_IF NAME="line"><em>Line <a href="#line-<TMPL_VAR NAME="line" ESCAPE="HTML">"><TMPL_VAR NAME="line" ESCAPE="HTML"></a><TMPL_IF NAME="char">,
+            Column <TMPL_VAR NAME="char" ESCAPE="HTML"></TMPL_IF></em>:</TMPL_IF>
         <span class="msg"><TMPL_VAR NAME="msg"></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="src"><pre><code class="input"><TMPL_VAR NAME="src"></code></pre></TMPL_IF>
 <TMPL_IF NAME="expl"><TMPL_VAR NAME="expl"></TMPL_IF>
       </li>
   </TMPL_LOOP>
@@ -15,8 +15,8 @@
   <TMPL_LOOP NAME="file_errors">
       <li<TMPL_IF NAME="class"> class="<TMPL_VAR NAME="class">"</TMPL_IF>>
           <span class="err_type"><TMPL_IF NAME="err_type_info"><img src="images/info_icons/info.png" alt="Info" title="Info" /></TMPL_IF><TMPL_IF NAME="err_type_warn"><img src="images/info_icons/warning.png" alt="Warning" title="Warning" /></TMPL_IF><TMPL_IF NAME="err_type_err"><img src="images/info_icons/error.png" alt="Error" title="Error" /></TMPL_IF></span>
-        <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_IF NAME="line"><em>Line <TMPL_VAR NAME="line" ESCAPE="HTML"><TMPL_IF NAME="char">, Column <TMPL_VAR NAME="char" ESCAPE="HTML"></TMPL_IF></em>:</TMPL_IF>
+        <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>.<TMPL_IF NAME="src"><pre><code class="input"><TMPL_VAR NAME="src"></code></pre></TMPL_IF><TMPL_IF NAME="expl"><TMPL_VAR NAME="expl"></TMPL_IF>      </li>
   </TMPL_LOOP>
 </TMPL_IF>    
 <TMPL_IF NAME="has_errors"></ol></TMPL_IF>

Received on Sunday, 4 January 2009 10:54:21 UTC