root/WebContent/WEB-INF/resources/templates/xhtml10.vm @ 1260:a057a9963c44

Revision 1260:a057a9963c44, 21.4 KB (checked in by Thomas Gambet <tgambet@…>, 3 years ago)

changed named of linked css and js files

Line 
1#set ($title = "$ucn.evaluate($lang, 'result_for', $unicorncall.DocumentName)")
2#set ($css = ['base_ucn.css'])
3#set ($js = ['mootools-1.2.3-core-more-yc.js', 'w3c_unicorn_results.js'])
4#if ($unicorncall.getStatus() == "passed")
5#set ($fav = "favicon_green.ico")
6#elseif ($unicorncall.getStatus() == "failed")
7#set ($fav = "favicon_red.ico")
8#elseif ($unicorncall.getStatus() == "undef")
9#set ($fav = "favicon.ico")
10#end
11#parse('includes/head.vm')
12
13#set($observationList = $unicorncall.ObservationList)
14
15#if ($messages.size() > 0)
16#displayMessages($messages)
17#end
18<div id="don_program">
19        <script type="text/javascript" src="http://www.w3.org/QA/Tools/don_prog.js"></script>
20        <noscript>
21                <div>
22                        <span id="don_program_img">
23                                <a href="http://www.w3.org/QA/Tools/Donate">
24                                        <img src="http://www.w3.org/QA/Tools/I_heart_validator_lg" alt="Validators Donation Program Logo"/>
25                                </a>
26                        </span>
27                        <span lang="en" id="don_program_text" dir="ltr">
28                                The W3C validators rely on community support for hosting and development.<br />
29                                <a href="http://www.w3.org/QA/Tools/Donate">Donate</a> and help us build better tools for a better web.
30                        </span>
31                </div>
32        </noscript>
33</div>
34<div id="observations" class="contextShow:'$esc.html($contexts_show)' contextHide:'$esc.html($contexts_hide)'">
35#foreach ($observationName in $observationList.keySet())
36#set ($observation = $observationList.get($observationName))
37#set ($infoCount = $observation.getInfoCount())
38#set ($errorCount = $observation.getErrorCount())
39#set ($warningCount = $observation.getWarningCount())
40<div class="observer section #if($observation.isPassed()) valid #elseif ($observation.isUndef()) undef #else invalid #end #if($observation.hasGroups()) grouped #end" id="$observationName">
41        <h2 class="title">
42                <span class="icons">
43                        #if ($infoCount && $infoCount > 0)<a class="infos" href="#${observationName}_info" title="$info_label ($infoCount)"><span class="legend">$info_label</span><span class="count">$infoCount</span></a> #end
44                        #if ($errorCount && $errorCount > 0)<a class="errors" href="#${observationName}_error" title="$error_label ($errorCount)"><span class="legend">$error_label</span><span class="count">$errorCount</span></a> #end
45                        #if ($warningCount && $warningCount > 0)<a class="warnings" href="#${observationName}_warning" title="$warning_label ($warningCount)"><span class="legend">$warning_label</span><span class="count">$warningCount</span></a> #end
46                        <a class="anchor smooth" href="#$observationName" title="$anchor_observation">a</a>
47                </span>
48                #if($observation.isPassed()) #set($ref = "test_ok") #elseif ($observation.isUndef()) #set($ref = "test_undef") #else #set($ref = "test_fail") #end
49                $ucn.evaluate($lang, $ref, "<span class=\"name\">$unicorncall.getObserverName($observationName, $lang)#if($observation.isSetRating()) ($observation.Rating/100)#end</span>")
50                #if ($unicorncall.getInputMethod() == "URI") <a class="direct_link" href="$esc.html($observation.getHTMLRequestUri())" title="$direct_link_title_1">$direct_link_label</a>
51                #else <a class="direct_link" href="$esc.html($observation.getHTMLIndexUri())" title="$direct_link_title_2">$direct_link_label</a>#end
52        </h2>
53       
54        <div class="results block" #if($observation.getLang()!=$lang)xml:lang="$observation.getLang()"#end>
55        #if ($observation.hasGroups())
56                #foreach($group in $observation.getGroups()) #if (!$group.hasParent())
57                <div class="section group" id="${observationName}_${group.Name}">
58                        <h3 class="title" #if($group.getLang()!=$observation.getLang())xml:lang="$group.getLang()"#end><a class="anchor" href="#${observationName}_${group.Name}">a</a>$group.getTitle()</h3>
59                        <div class="block">
60                                #if($group.getDescription())<p #if($group.getLang()!=$observation.getLang())xml:lang="$group.getLang()"#end>$group.getDescription()</p>#end
61                                <div class="messages">
62                                        #set ($messages = $observation.getURISortedMessages($group.getName()))
63                                        #if ($messages.size() > 0)
64                                        <table>
65                                                <tbody>
66                                                #foreach ($uri in $messages.keySet())
67                                                #set ($uriCount = $velocityCount)
68                                                        <tr>
69                                                                <td colspan="4" class="uri" id="${observationName}_${group.Name}_$uriCount">
70                                                                #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token </span><a href="$esc.html($uri)">$esc.html($uri)</a>#end
71                                                                #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token </span>$esc.html($uri)#end
72                                                                #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
73                                                                </td>
74                                                                <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_${group.Name}_$uriCount">a</a></td>
75                                                        </tr>
76                                                        #foreach ($message in $messages.get($uri))
77                                                                #if($message.getType()==2)#set($type="error")#elseif($message.getType()==1)#set($type="warning")#else#set($type="info")#end
78                                                                #set ($messageId = "${observationName}_${group.Name}_${uriCount}_$velocityCount")
79                                                                #if ($message.getContexts().size() == 0)
80                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
81                                                                                <td class="linenumber" title=""></td>
82                                                                                <td class="colnumber" title=""></td>
83                                                                                <td class="codeContext" title="$context_token"></td>
84                                                                                <td class="info level$message.Level message" id="$messageId">
85                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">       
86                                                                                                <span class="$type legend">$type</span>         
87                                                                                                $!message.Title         
88                                                                                        </span>
89                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
90                                                                                </td>
91                                                                                <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
92                                                                        </tr>
93                                                                #else
94                                                                        #set ($b = true)
95                                                                        #set ($rowspan = $message.getContexts().size())
96                                                                        #foreach($context in $message.getContexts())
97                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
98                                                                                <td class="linenumber" title="#if($context.Line)$line_token $context.Line#end">$!context.Line</td>
99                                                                                <td class="colnumber" title="#if($context.Column)$column_token $context.Column#end">$!context.Column</td>
100                                                                                <td class="codeContext" title="$context_token">
101                                                                                        #if($context.URI && $context.URI != $uri) <a class="direct_link" href="$context.URI" title="$context.URI">link</a> #end
102                                                                                        $!{context.Context}
103                                                                                </td>
104                                                                                #if ($b)
105                                                                                #set ($b = false)
106                                                                                <td class="info level$message.Level message" id="$messageId" #if($rowspan>1)rowspan="$rowspan"#end>
107                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">       
108                                                                                                <span class="$type legend">$type</span>         
109                                                                                                $!message.Title         
110                                                                                        </span>
111                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
112                                                                                </td>
113                                                                                <td class="anchor" #if($rowspan>1)rowspan="$rowspan"#end><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
114                                                                                #end
115                                                                        </tr>
116                                                                        #end                                                           
117                                                                #end
118                                                        #end
119                                                #end
120                                                </tbody>
121                                        </table>
122                                        #end
123                                </div>
124                               
125                                #foreach($group in $observation.getGroupChildren($group))
126                                <div class="section group" id="${observationName}_${group.Name}">
127                                        <h3 class="title" #if($group.getLang()!=$observation.getLang())xml:lang="$group.getLang()"#end><a class="anchor" href="#${observationName}_${group.Name}">a</a>$group.getTitle()</h3>
128                                        <div class="block">
129                                                #if($group.getDescription())<p #if($group.getLang()!=$observation.getLang())xml:lang="$group.getLang()"#end>$group.getDescription()</p>#end
130                                                <div class="messages">
131                                                        #set ($messages = $observation.getURISortedMessages($group.getName()))
132                                                        #if ($messages.size() > 0)
133                                                        <table>
134                                                                <tbody>
135                                                                #foreach ($uri in $messages.keySet())
136                                                                #set ($uriCount = $velocityCount)
137                                                                        <tr>
138                                                                                <td colspan="4" class="uri" id="${observationName}_${group.Name}_$uriCount">
139                                                                                #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token </span><a href="$esc.html($uri)">$esc.html($uri)</a>#end
140                                                                                #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token </span>$esc.html($uri)#end
141                                                                                #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
142                                                                                </td>
143                                                                                <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_${group.Name}_$uriCount">a</a></td>
144                                                                        </tr>
145                                                                        #foreach ($message in $messages.get($uri))
146                                                                                #if($message.getType()==2)#set($type="error")#elseif($message.getType()==1)#set($type="warning")#else#set($type="info")#end
147                                                                                #set ($messageId = "${observationName}_${group.Name}_${uriCount}_$velocityCount")
148                                                                                #if ($message.getContexts().size() == 0)
149                                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
150                                                                                                <td class="linenumber" title=""></td>
151                                                                                                <td class="colnumber" title=""></td>
152                                                                                                <td class="codeContext" title="$context_token"></td>
153                                                                                                <td class="info level$message.Level message" id="$messageId">
154                                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">       
155                                                                                                                <span class="$type legend">$type</span>         
156                                                                                                                $!message.Title         
157                                                                                                        </span>
158                                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
159                                                                                                </td>
160                                                                                                <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
161                                                                                        </tr>
162                                                                                #else
163                                                                                        #set ($b = true)
164                                                                                        #set ($rowspan = $message.getContexts().size())
165                                                                                        #foreach($context in $message.getContexts())
166                                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
167                                                                                                <td class="linenumber" title="#if($context.Line)$line_token $context.Line#end">$!context.Line</td>
168                                                                                                <td class="colnumber" title="#if($context.Column)$column_token $context.Column#end">$!context.Column</td>
169                                                                                                <td class="codeContext" title="$context_token">
170                                                                                                        #if($context.URI && $context.URI != $uri) <a class="direct_link" href="$context.URI" title="$context.URI">link</a> #end
171                                                                                                        $!{context.Context}
172                                                                                                </td>
173                                                                                                #if ($b)
174                                                                                                #set ($b = false)
175                                                                                                <td class="info level$message.Level message" id="$messageId" #if($rowspan>1) rowspan="$rowspan" #end>
176                                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">       
177                                                                                                                <span class="$type legend">$type</span>         
178                                                                                                                $!message.Title         
179                                                                                                        </span>
180                                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
181                                                                                                </td>
182                                                                                                <td class="anchor" #if($rowspan>1) rowspan="$rowspan" #end><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
183                                                                                                #end
184                                                                                        </tr>
185                                                                                        #end                                                           
186                                                                                #end
187                                                                        #end
188                                                                #end
189                                                                </tbody>
190                                                        </table>
191                                                        #end
192                                                </div>
193                                        </div>
194                                </div>
195                                #end
196                        </div>
197                </div>
198                #end#end
199       
200        #else
201       
202                #if ($infoCount && $infoCount > 0)
203                        <div class="section infos" id="${observationName}_info">
204                                <h3 class="title">
205                                        <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_info">a</a>
206                                        $info_label ($infoCount)
207                                </h3>
208                                <div class="block result" #if($observation.getLang()!=$lang)xml:lang="$observation.getLang()"#end>
209                                        <table>
210                                                <tbody>
211                                                #set ($messages = $observation.getURISortedMessages(0))
212                                                #foreach ($uri in $messages.keySet())
213                                                #set ($uriCount = $velocityCount)
214                                                        <tr>
215                                                                <td colspan="4" class="uri" id="${observationName}_info_$uriCount">
216                                                                #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token </span><a href="$esc.html($uri)">$esc.html($uri)</a>#end
217                                                                #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token </span>$esc.html($uri)#end
218                                                                #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
219                                                                </td>
220                                                                <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_info_$uriCount">a</a></td>
221                                                        </tr>
222                                                        #foreach($message in $messages.get($uri))
223                                                        #set ($messageId = "${observationName}_info_${uriCount}_$velocityCount")
224                                                                #if ($message.getContexts().size() == 0)
225                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
226                                                                                <td class="linenumber" title=""></td>
227                                                                                <td class="colnumber" title=""></td>
228                                                                                <td class="codeContext" title="$context_token"></td>
229                                                                                <td class="info level$message.Level message" id="$messageId">
230                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
231                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
232                                                                                </td>
233                                                                                <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
234                                                                        </tr>
235                                                                #else
236                                                                        #set ($b = true)
237                                                                        #set ($rowspan = $message.getContexts().size())
238                                                                        #foreach($context in $message.getContexts())
239                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
240                                                                                <td class="linenumber" title="#if($context.Line)$line_token $context.Line#end">$!context.Line</td>
241                                                                                <td class="colnumber" title="#if($context.Column)$column_token $context.Column#end">$!context.Column</td>
242                                                                                <td class="codeContext" title="$context_token">
243                                                                                        #if($context.URI && $context.URI != $uri) <a class="direct_link" href="$context.URI" title="$context.URI">link</a> #end
244                                                                                        $!{context.Context}
245                                                                                </td>
246                                                                               
247                                                                                #if ($b)
248                                                                                #set ($b = false)
249                                                                                <td class="info level$message.Level message" id="$messageId" #if($rowspan>1) rowspan="$rowspan" #end>
250                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
251                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
252                                                                                </td>
253                                                                                <td class="anchor" #if($rowspan>1) rowspan="$rowspan" #end><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
254                                                                                #end
255                                                                        </tr>
256                                                                        #end                                                           
257                                                                #end
258                                                        #end
259                                                #end
260                                                </tbody>
261                                        </table>
262                                </div>
263                        </div>
264                #end
265               
266                #if ($errorCount && $errorCount > 0)
267                        <div class="section errors" id="${observationName}_error">
268                                <h3 class="title">
269                                        <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_error">a</a>
270                                        $error_label ($errorCount)
271                                </h3>
272                                <div class="block result" #if($observation.getLang()!=$lang)xml:lang="$observation.getLang()"#end>
273                                        <table>
274                                                <tbody>
275                                                #set ($messages = $observation.getURISortedMessages(2))
276                                                #foreach ($uri in $messages.keySet())
277                                                #set ($uriCount = $velocityCount)
278                                                        <tr>
279                                                                <td colspan="4" class="uri" id="${observationName}_error_$uriCount">
280                                                                #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token </span><a href="$esc.html($uri)">$esc.html($uri)</a>#end
281                                                                #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token </span>$esc.html($uri)#end
282                                                                #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
283                                                                </td>
284                                                                <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_error_$uriCount">a</a></td>
285                                                        </tr>
286                                                        #foreach($message in $messages.get($uri))
287                                                        #set ($messageId = "${observationName}_error_${uriCount}_$velocityCount")
288                                                                #if ($message.getContexts().size() == 0)
289                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
290                                                                                <td class="linenumber" title=""></td>
291                                                                                <td class="colnumber" title=""></td>
292                                                                                <td class="codeContext" title="$context_token"></td>
293                                                                                <td class="info level$message.Level message" id="$messageId">
294                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
295                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
296                                                                                </td>
297                                                                                <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
298                                                                        </tr>
299                                                                #else
300                                                                        #set ($b = true)
301                                                                        #set ($rowspan = $message.getContexts().size())
302                                                                        #foreach($context in $message.getContexts())
303                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
304                                                                                <td class="linenumber" title="#if($context.Line)$line_token $context.Line#end">$!context.Line</td>
305                                                                                <td class="colnumber" title="#if($context.Column)$column_token $context.Column#end">$!context.Column</td>
306                                                                                <td class="codeContext" title="$context_token">
307                                                                                        #if($context.URI && $context.URI != $uri) <a class="direct_link" href="$context.URI" title="$context.URI">link</a> #end
308                                                                                        $!{context.Context}
309                                                                                </td>
310                                                                                #if ($b)
311                                                                                #set ($b = false)
312                                                                                <td class="info level$message.Level message" id="$messageId" #if($rowspan>1) rowspan="$rowspan" #end>
313                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
314                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
315                                                                                </td>
316                                                                                <td class="anchor" #if($rowspan>1) rowspan="$rowspan" #end><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
317                                                                                #end
318                                                                        </tr>
319                                                                        #end                                                           
320                                                                #end
321                                                        #end
322                                                #end
323                                                </tbody>
324                                        </table>
325                                </div>
326                        </div>
327                #end
328               
329                #if ($warningCount && $warningCount > 0)
330                        <div class="section warnings" id="${observationName}_warning">
331                                <h3 class="title">
332                                        <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_warning">a</a>
333                                        $warning_label ($warningCount)
334                                </h3>
335                                <div class="block result" #if($observation.getLang()!=$lang)xml:lang="$observation.getLang()"#end>
336                                        <table>
337                                                <tbody>
338                                                #set ($messages = $observation.getURISortedMessages(1))
339                                                #foreach ($uri in $messages.keySet())
340                                                #set ($uriCount = $velocityCount)
341                                                        <tr>
342                                                                <td colspan="4" class="uri" id="${observationName}_warning_$uriCount">
343                                                                #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token </span><a href="$esc.html($uri)">$esc.html($uri)</a>#end
344                                                                #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token </span>$esc.html($uri)#end
345                                                                #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
346                                                                </td>
347                                                                <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_warning_$uriCount">a</a></td>
348                                                        </tr>
349                                                        #foreach($message in $messages.get($uri))
350                                                        #set ($messageId = "${observationName}_warning_${uriCount}_$velocityCount")
351                                                                #if ($message.getContexts().size() == 0)
352                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
353                                                                                <td class="linenumber" title=""></td>
354                                                                                <td class="colnumber" title=""></td>
355                                                                                <td class="codeContext" title="$context_token"></td>
356                                                                                <td class="info level$message.Level message" id="$messageId">
357                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
358                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
359                                                                                </td>
360                                                                                <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
361                                                                        </tr>
362                                                                #else
363                                                                        #set ($b = true)
364                                                                        #set ($rowspan = $message.getContexts().size())
365                                                                        #foreach($context in $message.getContexts())
366                                                                        <tr #if($message.getLang()!=$observation.getLang())xml:lang="$message.getLang()"#end>
367                                                                                <td class="linenumber" title="#if($context.Line)$line_token $context.Line#end">$!context.Line</td>
368                                                                                <td class="colnumber" title="#if($context.Column)$column_token $context.Column#end">$!context.Column</td>
369                                                                                <td class="codeContext" title="$context_token">
370                                                                                        #if($context.URI && $context.URI != $uri) <a class="direct_link" href="$context.URI" title="$context.URI">link</a> #end
371                                                                                        $!{context.Context}
372                                                                                </td>
373                                                                                #if ($b)
374                                                                                #set ($b = false)
375                                                                                <td class="info level$message.Level message" id="$messageId" #if($rowspan>1) rowspan="$rowspan" #end>
376                                                                                        <span class="msg#if($message.Description && $message.Description != "") desc#end">$!message.Title</span>
377                                                                                        #if($message.Description && $message.Description != "")<div class="description">$!message.Description</div>#end
378                                                                                </td>
379                                                                                <td class="anchor" #if($rowspan>1) rowspan="$rowspan" #end><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
380                                                                                #end
381                                                                        </tr>
382                                                                        #end                                                           
383                                                                #end
384                                                        #end
385                                                #end
386                                                </tbody>
387                                        </table>
388                                </div>
389                        </div>
390                #end
391        #end
392        </div>
393</div>
394#end
395</div>
396#parse('includes/footer.vm')
Note: See TracBrowser for help on using the browser.