Template:SMW display test result-oneline: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (fix braces)
m (link to merged Berkeley Logo page)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
''In development''
''In development''
You can use this template in a semantic query to display 'Test result' semantic information, e.g. the info from [[Berkeley logo]].
You can use this template in a semantic query to display 'Test result' semantic information, e.g. the info from [[Berkeley Logo]].


Goal is to display information in the same format as [[Template:Test results]] does on pages like [[Tests/Sugar Control Panel/Date & Time]].
Goal is to display information in the same format as [[Template:Test results]] does on pages like [[Tests/Sugar Control Panel/Date & Time]].


Another approach might be to just use <tt>format=embedded</tt> in the semantic query, which embeds each matching page, and keep each test result on a subpage.
Another approach might be to just use <tt>format=embedded</tt> in the semantic query, which embeds each matching page, and keep each test result on a subpage.

This uses HTML &lt;table&gt; &lt;tr&gt; &lt;td&gt; syntax (copied using View &gt; Source of [[Activities]] page, because skierpage heard that trying to use wiki table markup in a template with SMW had all kinds of problems. But should verify that.


[[Category:Templates that display semantic query results]]
[[Category:Templates that display semantic query results]]


The query that calls it needs to invoke [[Template:Test results begin]], then request display of these fields in the same order, then invoke [[Template:Test results end]]. Thus
The query that calls it needs to invoke [[Template:{{PAGENAME}}-begin]], then request display of these fields in the same order, then invoke [[Template:Test results end]]. Thus
<pre>
<pre>
{{Test results begin}}
{{SMW display test result-oneline-begin}}
{{#ask:
{{#ask:
[[ some criteria]] ...
[[ some criteria]] ...
Line 22: Line 20:
| ?Build number
| ?Build number
| ?PassFail
| ?PassFail
| ?Trac bug number
| ?Trac bug number(s)
| ?Comments
| ?Comments
}}
}}
Line 32: Line 30:
</noinclude>
</noinclude>
|-
|-
| {{{1}}}
| {{{2}}}
| {{{2}}}
| {{{3}}}
| {{{3}}}
| {{{4}}}
| {{{4}}}
| {{{5}}}
| {{{5}}}
| {{#arraymap:{{{6|}}}|,|x|[http://dev.laptop.org/ticket/x x]}}
| {{#arraymap:{{{6|}}}|, |x|[http://dev.laptop.org/ticket/x x]}}
| {{{7}}}
| {{{7}}}
| {{{1}}}

Latest revision as of 01:09, 11 January 2009

In development You can use this template in a semantic query to display 'Test result' semantic information, e.g. the info from Berkeley Logo.

Goal is to display information in the same format as Template:Test results does on pages like Tests/Sugar Control Panel/Date & Time.

Another approach might be to just use format=embedded in the semantic query, which embeds each matching page, and keep each test result on a subpage.

The query that calls it needs to invoke Template:SMW display test result-oneline-begin, then request display of these fields in the same order, then invoke Template:Test results end. Thus

{{SMW display test result-oneline-begin}}
{{#ask:
  [[ some criteria]] ...
  | format=template
  | template=SMW display test result-oneline
  | ?Software release
  | ?Build stream
  | ?Build number
  | ?PassFail
  | ?Trac bug number(s)
  | ?Comments
}}
{{Test results end}}

See query at Test result query examples.


|- | {{{1}}} | {{{2}}} | {{{3}}} | {{{4}}} | {{{5}}} | {{#arraymap:|, |x|x}} | {{{7}}}