root/WebContent/WEB-INF/resources/templates/xhtml10.vm @ 327:a914a5e5dd4c

Revision 327:a914a5e5dd4c, 6.9 KB (checked in by tgambet, 4 years ago)

added anchor and external link icons

Line 
1#if($unicorncall.DocumentName)
2#set ($noEscape_title = "$result_for $unicorncall.DocumentName")
3#else
4#set ($noEscape_title = $result_for_upload)
5#end 
6#set ($css = ['base_ucn.css'])
7#set ($js = ['scripts/mootools-1.2.3-core-nc.js', 'scripts/mootools-1.2.3.1-more.js', 'scripts/w3c_unicorn_results.js'])
8#if ($unicorncall.isPassed())
9#set ($fav = "favicon_green.ico")
10#else
11#set ($fav = "favicon_red.ico")
12#end
13#parse('includes/head.vm')
14
15#set($observationList = $unicorncall.ObservationList)
16
17#if ($messages.size() > 0)
18#displayMessages($messages)
19#end
20<div id="don_program">
21        <script type="text/javascript" src="http://www.w3.org/QA/Tools/don_prog.js"></script>
22</div>
23<div id="observations">
24#foreach ($observationName in $observationList.keySet())
25#set ($observation = $observationList.get($observationName))
26#set ($infoCount = $observation.getInfoCount())
27#set ($errorCount = $observation.getErrorCount())
28#set ($warningCount = $observation.getWarningCount())
29
30#if($observation.isPassed())
31<div class="observer $observationName valid" id="$observationName">
32#else
33<div class="observer $observationName invalid" id="$observationName">
34#end
35        <h2>
36                <span class="icons">
37                        <a class="anchor" href="#$observationName" title="anchor to this observation">[anchor]</a>
38                        <a class="direct_link" href="$observation.getRequestUri()" title="link to ...">[direct link]</a>
39                        #if ($infoCount && $infoCount > 0)<img src="images/icone_info.png" alt="Infos" title="Infos" /><span>$infoCount</span> #end
40                        #if ($errorCount && $errorCount > 0)<img src="images/icone_error.png" alt="Errors" title="Errors" /><span>$errorCount</span> #end
41                        #if ($warningCount && $warningCount > 0)<img src="images/icone_warning.png" alt="Warnings" title="Warnings" /><span>$warningCount</span> #end
42                </span>
43                #if($observation.isPassed())
44                $test_ok_1
45                #else
46                $test_fail_1
47                #end
48                <span class="name">$unicorncall.getObserverName($observationName, $lang)</span>
49        </h2>
50       
51        <div class="results">
52        #if ($infoCount && $infoCount > 0)
53                <div class="infos">
54                        <h3>Infos ($infoCount)</h3>
55                        <div class="result">
56                                <table>
57                                        <tbody>
58                                        #foreach($result in $observation.getResultsList())
59                                                #set ($resultCount = $velocityCount)
60                                                #if(!$result.Infos.isEmpty())
61                                                <tr>
62                                                        <td colspan="5" class="uri">
63                                                        #if ($unicorncall.getInputMethod() == "URI")<span>URI : </span><a href="$result.Uri">$result.Uri</a>#end
64                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>File : </span>$result.Uri#end
65                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>File : </span>Direct Input#end
66                                                        </td>
67                                                </tr>
68#foreach($info in $result.Infos)
69#set ($messageId = "${observationName}-info-${resultCount}-$velocityCount")
70                                                <tr>
71                                                        <td class="linenumber" title="#if($info.Line)Line:$info.Line#end">#if($info.Line)$info.Line#end</td>
72                                                        <td class="colnumber" title="#if($info.Column)Column:$info.Column#end">#if($info.Column)$info.Column #end</td>
73                                                        <td class="codeContext"> #if($info.Context) $info.Context #end </td>
74                                                        <td class="info" id="$messageId">
75                                                        #foreach($message in $info.Message)<span class="msg">$message</span>#end
76                                                                #foreach($longMessage in $info.Longmessage)
77                                                                <p class="longmsg">
78                                                                #foreach($longMessagePiece in $longMessage.Content)
79                                                                        $longMessagePiece
80                                                                #end
81                                                                </p>
82                                                                #end
83                                                        </td>
84                                                        <td class="anchor"><a title="anchor to this message" href="#$messageId">[anchor]</a></td>
85                                                </tr>
86#end
87                                                #end
88                                        #end
89                                        </tbody>
90                                </table>
91                        </div>
92                </div>
93        #end
94       
95        #if ($errorCount && $errorCount > 0)
96                <div class="errors">
97                        <h3>Errors ($errorCount)</h3>
98                        <div class="result">
99                                <table>
100                                        <tbody>
101                                        #foreach($result in $observation.getResultsList())
102                                                #set ($resultCount = $velocityCount)
103                                                #if (!$result.Errors.isEmpty())
104                                                <tr>
105                                                        <td colspan="5" class="uri">
106                                                        #if ($unicorncall.getInputMethod() == "URI")<span>URI : </span><a href="$result.Uri">$result.Uri</a>#end
107                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>File : </span>$result.Uri#end
108                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>File : </span>Direct Input#end
109                                                        </td>
110                                                </tr>
111#foreach($error in $result.Errors)
112#set ($messageId = "${observationName}-error-${resultCount}-$velocityCount")
113                                                <tr>
114                                                        <td class="linenumber" title="#if($error.Line)Line: $error.Line#end">#if($error.Line)$error.Line#end</td>
115                                                        <td class="colnumber" title="#if($error.Column)Column: $error.Column#end">#if($error.Column)$error.Column #end</td>
116                                                        <td class="codeContext">#if($error.Context) $error.Context #end</td>
117                                                        <td class="error" id="$messageId">
118                                                        #foreach($message in $error.Message)<span class="msg">$message</span>#end
119                                                                #foreach($longMessage in $error.Longmessage)
120                                                                <p class="longmsg">
121                                                                #foreach($longMessagePiece in $longMessage.Content)
122                                                                        $longMessagePiece
123                                                                #end
124                                                                </p>
125                                                                #end
126                                                        </td>
127                                                        <td class="anchor"><a title="anchor to this message" href="#$messageId">[anchor]</a></td>
128                                                </tr>
129#end
130                                                #end
131                                        #end
132                                        </tbody>
133                                </table>
134                        </div>
135                </div>
136        #end
137       
138        #if ($warningCount && $warningCount > 0)
139                <div class="warnings">
140                        <h3>Warnings ($warningCount)</h3>
141                        <div class="result">
142                                <table>
143                                        <tbody>
144                                        #foreach($result in $observation.getResultsList())
145                                                #set ($resultCount = $velocityCount)
146                                                #if(!$result.Warnings.isEmpty())
147                                                <tr>
148                                                        <td colspan="5" class="uri">
149                                                        #if ($unicorncall.getInputMethod() == "URI")<span>URI : </span><a href="$result.Uri">$result.Uri</a>#end
150                                                        #if ($unicorncall.getInputMethod() == "UPLOAD")<span>File : </span>$result.Uri#end
151                                                        #if ($unicorncall.getInputMethod() == "DIRECT")<span>File : </span>Direct Input#end
152                                                        </td>
153                                                </tr>
154#foreach($warning in $result.Warnings)
155#set ($messageId = "${observationName}-warning-${resultCount}-$velocityCount")
156                                                <tr>
157                                                        <td class="linenumber" title="#if($warning.Line)Line: $warning.Line#end">#if($warning.Line)$warning.Line#end</td>
158                                                        <td class="colnumber" title="#if($warning.Column)Column: $warning.Column#end">#if($warning.Column)$warning.Column #end</td>
159                                                        <td class="codeContext">#if($warning.Context) $warning.Context #end</td>
160                                                        <td class="warning level$warning.getLevel()" id="$messageId">
161                                                        #foreach($message in $warning.Message)<span class="msg">$message</span>#end
162                                                                #foreach($longMessage in $warning.Longmessage)
163                                                                <p class="longmsg">
164                                                                #foreach($longMessagePiece in $longMessage.Content)
165                                                                        $longMessagePiece
166                                                                #end
167                                                                </p>
168                                                                #end
169                                                        </td>
170                                                        <td class="anchor"><a title="anchor to this message" href="#$messageId">[anchor]</a></td>
171                                                </tr>
172#end
173                                                #end
174                                        #end
175                                        </tbody>
176                                </table>
177                        </div>
178                </div>
179        #end
180        </div>
181</div>
182#end
183</div>
184
185#parse( 'includes/footer.vm' )
Note: See TracBrowser for help on using the browser.