Toggle navigation
Toggle navigation
This project
Loading...
Sign in
data.posccaesar.org
/
npd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Authored by
David Price
2012-08-29 10:14:00 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb2da528ae66147dd77fac4212423defe1ff6f59
eb2da528
1 parent
ddf8a9cc
Copied MPRG over for DPR to get column alignment and ignore empty tables.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
www.reportinghub.no/swp/DPRTable.uispin.html
www.reportinghub.no/swp/DPRTable.uispin.html
View file @
eb2da52
<div>
<hr
/>
<ui:setContext
ui:queryGraph=
"<http://www.reportinghub.no/ep/spin/dpr-tables>"
>
<h2>
{= ui:label(?template) }
</h2>
</ui:setContext>
<table
class=
"ddrTable"
>
<ui:setContext
ui:queryGraph=
"<http://www.reportinghub.no/ep/spin/dpr-tables>"
>
<tr
class=
"ddrTR"
>
<ui:forEach
ui:resultSet=
"{#
SELECT ?header
WHERE {
?template rhspin:tableHeaders ?list .
?list <http://jena.hpl.hp.com/ARQ/list#member> ?header .
}
}"
>
<th
class=
"ddrTH"
>
{= ?header }
</th>
</ui:forEach>
</tr>
</ui:setContext>
<ui:call
ui:template=
"{= ?template }"
arg:report=
"{= ?report }"
>
<ui:forEach
ui:resultSet=
"{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"
>
<tr
class=
"ddrTR"
>
<ui:forEach
ui:resultSet=
"{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }"
>
<td
class=
"ddrTD"
>
{= ui:label(?cell) }
</td>
</ui:forEach>
</tr>
</ui:forEach>
</ui:call>
</table>
<br
/>
</div>
\ No newline at end of file
<ui:call
ui:template=
"{= ?template }"
arg:report=
"{= ?report }"
>
<ui:if
ui:condition=
"{= spr:rowCount(?rs) > 0 }"
>
<div>
<hr
/>
<ui:setContext
ui:queryGraph=
"<http://www.reportinghub.no/ep/spin/dpr-tables>"
>
<h2>
{= ui:label(?template) }
</h2>
</ui:setContext>
<table
class=
"ddrTable"
letrs:hrs=
"{#
SELECT ?header ?left
WHERE {
GRAPH <http://www.reportinghub.no/ep/spin/dpr-tables> {
?template rhspin:tableHeaders ?list .
?list <http://jena.hpl.hp.com/ARQ/list#member> ?str .
BIND (fn:starts-with(?str, '*') AS ?left) .
BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) .
}
}
}"
>
<tr
class=
"ddrTR"
>
<ui:forEach
ui:resultSet=
"{= ?hrs }"
>
<th
class=
"ddrTH"
style=
"text-align: {= IF(?left, 'left', 'center') }"
><ui:parse
ui:str=
"{= html:encodeBRs(spif:replaceAll(?header, ' ', ' ')) }"
/></th>
</ui:forEach>
</tr>
<ui:forEach
ui:resultSet=
"{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"
>
<tr
class=
"ddrTR"
>
<ui:forEach
ui:resultSet=
"{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }"
>
<!--td class="ddrTD" style="text-align: {= IF(spr:cell(?hrs, ?colIndex, 1), 'left', 'center') }"-->
<td
class=
"ddrTD"
>
{= ?cell }
</td>
</ui:forEach>
</tr>
</ui:forEach>
</table>
<br
/>
</div>
</ui:if>
</ui:call>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment