root/WebContent/WEB-INF/resources/templates/xhtml10.vm @ 659:1e8c2e97be0c

Revision 659:1e8c2e97be0c, 8.6 KB (checked in by tgambet, 4 years ago)

updated

Line 
1#set ($title = "#evaluate($ucn.evaluate($lang, 'result_for', $unicorncall.DocumentName))")
2#set ($css = ['base_ucn.css'])
3#set ($js = ['mootools-1.2.3-core-nc.js', 'mootools-1.2.3.1-more.js', 'w3c_unicorn_results.js'])
4#if ($unicorncall.isPassed())
5#set ($fav = "favicon_green.ico")
6#else
7#set ($fav = "favicon_red.ico")
8#end
9#parse('includes/head.vm')
10
11#set($observationList = $unicorncall.ObservationList)
12
13#if ($messages.size() > 0)
14#displayMessages($messages)
15#end
16<div id="don_program">
17        <script type="text/javascript" src="http://www.w3.org/QA/Tools/don_prog.js"></script>
18        <noscript>
19                <div><span id="don_program_img">
20                        <a href="http://www.w3.org/QA/Tools/Donate">
21                                <img alt="" src="http://www.w3.org/QA/Tools/I_heart_validator_lg" />
22                        </a>
23                </span>
24                <span id="don_program_text">
25                        The W3C validators rely on community support for hosting and development.<br />
26                        <a href="http://www.w3.org/QA/Tools/Donate">Donate</a> and help us build better tools for a better web.
27                </span></div>
28        </noscript>
29</div>
30<div id="observations">
31#foreach ($observationName in $observationList.keySet())
32#set ($observation = $observationList.get($observationName))
33#set ($infoCount = $observation.getInfoCount())
34#set ($errorCount = $observation.getErrorCount())
35#set ($warningCount = $observation.getWarningCount())
36<div class="observer section #if($observation.isPassed()) valid #else invalid #end" id="$observationName">
37        <h2 class="title">
38                <span class="icons">
39                        #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
40                        #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
41                        #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
42                        <a class="anchor smooth" href="#$observationName" title="$anchor_observation">a</a>
43                </span>
44                #if($observation.isPassed()) #set($ref = "test_ok") #else #set($ref = "test_fail") #end
45                $ucn.evaluate($lang, "test_ok", "<span class=\"name\">$unicorncall.getObserverName($observationName, $lang)#if($observation.Rating) ($observation.Rating/100)#end</span>")
46                #if ($observation.getFilteredRequestUri())<a class="direct_link" href="$observation.getFilteredRequestUri()" title="$direct_link_title_1">$direct_link_label</a>
47                #else <a class="direct_link" href="$observation.getBaseURI($observationName)" title="$direct_link_title_2">$direct_link_label</a>#end
48        </h2>
49       
50        <div class="results block">
51        #if ($infoCount && $infoCount > 0)
52                <div class="section infos" id="${observationName}_info">
53                        <h3 class="title">
54                                <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_info">a</a>
55                                $info_label ($infoCount)
56                        </h3>
57                        <div class="block result">
58                                <table>
59                                        <tbody>
60                                        #set ($i = 0)
61                                        #foreach($result in $observation.getResultsList())
62                                                #if(!$result.Infos.isEmpty())
63                                                #set ($i = $i + 1)
64                                                <tr>
65                                                        <td colspan="4" class="uri" id="${observationName}_info_${i}">
66                                                        #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token: </span><a href="$result.Uri">$result.Uri</a>#end
67                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token: </span>$result.Uri#end
68                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
69                                                        </td>
70                                                        <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_info_${i}">a</a></td>
71                                                </tr>
72#foreach($info in $result.Infos)
73#set ($messageId = "${observationName}_info_${i}_$velocityCount")
74                                                <tr>
75                                                        <td class="linenumber" title="#if($info.Line)$line_token: $info.Line#end">$!info.Line</td>
76                                                        <td class="colnumber" title="#if($info.Column)$column_token: $info.Column#end">$!info.Column</td>
77                                                        <td class="codeContext" title="$context_token">$!{info.Context}</td>
78                                                        <td class="info" id="$messageId">
79                                                        #foreach($message in $info.Message)<span class="msg">$message</span>#end
80                                                        #foreach($longMessage in $info.Longmessage)
81                                                        <p class="longmsg">
82                                                        #foreach($longMessagePiece in $longMessage.Content)
83                                                                $longMessagePiece
84                                                        #end
85                                                        </p>
86                                                        #end
87                                                        </td>
88                                                        <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
89                                                </tr>
90#end
91                                                #end
92                                        #end
93                                        </tbody>
94                                </table>
95                        </div>
96                </div>
97        #end
98       
99        #if ($errorCount && $errorCount > 0)
100                <div class="section errors" id="${observationName}_error">
101                        <h3 class="title">
102                                <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_error">a</a>
103                                $error_label ($errorCount)
104                        </h3>
105                        <div class="block result">
106                                <table>
107                                        <tbody>
108                                        #set ($i = 0)
109                                        #foreach($result in $observation.getResultsList())
110                                                #if (!$result.Errors.isEmpty())
111                                                #set ($i = $i + 1)
112                                                <tr>
113                                                        <td colspan="4" class="uri" id="${observationName}_error_${i}">
114                                                        #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token: </span><a href="$result.Uri">$result.Uri</a>#end
115                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token: </span>$result.Uri#end
116                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
117                                                        </td>
118                                                        <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_error_${i}">a</a></td>
119                                                </tr>
120#foreach($error in $result.Errors)
121#set ($messageId = "${observationName}_error_${i}_$velocityCount")
122                                                <tr>
123                                                        <td class="linenumber" title="#if($error.Line)$line_token: $error.Line#end">$!error.Line</td>
124                                                        <td class="colnumber" title="#if($error.Column)$column_token: $error.Column#end">$!error.Column</td>
125                                                        <td class="codeContext" title="$context_token">$!error.Context</td>
126                                                        <td class="error" id="$messageId">
127                                                        #foreach($message in $error.Message)<span class="msg">$message</span>#end
128                                                        #foreach($longMessage in $error.Longmessage)
129                                                        <p class="longmsg">
130                                                        #foreach($longMessagePiece in $longMessage.Content)
131                                                                $longMessagePiece
132                                                        #end
133                                                        </p>
134                                                        #end
135                                                        </td>
136                                                        <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
137                                                </tr>
138#end
139                                                #end
140                                        #end
141                                        </tbody>
142                                </table>
143                        </div>
144                </div>
145        #end
146       
147        #if ($warningCount && $warningCount > 0)
148                <div class="section warnings" id="${observationName}_warning">
149                        <h3 class="title">
150                                <a class="smooth anchor" title="$anchor_uri" href="#${observationName}_warning">a</a>
151                                $warning_label ($warningCount)
152                        </h3>
153                        <div class="block result">
154                                <table>
155                                        <tbody>
156                                        #set ($i = 0)
157                                        #foreach($result in $observation.getResultsList())
158                                                #if(!$result.Warnings.isEmpty())
159                                                #set ($i = $i + 1)
160                                                <tr>
161                                                        <td colspan="4" class="uri" id="${observationName}_warning_${i}">
162                                                        #if ($unicorncall.getInputMethod() == "URI")<span>$uri_token: </span><a href="$result.Uri">$result.Uri</a>#end
163                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>$file_token: </span>$result.Uri#end
164                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>$submitted_file</span>#end
165                                                        </td>
166                                                        <td class="anchor uri"><a class="smooth" title="$anchor_uri" href="#${observationName}_warning_${i}">a</a></td>
167                                                </tr>
168#foreach($warning in $result.Warnings)
169#set ($messageId = "${observationName}_warning_${i}_$velocityCount")
170                                                <tr>
171                                                        <td class="linenumber" title="#if($warning.Line)$line_token: $warning.Line#end">$!warning.Line</td>
172                                                        <td class="colnumber" title="#if($warning.Column)$column_token: $warning.Column#end">$!warning.Column</td>
173                                                        <td class="codeContext" title="$context_token">$!warning.Context</td>
174                                                        <td class="warning level$warning.getLevel()" id="$messageId">
175                                                        #foreach($message in $warning.Message)<span class="msg">$message</span>#end
176                                                        #foreach($longMessage in $warning.Longmessage)
177                                                        <p class="longmsg">
178                                                        #foreach($longMessagePiece in $longMessage.Content)
179                                                                $longMessagePiece
180                                                        #end
181                                                        </p>
182                                                        #end
183                                                        </td>
184                                                        <td class="anchor"><a class="smooth" title="$anchor_message" href="#$messageId">a</a></td>
185                                                </tr>
186#end
187                                                #end
188                                        #end
189                                        </tbody>
190                                </table>
191                        </div>
192                </div>
193        #end
194        </div>
195</div>
196#end
197</div>
198#parse('includes/footer.vm')
Note: See TracBrowser for help on using the browser.